| 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" |
| 11 #include "ash/common/session/session_state_observer.h" | 11 #include "ash/common/session/session_state_observer.h" |
| 12 #include "ash/common/shelf/shelf_types.h" | 12 #include "ash/common/shelf/shelf_types.h" |
| 13 #include "ash/common/shell_observer.h" | 13 #include "ash/common/shell_observer.h" |
| 14 #include "ash/common/wm/background_animator.h" | 14 #include "ash/common/wm/background_animator.h" |
| 15 #include "ash/common/wm/dock/docked_window_layout_manager_observer.h" | 15 #include "ash/common/wm/dock/docked_window_layout_manager_observer.h" |
| 16 #include "ash/common/wm/lock_state_observer.h" | 16 #include "ash/common/wm/lock_state_observer.h" |
| 17 #include "ash/common/wm/wm_snap_to_pixel_layout_manager.h" |
| 17 #include "ash/common/wm/workspace/workspace_types.h" | 18 #include "ash/common/wm/workspace/workspace_types.h" |
| 18 #include "ash/common/wm_activation_observer.h" | 19 #include "ash/common/wm_activation_observer.h" |
| 19 #include "ash/shelf/shelf_widget.h" | 20 #include "ash/shelf/shelf_widget.h" |
| 20 #include "ash/snap_to_pixel_layout_manager.h" | |
| 21 #include "ash/wm/gestures/shelf_gesture_handler.h" | 21 #include "ash/wm/gestures/shelf_gesture_handler.h" |
| 22 #include "base/macros.h" | 22 #include "base/macros.h" |
| 23 #include "base/observer_list.h" | 23 #include "base/observer_list.h" |
| 24 #include "base/timer/timer.h" | 24 #include "base/timer/timer.h" |
| 25 #include "ui/gfx/geometry/insets.h" | 25 #include "ui/gfx/geometry/insets.h" |
| 26 #include "ui/gfx/geometry/rect.h" | 26 #include "ui/gfx/geometry/rect.h" |
| 27 #include "ui/keyboard/keyboard_controller_observer.h" | 27 #include "ui/keyboard/keyboard_controller_observer.h" |
| 28 | 28 |
| 29 namespace ui { | 29 namespace ui { |
| 30 class ImplicitAnimationObserver; | 30 class ImplicitAnimationObserver; |
| (...skipping 14 matching lines...) Expand all Loading... |
| 45 // layout to the status area. | 45 // layout to the status area. |
| 46 // To respond to bounds changes in the status area StatusAreaLayoutManager works | 46 // To respond to bounds changes in the status area StatusAreaLayoutManager works |
| 47 // closely with ShelfLayoutManager. | 47 // closely with ShelfLayoutManager. |
| 48 // On mus, widget bounds management is handled by the window manager. | 48 // On mus, widget bounds management is handled by the window manager. |
| 49 class ASH_EXPORT ShelfLayoutManager | 49 class ASH_EXPORT ShelfLayoutManager |
| 50 : public ShellObserver, | 50 : public ShellObserver, |
| 51 public WmActivationObserver, | 51 public WmActivationObserver, |
| 52 public DockedWindowLayoutManagerObserver, | 52 public DockedWindowLayoutManagerObserver, |
| 53 public keyboard::KeyboardControllerObserver, | 53 public keyboard::KeyboardControllerObserver, |
| 54 public LockStateObserver, | 54 public LockStateObserver, |
| 55 public SnapToPixelLayoutManager, | 55 public wm::WmSnapToPixelLayoutManager, |
| 56 public SessionStateObserver { | 56 public SessionStateObserver { |
| 57 public: | 57 public: |
| 58 explicit ShelfLayoutManager(ShelfWidget* shelf_widget); | 58 explicit ShelfLayoutManager(ShelfWidget* shelf_widget); |
| 59 ~ShelfLayoutManager() override; | 59 ~ShelfLayoutManager() override; |
| 60 | 60 |
| 61 void set_workspace_controller(WorkspaceController* controller) { | 61 void set_workspace_controller(WorkspaceController* controller) { |
| 62 workspace_controller_ = controller; | 62 workspace_controller_ = controller; |
| 63 } | 63 } |
| 64 | 64 |
| 65 bool updating_bounds() const { return updating_bounds_; } | 65 bool updating_bounds() const { return updating_bounds_; } |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 124 void OnGestureEdgeSwipe(const ui::GestureEvent& gesture); | 124 void OnGestureEdgeSwipe(const ui::GestureEvent& gesture); |
| 125 void StartGestureDrag(const ui::GestureEvent& gesture); | 125 void StartGestureDrag(const ui::GestureEvent& gesture); |
| 126 void UpdateGestureDrag(const ui::GestureEvent& gesture); | 126 void UpdateGestureDrag(const ui::GestureEvent& gesture); |
| 127 void CompleteGestureDrag(const ui::GestureEvent& gesture); | 127 void CompleteGestureDrag(const ui::GestureEvent& gesture); |
| 128 void CancelGestureDrag(); | 128 void CancelGestureDrag(); |
| 129 | 129 |
| 130 // Set an animation duration override for the show / hide animation of the | 130 // Set an animation duration override for the show / hide animation of the |
| 131 // shelf. Specifying 0 leads to use the default. | 131 // shelf. Specifying 0 leads to use the default. |
| 132 void SetAnimationDurationOverride(int duration_override_in_ms); | 132 void SetAnimationDurationOverride(int duration_override_in_ms); |
| 133 | 133 |
| 134 // Overridden from SnapLayoutManager: | 134 // Overridden from wm::WmSnapToPixelLayoutManager: |
| 135 void OnWindowResized() override; | 135 void OnWindowResized() override; |
| 136 void SetChildBounds(aura::Window* child, | 136 void SetChildBounds(WmWindow* child, |
| 137 const gfx::Rect& requested_bounds) override; | 137 const gfx::Rect& requested_bounds) override; |
| 138 | 138 |
| 139 // Overridden from ShellObserver: | 139 // Overridden from ShellObserver: |
| 140 void OnLockStateChanged(bool locked) override; | 140 void OnLockStateChanged(bool locked) override; |
| 141 void OnShelfAlignmentChanged(WmWindow* root_window) override; | 141 void OnShelfAlignmentChanged(WmWindow* root_window) override; |
| 142 void OnShelfAutoHideBehaviorChanged(WmWindow* root_window) override; | 142 void OnShelfAutoHideBehaviorChanged(WmWindow* root_window) override; |
| 143 void OnPinnedStateChanged(WmWindow* pinned_window) override; | 143 void OnPinnedStateChanged(WmWindow* pinned_window) override; |
| 144 | 144 |
| 145 // Overridden from WmActivationObserver: | 145 // Overridden from WmActivationObserver: |
| 146 void OnWindowActivated(WmWindow* gained_active, | 146 void OnWindowActivated(WmWindow* gained_active, |
| (...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 373 | 373 |
| 374 std::unique_ptr<RootWindowControllerObserverImpl> | 374 std::unique_ptr<RootWindowControllerObserverImpl> |
| 375 root_window_controller_observer_; | 375 root_window_controller_observer_; |
| 376 | 376 |
| 377 DISALLOW_COPY_AND_ASSIGN(ShelfLayoutManager); | 377 DISALLOW_COPY_AND_ASSIGN(ShelfLayoutManager); |
| 378 }; | 378 }; |
| 379 | 379 |
| 380 } // namespace ash | 380 } // namespace ash |
| 381 | 381 |
| 382 #endif // ASH_SHELF_SHELF_LAYOUT_MANAGER_H_ | 382 #endif // ASH_SHELF_SHELF_LAYOUT_MANAGER_H_ |
| OLD | NEW |