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

Side by Side Diff: ash/shelf/wm_shelf.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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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_WM_SHELF_H_ 5 #ifndef ASH_SHELF_WM_SHELF_H_
6 #define ASH_SHELF_WM_SHELF_H_ 6 #define ASH_SHELF_WM_SHELF_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "ash/ash_export.h" 10 #include "ash/ash_export.h"
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 void SetAutoHideBehavior(ShelfAutoHideBehavior behavior); 90 void SetAutoHideBehavior(ShelfAutoHideBehavior behavior);
91 91
92 ShelfAutoHideState GetAutoHideState() const; 92 ShelfAutoHideState GetAutoHideState() const;
93 93
94 // Invoke when the auto-hide state may have changed (for example, when the 94 // Invoke when the auto-hide state may have changed (for example, when the
95 // system tray bubble opens it should force the shelf to be visible). 95 // system tray bubble opens it should force the shelf to be visible).
96 void UpdateAutoHideState(); 96 void UpdateAutoHideState();
97 97
98 ShelfBackgroundType GetBackgroundType() const; 98 ShelfBackgroundType GetBackgroundType() const;
99 99
100 // Sets the shelf background to translucent while the app list is active in
101 // order to prevent overlapping opaque backgrounds.
102 void AppListIsActive(bool hideBackground);
vadimt 2017/05/22 23:36:56 Should be called something like SetBackgroundOpaci
newcomer 2017/05/25 23:10:51 It just lets the ShelfLayoutManager know that the
103
100 void UpdateVisibilityState(); 104 void UpdateVisibilityState();
101 105
102 ShelfVisibilityState GetVisibilityState() const; 106 ShelfVisibilityState GetVisibilityState() const;
103 107
104 // Returns the ideal bounds of the shelf assuming it is visible. 108 // Returns the ideal bounds of the shelf assuming it is visible.
105 gfx::Rect GetIdealBounds(); 109 gfx::Rect GetIdealBounds();
106 110
107 gfx::Rect GetUserWorkAreaBounds() const; 111 gfx::Rect GetUserWorkAreaBounds() const;
108 112
109 // Updates the icon position given the current window bounds. This is used 113 // Updates the icon position given the current window bounds. This is used
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
165 base::ObserverList<WmShelfObserver> observers_; 169 base::ObserverList<WmShelfObserver> observers_;
166 170
167 // Forwards mouse and gesture events to ShelfLayoutManager for auto-hide. 171 // Forwards mouse and gesture events to ShelfLayoutManager for auto-hide.
168 // TODO(mash): Facilitate simliar functionality in mash: crbug.com/631216 172 // TODO(mash): Facilitate simliar functionality in mash: crbug.com/631216
169 std::unique_ptr<AutoHideEventHandler> auto_hide_event_handler_; 173 std::unique_ptr<AutoHideEventHandler> auto_hide_event_handler_;
170 174
171 // Forwards touch gestures on a bezel sensor to the shelf. 175 // Forwards touch gestures on a bezel sensor to the shelf.
172 // TODO(mash): Facilitate simliar functionality in mash: crbug.com/636647 176 // TODO(mash): Facilitate simliar functionality in mash: crbug.com/636647
173 std::unique_ptr<ShelfBezelEventHandler> bezel_event_handler_; 177 std::unique_ptr<ShelfBezelEventHandler> bezel_event_handler_;
174 178
179 // Set with AppListIsActive, blocks SetPaintsBackground from painting a
180 // transparent background while the app list is active, which prevents the
181 // two transparent backgrounds from overlapping.
182 bool app_list_is_active_ = false;
183
175 DISALLOW_COPY_AND_ASSIGN(WmShelf); 184 DISALLOW_COPY_AND_ASSIGN(WmShelf);
176 }; 185 };
177 186
178 } // namespace ash 187 } // namespace ash
179 188
180 #endif // ASH_SHELF_WM_SHELF_H_ 189 #endif // ASH_SHELF_WM_SHELF_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698