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

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

Issue 2898743002: Draggable peeking/fullscreen launcher with transparent background. (Closed)
Patch Set: Created 3 years, 7 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 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 : public ShellObserver, 53 : public ShellObserver,
54 public aura::client::ActivationChangeObserver, 54 public aura::client::ActivationChangeObserver,
55 public keyboard::KeyboardControllerObserver, 55 public keyboard::KeyboardControllerObserver,
56 public LockStateObserver, 56 public LockStateObserver,
57 public wm::WmSnapToPixelLayoutManager, 57 public wm::WmSnapToPixelLayoutManager,
58 public SessionObserver { 58 public SessionObserver {
59 public: 59 public:
60 ShelfLayoutManager(ShelfWidget* shelf_widget, WmShelf* wm_shelf); 60 ShelfLayoutManager(ShelfWidget* shelf_widget, WmShelf* wm_shelf);
61 ~ShelfLayoutManager() override; 61 ~ShelfLayoutManager() override;
62 62
63 // Called from wm_shelf to prevent the translucent background from the shelf
64 // from overlapping with the translucent background from the launcher.
65 void AppListIsActive(bool active);
vadimt 2017/05/22 23:36:56 Also: rename to OnAppListIsActive. You don't have
newcomer 2017/05/25 23:10:51 Done.
66
63 bool updating_bounds() const { return updating_bounds_; } 67 bool updating_bounds() const { return updating_bounds_; }
64 68
65 // Clears internal data for shutdown process. 69 // Clears internal data for shutdown process.
66 void PrepareForShutdown(); 70 void PrepareForShutdown();
67
68 // Returns whether the shelf and its contents (shelf, status) are visible 71 // Returns whether the shelf and its contents (shelf, status) are visible
69 // on the screen. 72 // on the screen.
70 bool IsVisible() const; 73 bool IsVisible() const;
71 74
72 // Returns the ideal bounds of the shelf assuming it is visible. 75 // Returns the ideal bounds of the shelf assuming it is visible.
73 gfx::Rect GetIdealBounds(); 76 gfx::Rect GetIdealBounds();
74 77
75 // Returns the preferred size of the shelf for the target visibility state. 78 // Returns the preferred size of the shelf for the target visibility state.
76 gfx::Size GetPreferredSize(); 79 gfx::Size GetPreferredSize();
77 80
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after
306 309
307 // Current state. 310 // Current state.
308 State state_; 311 State state_;
309 312
310 ShelfWidget* shelf_widget_; 313 ShelfWidget* shelf_widget_;
311 WmShelf* wm_shelf_; 314 WmShelf* wm_shelf_;
312 315
313 // Do any windows overlap the shelf? This is maintained by WorkspaceManager. 316 // Do any windows overlap the shelf? This is maintained by WorkspaceManager.
314 bool window_overlaps_shelf_; 317 bool window_overlaps_shelf_;
315 318
319 bool app_list_is_active_ = false;
vadimt 2017/05/22 23:36:56 Is there a reasonable way to find out from here wh
xiyuan 2017/05/24 18:28:17 Think we can use Shell::Get()->app_list()->IsVisib
newcomer 2017/05/25 23:10:50 Acknowledged.
newcomer 2017/05/25 23:10:51 AppListIsActive (now OnAppListIsActive) actually f
316 base::OneShotTimer auto_hide_timer_; 320 base::OneShotTimer auto_hide_timer_;
317 321
318 // Whether the mouse was over the shelf when the auto hide timer started. 322 // 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. 323 // False when neither the auto hide timer nor the timer task are running.
320 bool mouse_over_shelf_when_auto_hide_timer_started_; 324 bool mouse_over_shelf_when_auto_hide_timer_started_;
321 325
322 base::ObserverList<ShelfLayoutManagerObserver> observers_; 326 base::ObserverList<ShelfLayoutManagerObserver> observers_;
323 327
324 // The shelf reacts to gesture-drags, and can be set to auto-hide for certain 328 // 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 329 // 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> 369 keyboard::KeyboardControllerObserver>
366 keyboard_observer_; 370 keyboard_observer_;
367 ScopedSessionObserver scoped_session_observer_; 371 ScopedSessionObserver scoped_session_observer_;
368 372
369 DISALLOW_COPY_AND_ASSIGN(ShelfLayoutManager); 373 DISALLOW_COPY_AND_ASSIGN(ShelfLayoutManager);
370 }; 374 };
371 375
372 } // namespace ash 376 } // namespace ash
373 377
374 #endif // ASH_SHELF_SHELF_LAYOUT_MANAGER_H_ 378 #endif // ASH_SHELF_SHELF_LAYOUT_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698