Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(393)

Side by Side Diff: ash/shelf/shelf_layout_manager.h

Issue 2237613002: mash: Migrate some misc ShelfLayoutManager deps to ash common. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address comments. Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « ash/shelf/shelf_bezel_event_handler.cc ('k') | ash/shelf/shelf_layout_manager.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 14 matching lines...) Expand all
25 #include "ui/gfx/geometry/rect.h" 25 #include "ui/gfx/geometry/rect.h"
26 #include "ui/keyboard/keyboard_controller_observer.h" 26 #include "ui/keyboard/keyboard_controller_observer.h"
27 27
28 namespace ui { 28 namespace ui {
29 class ImplicitAnimationObserver; 29 class ImplicitAnimationObserver;
30 } 30 }
31 31
32 namespace ash { 32 namespace ash {
33 33
34 class PanelLayoutManagerTest; 34 class PanelLayoutManagerTest;
35 class ShelfBezelEventFilter;
36 class ShelfLayoutManagerObserver; 35 class ShelfLayoutManagerObserver;
37 class ShelfLayoutManagerTest; 36 class ShelfLayoutManagerTest;
38 class ShelfWidget; 37 class ShelfWidget;
39 class WorkspaceController; 38 class WorkspaceController;
40 39
41 // ShelfLayoutManager is the layout manager responsible for the shelf and 40 // ShelfLayoutManager is the layout manager responsible for the shelf and
42 // status widgets. The shelf is given the total available width and told the 41 // status widgets. The shelf is given the total available width and told the
43 // width of the status area. This allows the shelf to draw the background and 42 // width of the status area. This allows the shelf to draw the background and
44 // layout to the status area. 43 // layout to the status area.
45 // To respond to bounds changes in the status area StatusAreaLayoutManager works 44 // To respond to bounds changes in the status area StatusAreaLayoutManager works
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 // shelf. Specifying 0 leads to use the default. 126 // shelf. Specifying 0 leads to use the default.
128 void SetAnimationDurationOverride(int duration_override_in_ms); 127 void SetAnimationDurationOverride(int duration_override_in_ms);
129 128
130 // Overridden from wm::WmSnapToPixelLayoutManager: 129 // Overridden from wm::WmSnapToPixelLayoutManager:
131 void OnWindowResized() override; 130 void OnWindowResized() override;
132 void SetChildBounds(WmWindow* child, 131 void SetChildBounds(WmWindow* child,
133 const gfx::Rect& requested_bounds) override; 132 const gfx::Rect& requested_bounds) override;
134 133
135 // Overridden from ShellObserver: 134 // Overridden from ShellObserver:
136 void OnLockStateChanged(bool locked) override; 135 void OnLockStateChanged(bool locked) override;
137 void OnShelfAlignmentChanged(WmWindow* root_window) override;
138 void OnShelfAutoHideBehaviorChanged(WmWindow* root_window) override; 136 void OnShelfAutoHideBehaviorChanged(WmWindow* root_window) override;
139 void OnPinnedStateChanged(WmWindow* pinned_window) override; 137 void OnPinnedStateChanged(WmWindow* pinned_window) override;
140 138
141 // Overridden from WmActivationObserver: 139 // Overridden from WmActivationObserver:
142 void OnWindowActivated(WmWindow* gained_active, 140 void OnWindowActivated(WmWindow* gained_active,
143 WmWindow* lost_active) override; 141 WmWindow* lost_active) override;
144 142
145 // Overridden from keyboard::KeyboardControllerObserver: 143 // Overridden from keyboard::KeyboardControllerObserver:
146 void OnKeyboardBoundsChanging(const gfx::Rect& new_bounds) override; 144 void OnKeyboardBoundsChanging(const gfx::Rect& new_bounds) override;
147 145
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after
317 315
318 // Do any windows overlap the shelf? This is maintained by WorkspaceManager. 316 // Do any windows overlap the shelf? This is maintained by WorkspaceManager.
319 bool window_overlaps_shelf_; 317 bool window_overlaps_shelf_;
320 318
321 base::OneShotTimer auto_hide_timer_; 319 base::OneShotTimer auto_hide_timer_;
322 320
323 // Whether the mouse was over the shelf when the auto hide timer started. 321 // Whether the mouse was over the shelf when the auto hide timer started.
324 // False when neither the auto hide timer nor the timer task are running. 322 // False when neither the auto hide timer nor the timer task are running.
325 bool mouse_over_shelf_when_auto_hide_timer_started_; 323 bool mouse_over_shelf_when_auto_hide_timer_started_;
326 324
327 // EventFilter used to detect when user issues a gesture on a bezel sensor.
328 std::unique_ptr<ShelfBezelEventFilter> bezel_event_filter_;
329
330 base::ObserverList<ShelfLayoutManagerObserver> observers_; 325 base::ObserverList<ShelfLayoutManagerObserver> observers_;
331 326
332 // The shelf reacts to gesture-drags, and can be set to auto-hide for certain 327 // The shelf reacts to gesture-drags, and can be set to auto-hide for certain
333 // gestures. Some shelf behaviour (e.g. visibility state, background color 328 // gestures. Some shelf behaviour (e.g. visibility state, background color
334 // etc.) are affected by various stages of the drag. The enum keeps track of 329 // etc.) are affected by various stages of the drag. The enum keeps track of
335 // the present status of the gesture drag. 330 // the present status of the gesture drag.
336 enum GestureDragStatus { 331 enum GestureDragStatus {
337 GESTURE_DRAG_NONE, 332 GESTURE_DRAG_NONE,
338 GESTURE_DRAG_IN_PROGRESS, 333 GESTURE_DRAG_IN_PROGRESS,
339 GESTURE_DRAG_CANCEL_IN_PROGRESS, 334 GESTURE_DRAG_CANCEL_IN_PROGRESS,
(...skipping 30 matching lines...) Expand all
370 365
371 std::unique_ptr<RootWindowControllerObserverImpl> 366 std::unique_ptr<RootWindowControllerObserverImpl>
372 root_window_controller_observer_; 367 root_window_controller_observer_;
373 368
374 DISALLOW_COPY_AND_ASSIGN(ShelfLayoutManager); 369 DISALLOW_COPY_AND_ASSIGN(ShelfLayoutManager);
375 }; 370 };
376 371
377 } // namespace ash 372 } // namespace ash
378 373
379 #endif // ASH_SHELF_SHELF_LAYOUT_MANAGER_H_ 374 #endif // ASH_SHELF_SHELF_LAYOUT_MANAGER_H_
OLDNEW
« no previous file with comments | « ash/shelf/shelf_bezel_event_handler.cc ('k') | ash/shelf/shelf_layout_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698