web_contents_close_handler_delegate.h revision a02191e04bc25c4935f804f2c080ae28663d096d
1// Copyright 2014 The Chromium Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#ifndef CHROME_BROWSER_UI_VIEWS_FRAME_WEB_CONTENTS_CLOSE_HANDLER_DELEGATE_H_
6#define CHROME_BROWSER_UI_VIEWS_FRAME_WEB_CONTENTS_CLOSE_HANDLER_DELEGATE_H_
7
8#include "base/basictypes.h"
9#include "base/memory/scoped_ptr.h"
10
11namespace ui {
12class LayerTreeOwner;
13}
14
15// WebContentsCloseHandler delegate.
16class WebContentsCloseHandlerDelegate {
17 public:
18  // Invoked to clone the layers of the WebContents. Should do nothing if there
19  // is already a clone (eg CloneWebContentsLayer() has been invoked without a
20  // DestroyClonedLayer()) or no WebContents. It is expected that when this is
21  // invoked the cloned layer tree is drawn on top of the existing WebContents.
22  virtual void CloneWebContentsLayer() = 0;
23
24  // Invoked to destroy the cloned layer tree. This may be invoked when there is
25  // no cloned layer tree.
26  virtual void DestroyClonedLayer() = 0;
27
28 protected:
29  virtual ~WebContentsCloseHandlerDelegate() {}
30};
31
32#endif  // CHROME_BROWSER_UI_VIEWS_FRAME_WEB_CONTENTS_CLOSE_HANDLER_DELEGATE_H_
33