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_SHELF_SHELF_LAYOUT_MANAGER_H_ | 5 #ifndef ASH_SHELF_SHELF_LAYOUT_MANAGER_H_ |
6 #define ASH_SHELF_SHELF_LAYOUT_MANAGER_H_ | 6 #define ASH_SHELF_SHELF_LAYOUT_MANAGER_H_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "ash/ash_export.h" | 10 #include "ash/ash_export.h" |
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
158 // this point on. | 158 // this point on. |
159 DragState UpdateGestureDrag(const ui::GestureEvent& gesture); | 159 DragState UpdateGestureDrag(const ui::GestureEvent& gesture); |
160 void CompleteGestureDrag(const ui::GestureEvent& gesture); | 160 void CompleteGestureDrag(const ui::GestureEvent& gesture); |
161 void CancelGestureDrag(); | 161 void CancelGestureDrag(); |
162 | 162 |
163 // Set an animation duration override for the show / hide animation of the | 163 // Set an animation duration override for the show / hide animation of the |
164 // shelf. Specifying 0 leads to use the default. | 164 // shelf. Specifying 0 leads to use the default. |
165 void SetAnimationDurationOverride(int duration_override_in_ms); | 165 void SetAnimationDurationOverride(int duration_override_in_ms); |
166 | 166 |
167 // Overridden from SnapLayoutManager: | 167 // Overridden from SnapLayoutManager: |
168 virtual void OnWindowResized() OVERRIDE; | 168 virtual void OnWindowResized() override; |
169 virtual void SetChildBounds(aura::Window* child, | 169 virtual void SetChildBounds(aura::Window* child, |
170 const gfx::Rect& requested_bounds) OVERRIDE; | 170 const gfx::Rect& requested_bounds) override; |
171 | 171 |
172 // Overridden from ash::ShellObserver: | 172 // Overridden from ash::ShellObserver: |
173 virtual void OnLockStateChanged(bool locked) OVERRIDE; | 173 virtual void OnLockStateChanged(bool locked) override; |
174 | 174 |
175 // Overriden from aura::client::ActivationChangeObserver: | 175 // Overriden from aura::client::ActivationChangeObserver: |
176 virtual void OnWindowActivated(aura::Window* gained_active, | 176 virtual void OnWindowActivated(aura::Window* gained_active, |
177 aura::Window* lost_active) OVERRIDE; | 177 aura::Window* lost_active) override; |
178 | 178 |
179 // Overridden from ash::LockStateObserver: | 179 // Overridden from ash::LockStateObserver: |
180 virtual void OnLockStateEvent(LockStateObserver::EventType event) OVERRIDE; | 180 virtual void OnLockStateEvent(LockStateObserver::EventType event) override; |
181 | 181 |
182 // Overridden from ash::SessionStateObserver: | 182 // Overridden from ash::SessionStateObserver: |
183 virtual void SessionStateChanged( | 183 virtual void SessionStateChanged( |
184 SessionStateDelegate::SessionState state) OVERRIDE; | 184 SessionStateDelegate::SessionState state) override; |
185 | 185 |
186 // TODO(harrym|oshima): These templates will be moved to | 186 // TODO(harrym|oshima): These templates will be moved to |
187 // new Shelf class. | 187 // new Shelf class. |
188 // A helper function that provides a shortcut for choosing | 188 // A helper function that provides a shortcut for choosing |
189 // values specific to a shelf alignment. | 189 // values specific to a shelf alignment. |
190 template<typename T> | 190 template<typename T> |
191 T SelectValueForShelfAlignment(T bottom, T left, T right, T top) const { | 191 T SelectValueForShelfAlignment(T bottom, T left, T right, T top) const { |
192 switch (GetAlignment()) { | 192 switch (GetAlignment()) { |
193 case SHELF_ALIGNMENT_BOTTOM: | 193 case SHELF_ALIGNMENT_BOTTOM: |
194 return bottom; | 194 return bottom; |
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
310 // tray. | 310 // tray. |
311 ShelfAutoHideState CalculateAutoHideState( | 311 ShelfAutoHideState CalculateAutoHideState( |
312 ShelfVisibilityState visibility_state) const; | 312 ShelfVisibilityState visibility_state) const; |
313 | 313 |
314 // Returns true if |window| is a descendant of the shelf. | 314 // Returns true if |window| is a descendant of the shelf. |
315 bool IsShelfWindow(aura::Window* window); | 315 bool IsShelfWindow(aura::Window* window); |
316 | 316 |
317 int GetWorkAreaSize(const State& state, int size) const; | 317 int GetWorkAreaSize(const State& state, int size) const; |
318 | 318 |
319 // Overridden from keyboard::KeyboardControllerObserver: | 319 // Overridden from keyboard::KeyboardControllerObserver: |
320 virtual void OnKeyboardBoundsChanging(const gfx::Rect& new_bounds) OVERRIDE; | 320 virtual void OnKeyboardBoundsChanging(const gfx::Rect& new_bounds) override; |
321 | 321 |
322 // Overridden from DockedWindowLayoutManagerObserver: | 322 // Overridden from DockedWindowLayoutManagerObserver: |
323 virtual void OnDockBoundsChanging( | 323 virtual void OnDockBoundsChanging( |
324 const gfx::Rect& dock_bounds, | 324 const gfx::Rect& dock_bounds, |
325 DockedWindowLayoutManagerObserver::Reason reason) OVERRIDE; | 325 DockedWindowLayoutManagerObserver::Reason reason) override; |
326 | 326 |
327 // The RootWindow is cached so that we don't invoke Shell::GetInstance() from | 327 // The RootWindow is cached so that we don't invoke Shell::GetInstance() from |
328 // our destructor. We avoid that as at the time we're deleted Shell is being | 328 // our destructor. We avoid that as at the time we're deleted Shell is being |
329 // deleted too. | 329 // deleted too. |
330 aura::Window* root_window_; | 330 aura::Window* root_window_; |
331 | 331 |
332 // True when inside UpdateBoundsAndOpacity() method. Used to prevent calling | 332 // True when inside UpdateBoundsAndOpacity() method. Used to prevent calling |
333 // UpdateBoundsAndOpacity() again from SetChildBounds(). | 333 // UpdateBoundsAndOpacity() again from SetChildBounds(). |
334 bool updating_bounds_; | 334 bool updating_bounds_; |
335 | 335 |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
394 | 394 |
395 // The show hide animation duration override or 0 for default. | 395 // The show hide animation duration override or 0 for default. |
396 int duration_override_in_ms_; | 396 int duration_override_in_ms_; |
397 | 397 |
398 DISALLOW_COPY_AND_ASSIGN(ShelfLayoutManager); | 398 DISALLOW_COPY_AND_ASSIGN(ShelfLayoutManager); |
399 }; | 399 }; |
400 | 400 |
401 } // namespace ash | 401 } // namespace ash |
402 | 402 |
403 #endif // ASH_SHELF_SHELF_LAYOUT_MANAGER_H_ | 403 #endif // ASH_SHELF_SHELF_LAYOUT_MANAGER_H_ |
OLD | NEW |