| 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_COMMON_SHELF_SHELF_LAYOUT_MANAGER_H_ | 5 #ifndef ASH_COMMON_SHELF_SHELF_LAYOUT_MANAGER_H_ |
| 6 #define ASH_COMMON_SHELF_SHELF_LAYOUT_MANAGER_H_ | 6 #define ASH_COMMON_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/shelf/shelf_widget.h" | 13 #include "ash/common/shelf/shelf_widget.h" |
| 14 #include "ash/common/shell_observer.h" | 14 #include "ash/common/shell_observer.h" |
| 15 #include "ash/common/wm/background_animator.h" | 15 #include "ash/common/wm/background_animator.h" |
| 16 #include "ash/common/wm/dock/docked_window_layout_manager_observer.h" | 16 #include "ash/common/wm/dock/docked_window_layout_manager_observer.h" |
| 17 #include "ash/common/wm/lock_state_observer.h" | 17 #include "ash/common/wm/lock_state_observer.h" |
| 18 #include "ash/common/wm/window_state.h" | |
| 19 #include "ash/common/wm/wm_snap_to_pixel_layout_manager.h" | 18 #include "ash/common/wm/wm_snap_to_pixel_layout_manager.h" |
| 20 #include "ash/common/wm/workspace/workspace_types.h" | 19 #include "ash/common/wm/workspace/workspace_types.h" |
| 21 #include "ash/common/wm_activation_observer.h" | 20 #include "ash/common/wm_activation_observer.h" |
| 22 #include "base/macros.h" | 21 #include "base/macros.h" |
| 23 #include "base/observer_list.h" | 22 #include "base/observer_list.h" |
| 24 #include "base/timer/timer.h" | 23 #include "base/timer/timer.h" |
| 25 #include "ui/gfx/geometry/insets.h" | 24 #include "ui/gfx/geometry/insets.h" |
| 26 #include "ui/gfx/geometry/rect.h" | 25 #include "ui/gfx/geometry/rect.h" |
| 27 #include "ui/keyboard/keyboard_controller_observer.h" | 26 #include "ui/keyboard/keyboard_controller_observer.h" |
| 28 | 27 |
| (...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 286 | 285 |
| 287 // Called when the LoginUI changes from visible to invisible. | 286 // Called when the LoginUI changes from visible to invisible. |
| 288 void UpdateShelfVisibilityAfterLoginUIChange(); | 287 void UpdateShelfVisibilityAfterLoginUIChange(); |
| 289 | 288 |
| 290 // Compute |target_bounds| opacity based on gesture and shelf visibility. | 289 // Compute |target_bounds| opacity based on gesture and shelf visibility. |
| 291 float ComputeTargetOpacity(const State& state); | 290 float ComputeTargetOpacity(const State& state); |
| 292 | 291 |
| 293 // Returns true if there is a fullscreen window open that causes the shelf | 292 // Returns true if there is a fullscreen window open that causes the shelf |
| 294 // to be hidden. | 293 // to be hidden. |
| 295 bool IsShelfHiddenForFullscreen() const; | 294 bool IsShelfHiddenForFullscreen() const; |
| 296 ash::wm::WindowState::FullscreenShelfMode GetShelfModeForFullscreen() const; | |
| 297 | 295 |
| 298 // Gesture related functions: | 296 // Gesture related functions: |
| 299 void StartGestureDrag(const ui::GestureEvent& gesture); | 297 void StartGestureDrag(const ui::GestureEvent& gesture); |
| 300 void UpdateGestureDrag(const ui::GestureEvent& gesture); | 298 void UpdateGestureDrag(const ui::GestureEvent& gesture); |
| 301 void CompleteGestureDrag(const ui::GestureEvent& gesture); | 299 void CompleteGestureDrag(const ui::GestureEvent& gesture); |
| 302 void CancelGestureDrag(); | 300 void CancelGestureDrag(); |
| 303 | 301 |
| 304 int GetShelfInsetsForAutoHide() const; | |
| 305 | |
| 306 // True when inside UpdateBoundsAndOpacity() method. Used to prevent calling | 302 // True when inside UpdateBoundsAndOpacity() method. Used to prevent calling |
| 307 // UpdateBoundsAndOpacity() again from SetChildBounds(). | 303 // UpdateBoundsAndOpacity() again from SetChildBounds(). |
| 308 bool updating_bounds_; | 304 bool updating_bounds_; |
| 309 | 305 |
| 310 bool in_shutdown_ = false; | 306 bool in_shutdown_ = false; |
| 311 | 307 |
| 312 // True if the last mouse event was a mouse drag. | 308 // True if the last mouse event was a mouse drag. |
| 313 bool in_mouse_drag_ = false; | 309 bool in_mouse_drag_ = false; |
| 314 | 310 |
| 315 // Current state. | 311 // Current state. |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 361 // keyboard. | 357 // keyboard. |
| 362 gfx::Rect user_work_area_bounds_; | 358 gfx::Rect user_work_area_bounds_; |
| 363 | 359 |
| 364 // The height of the ChromeVox panel at the top of the screen, which | 360 // The height of the ChromeVox panel at the top of the screen, which |
| 365 // needs to be removed from the available work area. | 361 // needs to be removed from the available work area. |
| 366 int chromevox_panel_height_; | 362 int chromevox_panel_height_; |
| 367 | 363 |
| 368 // The show hide animation duration override or 0 for default. | 364 // The show hide animation duration override or 0 for default. |
| 369 int duration_override_in_ms_; | 365 int duration_override_in_ms_; |
| 370 | 366 |
| 371 // The flag to enforce invisible shelf (as in MD-experiemntal). | |
| 372 // TODO(oshima): Remove this when MD immersive is launched. | |
| 373 bool invisible_auto_hide_shelf_ = false; | |
| 374 | |
| 375 DISALLOW_COPY_AND_ASSIGN(ShelfLayoutManager); | 367 DISALLOW_COPY_AND_ASSIGN(ShelfLayoutManager); |
| 376 }; | 368 }; |
| 377 | 369 |
| 378 } // namespace ash | 370 } // namespace ash |
| 379 | 371 |
| 380 #endif // ASH_COMMON_SHELF_SHELF_LAYOUT_MANAGER_H_ | 372 #endif // ASH_COMMON_SHELF_SHELF_LAYOUT_MANAGER_H_ |
| OLD | NEW |