| 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 Window; | 16 class WindowPortMus; |
| 17 class WindowTreeHostMus; |
| 17 | 18 |
| 18 class AURA_EXPORT WindowTreeHostMusDelegate { | 19 class AURA_EXPORT WindowTreeHostMusDelegate { |
| 19 public: | 20 public: |
| 20 // Called to set the bounds of the root window. |bounds| is the bounds | 21 // Called when the bounds of a WindowTreeHostMus is about to change. |
| 21 // supplied to SetBounds() and may be adjusted by the default. After this call | 22 // |bounds| is the bounds supplied to WindowTreeHostMus::SetBounds() and is |
| 22 // |bounds| is applied to WindowTreeHost. |bounds| is in dips. | 23 // in screen pixel coordinates. |
| 23 virtual void SetRootWindowBounds(Window* window, gfx::Rect* bounds) = 0; | 24 virtual void OnWindowTreeHostBoundsWillChange( |
| 25 WindowTreeHostMus* window_tree_host, |
| 26 const gfx::Rect& bounds) = 0; |
| 27 |
| 28 // Called when a WindowTreeHostMus is created without a WindowPort. |
| 29 virtual std::unique_ptr<WindowPortMus> CreateWindowPortForTopLevel() = 0; |
| 30 |
| 31 // Called from WindowTreeHostMus's constructor once the Window has been |
| 32 // created. |
| 33 virtual void OnWindowTreeHostCreated(WindowTreeHostMus* window_tree_host) = 0; |
| 24 | 34 |
| 25 protected: | 35 protected: |
| 26 virtual ~WindowTreeHostMusDelegate() {} | 36 virtual ~WindowTreeHostMusDelegate() {} |
| 27 }; | 37 }; |
| 28 | 38 |
| 29 } // namespace aura | 39 } // namespace aura |
| 30 | 40 |
| 31 #endif // UI_AURA_MUS_WINDOW_TREE_HOST_MUS_DELEGATE_H_ | 41 #endif // UI_AURA_MUS_WINDOW_TREE_HOST_MUS_DELEGATE_H_ |
| OLD | NEW |