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

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

Powered by Google App Engine
This is Rietveld 408576698