| OLD | NEW |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 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 <memory> | 8 #include <memory> |
| 9 | 9 |
| 10 #include "ash/ash_export.h" | 10 #include "ash/ash_export.h" |
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 93 ShelfVisibilityState CalculateShelfVisibility(); | 93 ShelfVisibilityState CalculateShelfVisibility(); |
| 94 | 94 |
| 95 // Updates the visibility state. | 95 // Updates the visibility state. |
| 96 void UpdateVisibilityState(); | 96 void UpdateVisibilityState(); |
| 97 | 97 |
| 98 // Invoked by the shelf when the auto-hide state may have changed. | 98 // Invoked by the shelf when the auto-hide state may have changed. |
| 99 void UpdateAutoHideState(); | 99 void UpdateAutoHideState(); |
| 100 | 100 |
| 101 // Updates the auto-hide state for certain events. | 101 // Updates the auto-hide state for certain events. |
| 102 // TODO(mash): Add similar event handling support for mash. | 102 // TODO(mash): Add similar event handling support for mash. |
| 103 void UpdateAutoHideForMouseEvent(ui::MouseEvent* event, WmWindow* target); | 103 void UpdateAutoHideForMouseEvent(ui::MouseEvent* event, aura::Window* target); |
| 104 void UpdateAutoHideForGestureEvent(ui::GestureEvent* event, WmWindow* target); | 104 void UpdateAutoHideForGestureEvent(ui::GestureEvent* event, |
| 105 aura::Window* target); |
| 105 | 106 |
| 106 ShelfVisibilityState visibility_state() const { | 107 ShelfVisibilityState visibility_state() const { |
| 107 return state_.visibility_state; | 108 return state_.visibility_state; |
| 108 } | 109 } |
| 109 ShelfAutoHideState auto_hide_state() const { return state_.auto_hide_state; } | 110 ShelfAutoHideState auto_hide_state() const { return state_.auto_hide_state; } |
| 110 | 111 |
| 111 ShelfWidget* shelf_widget() { return shelf_widget_; } | 112 ShelfWidget* shelf_widget() { return shelf_widget_; } |
| 112 | 113 |
| 113 // Sets whether any windows overlap the shelf. If a window overlaps the shelf | 114 // Sets whether any windows overlap the shelf. If a window overlaps the shelf |
| 114 // the shelf renders slightly differently. | 115 // the shelf renders slightly differently. |
| (...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 263 | 264 |
| 264 // Returns true if at least one window is visible. | 265 // Returns true if at least one window is visible. |
| 265 bool HasVisibleWindow() const; | 266 bool HasVisibleWindow() const; |
| 266 | 267 |
| 267 // Returns the AutoHideState. This value is determined from the shelf and | 268 // Returns the AutoHideState. This value is determined from the shelf and |
| 268 // tray. | 269 // tray. |
| 269 ShelfAutoHideState CalculateAutoHideState( | 270 ShelfAutoHideState CalculateAutoHideState( |
| 270 ShelfVisibilityState visibility_state) const; | 271 ShelfVisibilityState visibility_state) const; |
| 271 | 272 |
| 272 // Returns true if |window| is a descendant of the shelf. | 273 // Returns true if |window| is a descendant of the shelf. |
| 273 bool IsShelfWindow(WmWindow* window); | 274 bool IsShelfWindow(aura::Window* window); |
| 274 | 275 |
| 275 int GetWorkAreaInsets(const State& state, int size) const; | 276 int GetWorkAreaInsets(const State& state, int size) const; |
| 276 | 277 |
| 277 // Called when the LoginUI changes from visible to invisible. | 278 // Called when the LoginUI changes from visible to invisible. |
| 278 void UpdateShelfVisibilityAfterLoginUIChange(); | 279 void UpdateShelfVisibilityAfterLoginUIChange(); |
| 279 | 280 |
| 280 // Compute |target_bounds| opacity based on gesture and shelf visibility. | 281 // Compute |target_bounds| opacity based on gesture and shelf visibility. |
| 281 float ComputeTargetOpacity(const State& state); | 282 float ComputeTargetOpacity(const State& state); |
| 282 | 283 |
| 283 // Returns true if there is a fullscreen window open that causes the shelf | 284 // Returns true if there is a fullscreen window open that causes the shelf |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 364 keyboard::KeyboardControllerObserver> | 365 keyboard::KeyboardControllerObserver> |
| 365 keyboard_observer_; | 366 keyboard_observer_; |
| 366 ScopedSessionObserver scoped_session_observer_; | 367 ScopedSessionObserver scoped_session_observer_; |
| 367 | 368 |
| 368 DISALLOW_COPY_AND_ASSIGN(ShelfLayoutManager); | 369 DISALLOW_COPY_AND_ASSIGN(ShelfLayoutManager); |
| 369 }; | 370 }; |
| 370 | 371 |
| 371 } // namespace ash | 372 } // namespace ash |
| 372 | 373 |
| 373 #endif // ASH_SHELF_SHELF_LAYOUT_MANAGER_H_ | 374 #endif // ASH_SHELF_SHELF_LAYOUT_MANAGER_H_ |
| OLD | NEW |