| 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 ASH_WM_COMMON_WM_LAYOUT_MANAGER_H_ | 5 #ifndef ASH_WM_COMMON_WM_LAYOUT_MANAGER_H_ |
| 6 #define ASH_WM_COMMON_WM_LAYOUT_MANAGER_H_ | 6 #define ASH_WM_COMMON_WM_LAYOUT_MANAGER_H_ |
| 7 | 7 |
| 8 #include "ash/wm/common/ash_wm_common_export.h" | 8 #include "ash/ash_export.h" |
| 9 | 9 |
| 10 namespace gfx { | 10 namespace gfx { |
| 11 class Rect; | 11 class Rect; |
| 12 } | 12 } |
| 13 | 13 |
| 14 namespace ash { | 14 namespace ash { |
| 15 namespace wm { | 15 namespace wm { |
| 16 | 16 |
| 17 class WmWindow; | 17 class WmWindow; |
| 18 | 18 |
| 19 // Used to position the child WmWindows of a WmWindow. WmLayoutManager is called | 19 // Used to position the child WmWindows of a WmWindow. WmLayoutManager is called |
| 20 // at key points in a WmWindows life cycle thats allow sthe WmLayoutManager to | 20 // at key points in a WmWindows life cycle thats allow sthe WmLayoutManager to |
| 21 // position or change child WmWindows. | 21 // position or change child WmWindows. |
| 22 class ASH_WM_COMMON_EXPORT WmLayoutManager { | 22 class ASH_EXPORT WmLayoutManager { |
| 23 public: | 23 public: |
| 24 virtual ~WmLayoutManager() {} | 24 virtual ~WmLayoutManager() {} |
| 25 | 25 |
| 26 // Invoked when the window the WmLayoutManager is associated with is resized. | 26 // Invoked when the window the WmLayoutManager is associated with is resized. |
| 27 virtual void OnWindowResized() = 0; | 27 virtual void OnWindowResized() = 0; |
| 28 | 28 |
| 29 // Invoked when a window is added to the window the WmLayoutManager is | 29 // Invoked when a window is added to the window the WmLayoutManager is |
| 30 // associated with. | 30 // associated with. |
| 31 virtual void OnWindowAddedToLayout(WmWindow* child) = 0; | 31 virtual void OnWindowAddedToLayout(WmWindow* child) = 0; |
| 32 | 32 |
| (...skipping 15 matching lines...) Expand all Loading... |
| 48 // request, including ignoring the request. Implementation must call | 48 // request, including ignoring the request. Implementation must call |
| 49 // SetChildBoundsDirect() so that an infinite loop does not result. | 49 // SetChildBoundsDirect() so that an infinite loop does not result. |
| 50 virtual void SetChildBounds(WmWindow* child, | 50 virtual void SetChildBounds(WmWindow* child, |
| 51 const gfx::Rect& requested_bounds) = 0; | 51 const gfx::Rect& requested_bounds) = 0; |
| 52 }; | 52 }; |
| 53 | 53 |
| 54 } // namespace wm | 54 } // namespace wm |
| 55 } // namespace ash | 55 } // namespace ash |
| 56 | 56 |
| 57 #endif // ASH_WM_COMMON_WM_LAYOUT_MANAGER_H_ | 57 #endif // ASH_WM_COMMON_WM_LAYOUT_MANAGER_H_ |
| OLD | NEW |