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

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

Issue 2898743002: Draggable peeking/fullscreen launcher with transparent background. (Closed)
Patch Set: Removed header include in shell.h that was causing gn check failure. Created 3 years, 6 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/shelf/app_list_button.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"
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 bool updating_bounds() const { return updating_bounds_; } 63 bool updating_bounds() const { return updating_bounds_; }
64 64
65 // Clears internal data for shutdown process. 65 // Clears internal data for shutdown process.
66 void PrepareForShutdown(); 66 void PrepareForShutdown();
67
68 // Returns whether the shelf and its contents (shelf, status) are visible 67 // Returns whether the shelf and its contents (shelf, status) are visible
69 // on the screen. 68 // on the screen.
70 bool IsVisible() const; 69 bool IsVisible() const;
71 70
72 // Returns the ideal bounds of the shelf assuming it is visible. 71 // Returns the ideal bounds of the shelf assuming it is visible.
73 gfx::Rect GetIdealBounds(); 72 gfx::Rect GetIdealBounds();
74 73
75 // Returns the preferred size of the shelf for the target visibility state. 74 // Returns the preferred size of the shelf for the target visibility state.
76 gfx::Size GetPreferredSize(); 75 gfx::Size GetPreferredSize();
77 76
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 // Overridden from wm::WmSnapToPixelLayoutManager: 130 // Overridden from wm::WmSnapToPixelLayoutManager:
132 void OnWindowResized() override; 131 void OnWindowResized() override;
133 void SetChildBounds(aura::Window* child, 132 void SetChildBounds(aura::Window* child,
134 const gfx::Rect& requested_bounds) override; 133 const gfx::Rect& requested_bounds) override;
135 134
136 // Overridden from ShellObserver: 135 // Overridden from ShellObserver:
137 void OnShelfAutoHideBehaviorChanged(aura::Window* root_window) override; 136 void OnShelfAutoHideBehaviorChanged(aura::Window* root_window) override;
138 void OnPinnedStateChanged(aura::Window* pinned_window) override; 137 void OnPinnedStateChanged(aura::Window* pinned_window) override;
139 void OnVirtualKeyboardStateChanged(bool activated, 138 void OnVirtualKeyboardStateChanged(bool activated,
140 aura::Window* root_window) override; 139 aura::Window* root_window) override;
140 void OnAppListVisibilityChanged(bool shown,
141 aura::Window* root_window) override;
141 142
142 // Overridden from wm::ActivationChangeObserver: 143 // Overridden from wm::ActivationChangeObserver:
143 void OnWindowActivated(ActivationReason reason, 144 void OnWindowActivated(ActivationReason reason,
144 aura::Window* gained_active, 145 aura::Window* gained_active,
145 aura::Window* lost_active) override; 146 aura::Window* lost_active) override;
146 147
147 // Overridden from keyboard::KeyboardControllerObserver: 148 // Overridden from keyboard::KeyboardControllerObserver:
148 void OnKeyboardBoundsChanging(const gfx::Rect& new_bounds) override; 149 void OnKeyboardBoundsChanging(const gfx::Rect& new_bounds) override;
149 void OnKeyboardClosed() override; 150 void OnKeyboardClosed() override;
150 151
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
310 311
311 // Current state. 312 // Current state.
312 State state_; 313 State state_;
313 314
314 ShelfWidget* shelf_widget_; 315 ShelfWidget* shelf_widget_;
315 Shelf* shelf_; 316 Shelf* shelf_;
316 317
317 // Do any windows overlap the shelf? This is maintained by WorkspaceManager. 318 // Do any windows overlap the shelf? This is maintained by WorkspaceManager.
318 bool window_overlaps_shelf_; 319 bool window_overlaps_shelf_;
319 320
321 // Is the AppList visible? This is maintained by
322 // OnAppListVisibilityChanged.
323 bool is_app_list_visible_ = false;
324
320 base::OneShotTimer auto_hide_timer_; 325 base::OneShotTimer auto_hide_timer_;
321 326
322 // Whether the mouse was over the shelf when the auto hide timer started. 327 // Whether the mouse was over the shelf when the auto hide timer started.
323 // False when neither the auto hide timer nor the timer task are running. 328 // False when neither the auto hide timer nor the timer task are running.
324 bool mouse_over_shelf_when_auto_hide_timer_started_; 329 bool mouse_over_shelf_when_auto_hide_timer_started_;
325 330
326 base::ObserverList<ShelfLayoutManagerObserver> observers_; 331 base::ObserverList<ShelfLayoutManagerObserver> observers_;
327 332
328 // The shelf reacts to gesture-drags, and can be set to auto-hide for certain 333 // The shelf reacts to gesture-drags, and can be set to auto-hide for certain
329 // gestures. Some shelf behaviour (e.g. visibility state, background color 334 // gestures. Some shelf behaviour (e.g. visibility state, background color
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
369 keyboard::KeyboardControllerObserver> 374 keyboard::KeyboardControllerObserver>
370 keyboard_observer_; 375 keyboard_observer_;
371 ScopedSessionObserver scoped_session_observer_; 376 ScopedSessionObserver scoped_session_observer_;
372 377
373 DISALLOW_COPY_AND_ASSIGN(ShelfLayoutManager); 378 DISALLOW_COPY_AND_ASSIGN(ShelfLayoutManager);
374 }; 379 };
375 380
376 } // namespace ash 381 } // namespace ash
377 382
378 #endif // ASH_SHELF_SHELF_LAYOUT_MANAGER_H_ 383 #endif // ASH_SHELF_SHELF_LAYOUT_MANAGER_H_
OLDNEW
« no previous file with comments | « ash/shelf/app_list_button.cc ('k') | ash/shelf/shelf_layout_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698