Chromium Code Reviews| Index: ui/wm/core/window_util.h |
| diff --git a/ui/wm/core/window_util.h b/ui/wm/core/window_util.h |
| index 8189a2f68fcd431eb7e2ab7c3320667b16b3830c..883273c629ed4226c5ce16eabf005413267df0ab 100644 |
| --- a/ui/wm/core/window_util.h |
| +++ b/ui/wm/core/window_util.h |
| @@ -17,6 +17,7 @@ class Window; |
| namespace ui { |
| class Layer; |
| +class LayerDelegate; |
| class LayerOwner; |
| class LayerTreeOwner; |
| } |
| @@ -36,14 +37,27 @@ WM_EXPORT aura::Window* GetActivatableWindow(aura::Window* window); |
| // determination. |
| WM_EXPORT aura::Window* GetToplevelWindow(aura::Window* window); |
| +// A factory method to create a delegate for recreated layers. |
| +class WM_EXPORT LayerDelegateFactory { |
| + public: |
| + virtual ~LayerDelegateFactory() = default; |
| + |
| + virtual ui::LayerDelegate* CreateDelegate( |
| + ui::LayerDelegate* original_delegate) = 0; |
|
sky
2016/05/19 20:06:49
Document ownership and expected lifetime.
oshima
2016/05/19 23:32:21
Done.
|
| +}; |
| + |
| // Returns the existing Layer for |root| (and all its descendants) and creates |
| // a new layer for |root| and all its descendants. This is intended for |
| // animations that want to animate between the existing visuals and a new state. |
| // |
| // As a result of this |root| has freshly created layers, meaning the layers |
| // have not yet been painted to. |
| +// |
| +// When a non null |delegate_factory| is passed, it will be used to |
| +// create an delegate for an old layer which had its own delegate. |
|
sky
2016/05/19 20:06:49
nit: 'create an' -> 'create a'
oshima
2016/05/19 23:32:21
Done.
|
| WM_EXPORT std::unique_ptr<ui::LayerTreeOwner> RecreateLayers( |
| - ui::LayerOwner* root); |
| + ui::LayerOwner* root, |
| + LayerDelegateFactory* delegate_factory); |
| // Convenience functions that get the TransientWindowManager for the window and |
| // redirect appropriately. These are preferable to calling functions on |