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

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

Issue 2898743002: Draggable peeking/fullscreen launcher with transparent background. (Closed)
Patch Set: addressed msw@'s comments. 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
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 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
306 307
307 // Current state. 308 // Current state.
308 State state_; 309 State state_;
309 310
310 ShelfWidget* shelf_widget_; 311 ShelfWidget* shelf_widget_;
311 Shelf* shelf_; 312 Shelf* shelf_;
312 313
313 // Do any windows overlap the shelf? This is maintained by WorkspaceManager. 314 // Do any windows overlap the shelf? This is maintained by WorkspaceManager.
314 bool window_overlaps_shelf_; 315 bool window_overlaps_shelf_;
315 316
317 // Is the AppList visible? This is maintained by
318 // OnAppListVisibilityChanged.
319 bool is_app_list_visible_ = false;
320
316 base::OneShotTimer auto_hide_timer_; 321 base::OneShotTimer auto_hide_timer_;
317 322
318 // Whether the mouse was over the shelf when the auto hide timer started. 323 // Whether the mouse was over the shelf when the auto hide timer started.
319 // False when neither the auto hide timer nor the timer task are running. 324 // False when neither the auto hide timer nor the timer task are running.
320 bool mouse_over_shelf_when_auto_hide_timer_started_; 325 bool mouse_over_shelf_when_auto_hide_timer_started_;
321 326
322 base::ObserverList<ShelfLayoutManagerObserver> observers_; 327 base::ObserverList<ShelfLayoutManagerObserver> observers_;
323 328
324 // The shelf reacts to gesture-drags, and can be set to auto-hide for certain 329 // The shelf reacts to gesture-drags, and can be set to auto-hide for certain
325 // gestures. Some shelf behaviour (e.g. visibility state, background color 330 // gestures. Some shelf behaviour (e.g. visibility state, background color
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
365 keyboard::KeyboardControllerObserver> 370 keyboard::KeyboardControllerObserver>
366 keyboard_observer_; 371 keyboard_observer_;
367 ScopedSessionObserver scoped_session_observer_; 372 ScopedSessionObserver scoped_session_observer_;
368 373
369 DISALLOW_COPY_AND_ASSIGN(ShelfLayoutManager); 374 DISALLOW_COPY_AND_ASSIGN(ShelfLayoutManager);
370 }; 375 };
371 376
372 } // namespace ash 377 } // namespace ash
373 378
374 #endif // ASH_SHELF_SHELF_LAYOUT_MANAGER_H_ 379 #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') | ash/shell.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698