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/basictypes.h" | |
9 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
10 | 9 |
11 namespace ui { | 10 namespace ui { |
12 class LayerTreeOwner; | 11 class LayerTreeOwner; |
13 } | 12 } |
14 | 13 |
15 // WebContentsCloseHandler delegate. | 14 // WebContentsCloseHandler delegate. |
16 class WebContentsCloseHandlerDelegate { | 15 class WebContentsCloseHandlerDelegate { |
17 public: | 16 public: |
18 // Invoked to clone the layers of the WebContents. Should do nothing if there | 17 // 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 | 18 // is already a clone (eg CloneWebContentsLayer() has been invoked without a |
20 // DestroyClonedLayer()) or no WebContents. It is expected that when this is | 19 // 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. | 20 // invoked the cloned layer tree is drawn on top of the existing WebContents. |
22 virtual void CloneWebContentsLayer() = 0; | 21 virtual void CloneWebContentsLayer() = 0; |
23 | 22 |
24 // Invoked to destroy the cloned layer tree. This may be invoked when there is | 23 // Invoked to destroy the cloned layer tree. This may be invoked when there is |
25 // no cloned layer tree. | 24 // no cloned layer tree. |
26 virtual void DestroyClonedLayer() = 0; | 25 virtual void DestroyClonedLayer() = 0; |
27 | 26 |
28 protected: | 27 protected: |
29 virtual ~WebContentsCloseHandlerDelegate() {} | 28 virtual ~WebContentsCloseHandlerDelegate() {} |
30 }; | 29 }; |
31 | 30 |
32 #endif // CHROME_BROWSER_UI_VIEWS_FRAME_WEB_CONTENTS_CLOSE_HANDLER_DELEGATE_H_ | 31 #endif // CHROME_BROWSER_UI_VIEWS_FRAME_WEB_CONTENTS_CLOSE_HANDLER_DELEGATE_H_ |
OLD | NEW |