OLD | NEW |
---|---|
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_BASE_LAYOUT_MANAGER_H_ | 5 #ifndef ASH_WM_BASE_LAYOUT_MANAGER_H_ |
6 #define ASH_WM_BASE_LAYOUT_MANAGER_H_ | 6 #define ASH_WM_BASE_LAYOUT_MANAGER_H_ |
7 | 7 |
8 #include <set> | 8 #include <set> |
9 | 9 |
10 #include "ash/ash_export.h" | 10 #include "ash/ash_export.h" |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
70 virtual void OnWindowBoundsChanged(aura::Window* window, | 70 virtual void OnWindowBoundsChanged(aura::Window* window, |
71 const gfx::Rect& old_bounds, | 71 const gfx::Rect& old_bounds, |
72 const gfx::Rect& new_bounds) OVERRIDE; | 72 const gfx::Rect& new_bounds) OVERRIDE; |
73 | 73 |
74 // aura::client::ActivationChangeObserver overrides: | 74 // aura::client::ActivationChangeObserver overrides: |
75 virtual void OnWindowActivated(aura::Window* gained_active, | 75 virtual void OnWindowActivated(aura::Window* gained_active, |
76 aura::Window* lost_active) OVERRIDE; | 76 aura::Window* lost_active) OVERRIDE; |
77 | 77 |
78 protected: | 78 protected: |
79 enum AdjustWindowReason { | 79 enum AdjustWindowReason { |
80 ADJUST_WINDOW_SCREEN_SIZE_CHANGED, | 80 ADJUST_WINDOW_DISPLAY_SIZE_CHANGED, |
81 ADJUST_WINDOW_DISPLAY_INSETS_CHANGED, | 81 ADJUST_WINDOW_WORK_AREA_INSETS_CHANGED, |
82 ADJUST_WINDOW_WINDOW_ADDED | 82 ADJUST_WINDOW_WINDOW_ADDED |
83 }; | 83 }; |
84 | 84 |
85 // Invoked from OnWindowPropertyChanged() if |kShowStateKey| changes. | 85 // Invoked from OnWindowPropertyChanged() if |kShowStateKey| changes. |
86 virtual void ShowStateChanged(aura::Window* window, | 86 virtual void ShowStateChanged(aura::Window* window, |
87 ui::WindowShowState last_show_state); | 87 ui::WindowShowState last_show_state); |
88 | 88 |
89 // Adjusts the window sizes when the screen changes its size or its | 89 // Adjusts the window's bounds when the display area changes for given |
90 // work area insets. If this is called for a screen size change (i.e. |reason| | 90 // window. This happens when the display size, work area insets or |
91 // the display on which the window exists has changd. | |
92 // If this is called for a display size change (i.e. |reason| | |
91 // is ADJUST_WINDOW_SCREEN_SIZE_CHANGED), the non-maximized/non-fullscreen | 93 // is ADJUST_WINDOW_SCREEN_SIZE_CHANGED), the non-maximized/non-fullscreen |
92 // windows are readjusted to make sure the window is completely within the | 94 // windows are readjusted to make sure the window is completely within the |
93 // display region. Otherwise, it makes sure at least some parts of the window | 95 // display region. Otherwise, it makes sure at least some parts of the window |
94 // is on display. | 96 // is on display. |
95 virtual void AdjustWindowSizesForScreenChange(AdjustWindowReason reason); | 97 virtual void AdjustWindowsBoundsForWorkAreaChange(AdjustWindowReason reason); |
96 | 98 |
97 // Adjusts the sizes of the specific window in respond to a screen change or | 99 // Adjusts the sizes of the specific window in respond to a screen change or |
98 // display-area size change. | 100 // display-area size change. |
99 virtual void AdjustWindowSizeForScreenChange(aura::Window* window, | 101 virtual void AdjustWindowBounds(aura::Window* window, |
100 AdjustWindowReason reason); | 102 AdjustWindowReason reason); |
Mr4D (OOO till 08-26)
2013/08/06 23:28:56
Sorry about this - but you might have missed that
oshima
2013/08/06 23:40:36
I didn't missed. I explained that this function do
| |
101 | 103 |
102 aura::RootWindow* root_window() { return root_window_; } | 104 aura::RootWindow* root_window() { return root_window_; } |
103 | 105 |
104 private: | 106 private: |
105 // Update window bounds based on a change in show state. | 107 // Update window bounds based on a change in show state. |
106 void UpdateBoundsFromShowState(aura::Window* window); | 108 void UpdateBoundsFromShowState(aura::Window* window); |
107 | 109 |
108 // Set of windows we're listening to. | 110 // Set of windows we're listening to. |
109 WindowSet windows_; | 111 WindowSet windows_; |
110 | 112 |
111 aura::RootWindow* root_window_; | 113 aura::RootWindow* root_window_; |
112 | 114 |
113 DISALLOW_COPY_AND_ASSIGN(BaseLayoutManager); | 115 DISALLOW_COPY_AND_ASSIGN(BaseLayoutManager); |
114 }; | 116 }; |
115 | 117 |
116 } // namespace internal | 118 } // namespace internal |
117 } // namespace ash | 119 } // namespace ash |
118 | 120 |
119 #endif // ASH_WM_BASE_LAYOUT_MANAGER_H_ | 121 #endif // ASH_WM_BASE_LAYOUT_MANAGER_H_ |
OLD | NEW |