Chromium Code Reviews| 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 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 53 : public ShellObserver, | 53 : public ShellObserver, | 
| 54 public aura::client::ActivationChangeObserver, | 54 public aura::client::ActivationChangeObserver, | 
| 55 public keyboard::KeyboardControllerObserver, | 55 public keyboard::KeyboardControllerObserver, | 
| 56 public LockStateObserver, | 56 public LockStateObserver, | 
| 57 public wm::WmSnapToPixelLayoutManager, | 57 public wm::WmSnapToPixelLayoutManager, | 
| 58 public SessionObserver { | 58 public SessionObserver { | 
| 59 public: | 59 public: | 
| 60 ShelfLayoutManager(ShelfWidget* shelf_widget, Shelf* shelf); | 60 ShelfLayoutManager(ShelfWidget* shelf_widget, Shelf* shelf); | 
| 61 ~ShelfLayoutManager() override; | 61 ~ShelfLayoutManager() override; | 
| 62 | 62 | 
| 63 // Called when the AppList is active. | |
| 64 void OnAppListIsActive(bool is_active); | |
| 65 | |
| 63 bool updating_bounds() const { return updating_bounds_; } | 66 bool updating_bounds() const { return updating_bounds_; } | 
| 64 | 67 | 
| 65 // Clears internal data for shutdown process. | 68 // Clears internal data for shutdown process. | 
| 66 void PrepareForShutdown(); | 69 void PrepareForShutdown(); | 
| 67 | |
| 68 // Returns whether the shelf and its contents (shelf, status) are visible | 70 // Returns whether the shelf and its contents (shelf, status) are visible | 
| 69 // on the screen. | 71 // on the screen. | 
| 70 bool IsVisible() const; | 72 bool IsVisible() const; | 
| 71 | 73 | 
| 72 // Returns the ideal bounds of the shelf assuming it is visible. | 74 // Returns the ideal bounds of the shelf assuming it is visible. | 
| 73 gfx::Rect GetIdealBounds(); | 75 gfx::Rect GetIdealBounds(); | 
| 74 | 76 | 
| 75 // Returns the preferred size of the shelf for the target visibility state. | 77 // Returns the preferred size of the shelf for the target visibility state. | 
| 76 gfx::Size GetPreferredSize(); | 78 gfx::Size GetPreferredSize(); | 
| 77 | 79 | 
| (...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 306 | 308 | 
| 307 // Current state. | 309 // Current state. | 
| 308 State state_; | 310 State state_; | 
| 309 | 311 | 
| 310 ShelfWidget* shelf_widget_; | 312 ShelfWidget* shelf_widget_; | 
| 311 Shelf* shelf_; | 313 Shelf* shelf_; | 
| 312 | 314 | 
| 313 // Do any windows overlap the shelf? This is maintained by WorkspaceManager. | 315 // Do any windows overlap the shelf? This is maintained by WorkspaceManager. | 
| 314 bool window_overlaps_shelf_; | 316 bool window_overlaps_shelf_; | 
| 315 | 317 | 
| 318 bool app_list_is_active_ = false; | |
| 
 
xiyuan
2017/05/30 16:32:34
nit: Brief comment to document the member.
e.g.
 
newcomer
2017/05/30 21:37:03
Done.
 
 | |
| 316 base::OneShotTimer auto_hide_timer_; | 319 base::OneShotTimer auto_hide_timer_; | 
| 317 | 320 | 
| 318 // 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. | 
| 319 // 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. | 
| 320 bool mouse_over_shelf_when_auto_hide_timer_started_; | 323 bool mouse_over_shelf_when_auto_hide_timer_started_; | 
| 321 | 324 | 
| 322 base::ObserverList<ShelfLayoutManagerObserver> observers_; | 325 base::ObserverList<ShelfLayoutManagerObserver> observers_; | 
| 323 | 326 | 
| 324 // 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 | 
| 325 // gestures. Some shelf behaviour (e.g. visibility state, background color | 328 // gestures. Some shelf behaviour (e.g. visibility state, background color | 
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 365 keyboard::KeyboardControllerObserver> | 368 keyboard::KeyboardControllerObserver> | 
| 366 keyboard_observer_; | 369 keyboard_observer_; | 
| 367 ScopedSessionObserver scoped_session_observer_; | 370 ScopedSessionObserver scoped_session_observer_; | 
| 368 | 371 | 
| 369 DISALLOW_COPY_AND_ASSIGN(ShelfLayoutManager); | 372 DISALLOW_COPY_AND_ASSIGN(ShelfLayoutManager); | 
| 370 }; | 373 }; | 
| 371 | 374 | 
| 372 } // namespace ash | 375 } // namespace ash | 
| 373 | 376 | 
| 374 #endif // ASH_SHELF_SHELF_LAYOUT_MANAGER_H_ | 377 #endif // ASH_SHELF_SHELF_LAYOUT_MANAGER_H_ | 
| OLD | NEW |