Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / chrome / browser / ui / views / frame / web_contents_close_handler_delegate.h
blob83f0e67f75f8d2d3a23d0c36ec76ba294b3e7208
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.
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_
8 #include "base/basictypes.h"
9 #include "base/memory/scoped_ptr.h"
11 namespace ui {
12 class LayerTreeOwner;
15 // WebContentsCloseHandler delegate.
16 class 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;
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;
28 protected:
29 virtual ~WebContentsCloseHandlerDelegate() {}
32 #endif // CHROME_BROWSER_UI_VIEWS_FRAME_WEB_CONTENTS_CLOSE_HANDLER_DELEGATE_H_