Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 UI_AURA_MUS_WINDOW_TREE_HOST_MUS_DELEGATE_H_ | 5 #ifndef UI_AURA_MUS_WINDOW_TREE_HOST_MUS_DELEGATE_H_ |
| 6 #define UI_AURA_MUS_WINDOW_TREE_HOST_MUS_DELEGATE_H_ | 6 #define UI_AURA_MUS_WINDOW_TREE_HOST_MUS_DELEGATE_H_ |
| 7 | 7 |
| 8 #include "ui/aura/aura_export.h" | 8 #include "ui/aura/aura_export.h" |
| 9 | 9 |
| 10 namespace gfx { | 10 namespace gfx { |
| 11 class Rect; | 11 class Rect; |
| 12 } | 12 } |
| 13 | 13 |
| 14 namespace aura { | 14 namespace aura { |
| 15 | 15 |
| 16 class WindowPortMus; | 16 class WindowPortMus; |
| 17 class WindowTreeHostMus; | 17 class WindowTreeHostMus; |
| 18 | 18 |
| 19 class AURA_EXPORT WindowTreeHostMusDelegate { | 19 class AURA_EXPORT WindowTreeHostMusDelegate { |
| 20 public: | 20 public: |
| 21 // Called when the bounds of a WindowTreeHostMus is about to change. | 21 // Called when the bounds of a WindowTreeHostMus is about to change. |
| 22 // |bounds| is the bounds supplied to WindowTreeHostMus::SetBounds() and is | 22 // |bounds| is the bounds supplied to WindowTreeHostMus::SetBounds() and is |
| 23 // in screen pixel coordinates. | 23 // in screen pixel coordinates. |
| 24 virtual void OnWindowTreeHostBoundsWillChange( | 24 virtual void OnWindowTreeHostBoundsWillChange( |
| 25 WindowTreeHostMus* window_tree_host, | 25 WindowTreeHostMus* window_tree_host, |
| 26 const gfx::Rect& bounds) = 0; | 26 const gfx::Rect& bounds) = 0; |
| 27 | 27 |
| 28 // Called when the client area of a WindowTreeHostMus is about to change. | |
| 29 virtual void OnWindowTreeHostClientAreaWillChange( | |
| 30 WindowTreeHostMus* window_tree_host, | |
| 31 const gfx::Insets& insets) = 0; | |
| 32 | |
| 33 // Called when the hit test mask is about to be cleared. | |
| 34 virtual void OnWindowTreeHostClearHitTestMask( | |
|
sky
2016/11/19 15:29:31
How about a single function for this that takes a
Elliot Glaysher
2016/11/22 00:48:07
Done.
| |
| 35 WindowTreeHostMus* window_tree_host) = 0; | |
| 36 | |
| 37 // Called when the hit test mask is about to be cleared. | |
| 38 virtual void OnWindowTreeHostHitTestMaskWillChange( | |
| 39 WindowTreeHostMus* window_tree_host, | |
| 40 const gfx::Rect& mask_rect) = 0; | |
| 41 | |
| 28 // Called when a WindowTreeHostMus is created without a WindowPort. | 42 // Called when a WindowTreeHostMus is created without a WindowPort. |
| 29 virtual std::unique_ptr<WindowPortMus> CreateWindowPortForTopLevel() = 0; | 43 virtual std::unique_ptr<WindowPortMus> CreateWindowPortForTopLevel() = 0; |
| 30 | 44 |
| 31 // Called from WindowTreeHostMus's constructor once the Window has been | 45 // Called from WindowTreeHostMus's constructor once the Window has been |
| 32 // created. | 46 // created. |
| 33 virtual void OnWindowTreeHostCreated(WindowTreeHostMus* window_tree_host) = 0; | 47 virtual void OnWindowTreeHostCreated(WindowTreeHostMus* window_tree_host) = 0; |
| 34 | 48 |
| 35 protected: | 49 protected: |
| 36 virtual ~WindowTreeHostMusDelegate() {} | 50 virtual ~WindowTreeHostMusDelegate() {} |
| 37 }; | 51 }; |
| 38 | 52 |
| 39 } // namespace aura | 53 } // namespace aura |
| 40 | 54 |
| 41 #endif // UI_AURA_MUS_WINDOW_TREE_HOST_MUS_DELEGATE_H_ | 55 #endif // UI_AURA_MUS_WINDOW_TREE_HOST_MUS_DELEGATE_H_ |
| OLD | NEW |