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

Side by Side Diff: ash/common/shelf/wm_shelf.h

Issue 2147143002: [Chrome OS MD] Draw a 1px separator between 2 tray items (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: merge conflicts + comments 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
« no previous file with comments | « no previous file | ash/common/shelf/wm_shelf.cc » ('j') | ash/common/system/status_area_widget.h » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_COMMON_SHELF_WM_SHELF_H_ 5 #ifndef ASH_COMMON_SHELF_WM_SHELF_H_
6 #define ASH_COMMON_SHELF_WM_SHELF_H_ 6 #define ASH_COMMON_SHELF_WM_SHELF_H_
7 7
8 #include "ash/ash_export.h" 8 #include "ash/ash_export.h"
9 #include "ash/common/shelf/shelf_types.h" 9 #include "ash/common/shelf/shelf_types.h"
10 #include "ash/shelf/shelf_layout_manager_observer.h" 10 #include "ash/shelf/shelf_layout_manager_observer.h"
11 #include "base/observer_list.h" 11 #include "base/observer_list.h"
12 12
13 namespace gfx { 13 namespace gfx {
14 class Rect; 14 class Rect;
15 } 15 }
16 16
17 namespace ui { 17 namespace ui {
18 class GestureEvent; 18 class GestureEvent;
19 } 19 }
20 20
21 namespace ash { 21 namespace ash {
22 22
23 class Shelf; 23 class Shelf;
24 class ShelfLayoutManager; 24 class ShelfLayoutManager;
25 class ShelfLockingManager; 25 class ShelfLockingManager;
26 class ShelfView; 26 class ShelfView;
27 class StatusAreaWidget;
27 class WmDimmerView; 28 class WmDimmerView;
28 class WmShelfObserver; 29 class WmShelfObserver;
29 class WmWindow; 30 class WmWindow;
30 31
31 // Used for accessing global state. 32 // Used for accessing global state.
32 class ASH_EXPORT WmShelf : public ShelfLayoutManagerObserver { 33 class ASH_EXPORT WmShelf : public ShelfLayoutManagerObserver {
33 public: 34 public:
34 void SetShelf(Shelf* shelf); 35 void SetShelf(Shelf* shelf);
35 void ClearShelf(); 36 void ClearShelf();
36 Shelf* shelf() const { return shelf_; } 37 Shelf* shelf() const { return shelf_; }
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 // Handles a gesture |event| coming from a source outside the shelf widget 105 // Handles a gesture |event| coming from a source outside the shelf widget
105 // (e.g. the status area widget). Allows support for behaviors like toggling 106 // (e.g. the status area widget). Allows support for behaviors like toggling
106 // auto-hide with a swipe, even if that gesture event hits another window. 107 // auto-hide with a swipe, even if that gesture event hits another window.
107 // Returns true if the event was handled. 108 // Returns true if the event was handled.
108 bool ProcessGestureEvent(const ui::GestureEvent& event); 109 bool ProcessGestureEvent(const ui::GestureEvent& event);
109 110
110 void AddObserver(WmShelfObserver* observer); 111 void AddObserver(WmShelfObserver* observer);
111 void RemoveObserver(WmShelfObserver* observer); 112 void RemoveObserver(WmShelfObserver* observer);
112 113
113 void NotifyShelfIconPositionsChanged(); 114 void NotifyShelfIconPositionsChanged();
115 StatusAreaWidget* GetStatusAreaWidget();
yoshiki 2016/08/18 08:39:08 nit: Please make this const method.
yiyix 2016/08/18 20:01:42 Done.
114 116
115 void SetVirtualKeyboardBoundsForTesting(const gfx::Rect& bounds); 117 void SetVirtualKeyboardBoundsForTesting(const gfx::Rect& bounds);
116 ShelfLockingManager* GetShelfLockingManagerForTesting(); 118 ShelfLockingManager* GetShelfLockingManagerForTesting();
117 ShelfView* GetShelfViewForTesting(); 119 ShelfView* GetShelfViewForTesting();
118 120
119 protected: 121 protected:
120 WmShelf(); 122 WmShelf();
121 ~WmShelf() override; 123 ~WmShelf() override;
122 124
123 // ShelfLayoutManagerObserver: 125 // ShelfLayoutManagerObserver:
(...skipping 13 matching lines...) Expand all
137 ShelfLayoutManager* shelf_layout_manager_ = nullptr; 139 ShelfLayoutManager* shelf_layout_manager_ = nullptr;
138 140
139 base::ObserverList<WmShelfObserver> observers_; 141 base::ObserverList<WmShelfObserver> observers_;
140 142
141 DISALLOW_COPY_AND_ASSIGN(WmShelf); 143 DISALLOW_COPY_AND_ASSIGN(WmShelf);
142 }; 144 };
143 145
144 } // namespace ash 146 } // namespace ash
145 147
146 #endif // ASH_COMMON_SHELF_WM_SHELF_H_ 148 #endif // ASH_COMMON_SHELF_WM_SHELF_H_
OLDNEW
« no previous file with comments | « no previous file | ash/common/shelf/wm_shelf.cc » ('j') | ash/common/system/status_area_widget.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698