| 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> |
| 9 |
| 8 #include "ash/ash_export.h" | 10 #include "ash/ash_export.h" |
| 9 #include "ash/launcher/launcher.h" | 11 #include "ash/launcher/launcher.h" |
| 10 #include "ash/shelf/background_animator.h" | 12 #include "ash/shelf/background_animator.h" |
| 11 #include "ash/shelf/shelf_types.h" | 13 #include "ash/shelf/shelf_types.h" |
| 12 #include "ash/shell_observer.h" | 14 #include "ash/shell_observer.h" |
| 13 #include "ash/system/status_area_widget.h" | 15 #include "ash/system/status_area_widget.h" |
| 14 #include "base/basictypes.h" | 16 #include "base/basictypes.h" |
| 15 #include "base/compiler_specific.h" | 17 #include "base/compiler_specific.h" |
| 16 #include "base/logging.h" | 18 #include "base/logging.h" |
| 17 #include "base/observer_list.h" | 19 #include "base/observer_list.h" |
| (...skipping 13 matching lines...) Expand all Loading... |
| 31 class GestureEvent; | 33 class GestureEvent; |
| 32 } | 34 } |
| 33 | 35 |
| 34 namespace ash { | 36 namespace ash { |
| 35 class ScreenAsh; | 37 class ScreenAsh; |
| 36 class ShelfLayoutManagerObserver; | 38 class ShelfLayoutManagerObserver; |
| 37 class ShelfWidget; | 39 class ShelfWidget; |
| 38 namespace internal { | 40 namespace internal { |
| 39 | 41 |
| 40 class PanelLayoutManagerTest; | 42 class PanelLayoutManagerTest; |
| 43 class ShelfBezelEventFilter; |
| 41 class ShelfLayoutManagerTest; | 44 class ShelfLayoutManagerTest; |
| 42 class StatusAreaWidget; | 45 class StatusAreaWidget; |
| 43 class WorkspaceController; | 46 class WorkspaceController; |
| 44 | 47 |
| 45 // ShelfLayoutManager is the layout manager responsible for the launcher and | 48 // ShelfLayoutManager is the layout manager responsible for the launcher and |
| 46 // status widgets. The launcher is given the total available width and told the | 49 // status widgets. The launcher is given the total available width and told the |
| 47 // width of the status area. This allows the launcher to draw the background and | 50 // width of the status area. This allows the launcher to draw the background and |
| 48 // layout to the status area. | 51 // layout to the status area. |
| 49 // To respond to bounds changes in the status area StatusAreaLayoutManager works | 52 // To respond to bounds changes in the status area StatusAreaLayoutManager works |
| 50 // closely with ShelfLayoutManager. | 53 // closely with ShelfLayoutManager. |
| (...skipping 254 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 305 | 308 |
| 306 WorkspaceController* workspace_controller_; | 309 WorkspaceController* workspace_controller_; |
| 307 | 310 |
| 308 // Do any windows overlap the shelf? This is maintained by WorkspaceManager. | 311 // Do any windows overlap the shelf? This is maintained by WorkspaceManager. |
| 309 bool window_overlaps_shelf_; | 312 bool window_overlaps_shelf_; |
| 310 | 313 |
| 311 base::OneShotTimer<ShelfLayoutManager> auto_hide_timer_; | 314 base::OneShotTimer<ShelfLayoutManager> auto_hide_timer_; |
| 312 | 315 |
| 313 // EventFilter used to detect when user moves the mouse over the launcher to | 316 // EventFilter used to detect when user moves the mouse over the launcher to |
| 314 // trigger showing the launcher. | 317 // trigger showing the launcher. |
| 315 scoped_ptr<AutoHideEventFilter> event_filter_; | 318 scoped_ptr<AutoHideEventFilter> auto_hide_event_filter_; |
| 319 |
| 320 // EventFilter used to detect when user issues a gesture on a bezel sensor. |
| 321 scoped_ptr<ShelfBezelEventFilter> bezel_event_filter_; |
| 316 | 322 |
| 317 ObserverList<ShelfLayoutManagerObserver> observers_; | 323 ObserverList<ShelfLayoutManagerObserver> observers_; |
| 318 | 324 |
| 319 // The shelf reacts to gesture-drags, and can be set to auto-hide for certain | 325 // The shelf reacts to gesture-drags, and can be set to auto-hide for certain |
| 320 // gestures. Some shelf behaviour (e.g. visibility state, background color | 326 // gestures. Some shelf behaviour (e.g. visibility state, background color |
| 321 // etc.) are affected by various stages of the drag. The enum keeps track of | 327 // etc.) are affected by various stages of the drag. The enum keeps track of |
| 322 // the present status of the gesture drag. | 328 // the present status of the gesture drag. |
| 323 enum GestureDragStatus { | 329 enum GestureDragStatus { |
| 324 GESTURE_DRAG_NONE, | 330 GESTURE_DRAG_NONE, |
| 325 GESTURE_DRAG_IN_PROGRESS, | 331 GESTURE_DRAG_IN_PROGRESS, |
| (...skipping 14 matching lines...) Expand all Loading... |
| 340 // The bounds of the keyboard. | 346 // The bounds of the keyboard. |
| 341 gfx::Rect keyboard_bounds_; | 347 gfx::Rect keyboard_bounds_; |
| 342 | 348 |
| 343 DISALLOW_COPY_AND_ASSIGN(ShelfLayoutManager); | 349 DISALLOW_COPY_AND_ASSIGN(ShelfLayoutManager); |
| 344 }; | 350 }; |
| 345 | 351 |
| 346 } // namespace internal | 352 } // namespace internal |
| 347 } // namespace ash | 353 } // namespace ash |
| 348 | 354 |
| 349 #endif // ASH_SHELF_SHELF_LAYOUT_MANAGER_H_ | 355 #endif // ASH_SHELF_SHELF_LAYOUT_MANAGER_H_ |
| OLD | NEW |