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