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

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

Issue 2248773002: Use MD-ash's auto hide behavior for arc++ windows. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add ash/shell.h bac to merge to m53 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/common/wm/window_state.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"
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/window_state.h"
17 #include "ash/common/wm/wm_snap_to_pixel_layout_manager.h" 18 #include "ash/common/wm/wm_snap_to_pixel_layout_manager.h"
18 #include "ash/common/wm/workspace/workspace_types.h" 19 #include "ash/common/wm/workspace/workspace_types.h"
19 #include "ash/common/wm_activation_observer.h" 20 #include "ash/common/wm_activation_observer.h"
20 #include "ash/shelf/shelf_widget.h" 21 #include "ash/shelf/shelf_widget.h"
21 #include "base/macros.h" 22 #include "base/macros.h"
22 #include "base/observer_list.h" 23 #include "base/observer_list.h"
23 #include "base/timer/timer.h" 24 #include "base/timer/timer.h"
24 #include "ui/gfx/geometry/insets.h" 25 #include "ui/gfx/geometry/insets.h"
25 #include "ui/gfx/geometry/rect.h" 26 #include "ui/gfx/geometry/rect.h"
26 #include "ui/keyboard/keyboard_controller_observer.h" 27 #include "ui/keyboard/keyboard_controller_observer.h"
(...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after
284 285
285 // Called when the LoginUI changes from visible to invisible. 286 // Called when the LoginUI changes from visible to invisible.
286 void UpdateShelfVisibilityAfterLoginUIChange(); 287 void UpdateShelfVisibilityAfterLoginUIChange();
287 288
288 // Compute |target_bounds| opacity based on gesture and shelf visibility. 289 // Compute |target_bounds| opacity based on gesture and shelf visibility.
289 float ComputeTargetOpacity(const State& state); 290 float ComputeTargetOpacity(const State& state);
290 291
291 // 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
292 // to be hidden. 293 // to be hidden.
293 bool IsShelfHiddenForFullscreen() const; 294 bool IsShelfHiddenForFullscreen() const;
295 ash::wm::WindowState::FullscreenShelfMode GetShelfModeForFullscreen() const;
294 296
295 // Gesture related functions: 297 // Gesture related functions:
296 void StartGestureDrag(const ui::GestureEvent& gesture); 298 void StartGestureDrag(const ui::GestureEvent& gesture);
297 void UpdateGestureDrag(const ui::GestureEvent& gesture); 299 void UpdateGestureDrag(const ui::GestureEvent& gesture);
298 void CompleteGestureDrag(const ui::GestureEvent& gesture); 300 void CompleteGestureDrag(const ui::GestureEvent& gesture);
299 void CancelGestureDrag(); 301 void CancelGestureDrag();
300 302
303 int GetShelfInsetsForAutoHide() const;
304
301 // True when inside UpdateBoundsAndOpacity() method. Used to prevent calling 305 // True when inside UpdateBoundsAndOpacity() method. Used to prevent calling
302 // UpdateBoundsAndOpacity() again from SetChildBounds(). 306 // UpdateBoundsAndOpacity() again from SetChildBounds().
303 bool updating_bounds_; 307 bool updating_bounds_;
304 308
305 bool in_shutdown_ = false; 309 bool in_shutdown_ = false;
306 310
307 // True if the last mouse event was a mouse drag. 311 // True if the last mouse event was a mouse drag.
308 bool in_mouse_drag_ = false; 312 bool in_mouse_drag_ = false;
309 313
310 // Current state. 314 // Current state.
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
355 // keyboard. 359 // keyboard.
356 gfx::Rect user_work_area_bounds_; 360 gfx::Rect user_work_area_bounds_;
357 361
358 // The height of the ChromeVox panel at the top of the screen, which 362 // The height of the ChromeVox panel at the top of the screen, which
359 // needs to be removed from the available work area. 363 // needs to be removed from the available work area.
360 int chromevox_panel_height_; 364 int chromevox_panel_height_;
361 365
362 // The show hide animation duration override or 0 for default. 366 // The show hide animation duration override or 0 for default.
363 int duration_override_in_ms_; 367 int duration_override_in_ms_;
364 368
369 // The flag to enforce invisible shelf (as in MD-experiemntal).
370 // TODO(oshima): Remove this when MD immersive is launched.
371 bool invisible_auto_hide_shelf_ = false;
372
365 std::unique_ptr<RootWindowControllerObserverImpl> 373 std::unique_ptr<RootWindowControllerObserverImpl>
366 root_window_controller_observer_; 374 root_window_controller_observer_;
367 375
368 DISALLOW_COPY_AND_ASSIGN(ShelfLayoutManager); 376 DISALLOW_COPY_AND_ASSIGN(ShelfLayoutManager);
369 }; 377 };
370 378
371 } // namespace ash 379 } // namespace ash
372 380
373 #endif // ASH_SHELF_SHELF_LAYOUT_MANAGER_H_ 381 #endif // ASH_SHELF_SHELF_LAYOUT_MANAGER_H_
OLDNEW
« no previous file with comments | « ash/common/wm/window_state.cc ('k') | ash/shelf/shelf_layout_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698