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

Side by Side Diff: ash/common/system/tray/system_tray.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: new approach 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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_COMMON_SYSTEM_TRAY_SYSTEM_TRAY_H_ 5 #ifndef ASH_COMMON_SYSTEM_TRAY_SYSTEM_TRAY_H_
6 #define ASH_COMMON_SYSTEM_TRAY_SYSTEM_TRAY_H_ 6 #define ASH_COMMON_SYSTEM_TRAY_SYSTEM_TRAY_H_
7 7
8 #include <map> 8 #include <map>
9 #include <memory> 9 #include <memory>
10 #include <vector> 10 #include <vector>
(...skipping 11 matching lines...) Expand all
22 enum class LoginStatus; 22 enum class LoginStatus;
23 class ScreenTrayItem; 23 class ScreenTrayItem;
24 class SystemBubbleWrapper; 24 class SystemBubbleWrapper;
25 class SystemTrayDelegate; 25 class SystemTrayDelegate;
26 class SystemTrayItem; 26 class SystemTrayItem;
27 class TrayAccessibility; 27 class TrayAccessibility;
28 class TrayCast; 28 class TrayCast;
29 class TrayDate; 29 class TrayDate;
30 class TrayUpdate; 30 class TrayUpdate;
31 class TrayUser; 31 class TrayUser;
32 class ViewObserver;
32 class WebNotificationTray; 33 class WebNotificationTray;
33 34
34 // There are different methods for creating bubble views. 35 // There are different methods for creating bubble views.
35 enum BubbleCreationType { 36 enum BubbleCreationType {
36 BUBBLE_CREATE_NEW, // Closes any existing bubble and creates a new one. 37 BUBBLE_CREATE_NEW, // Closes any existing bubble and creates a new one.
37 BUBBLE_USE_EXISTING, // Uses any existing bubble, or creates a new one. 38 BUBBLE_USE_EXISTING, // Uses any existing bubble, or creates a new one.
38 }; 39 };
39 40
40 class ASH_EXPORT SystemTray : public TrayBackgroundView, 41 class ASH_EXPORT SystemTray : public TrayBackgroundView,
41 public views::TrayBubbleView::Delegate { 42 public views::TrayBubbleView::Delegate {
42 public: 43 public:
43 explicit SystemTray(WmShelf* wm_shelf); 44 explicit SystemTray(WmShelf* wm_shelf, ViewObserver* view_observer);
44 ~SystemTray() override; 45 ~SystemTray() override;
45 46
46 // Calls TrayBackgroundView::Initialize(), creates the tray items, and 47 // Calls TrayBackgroundView::Initialize(), creates the tray items, and
47 // adds them to SystemTrayNotifier. 48 // adds them to SystemTrayNotifier.
48 void InitializeTrayItems(SystemTrayDelegate* delegate, 49 void InitializeTrayItems(SystemTrayDelegate* delegate,
49 WebNotificationTray* web_notification_tray); 50 WebNotificationTray* web_notification_tray);
50 51
51 // Resets internal pointers. 52 // Resets internal pointers.
52 void Shutdown(); 53 void Shutdown();
53 54
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
205 206
206 // Deactivate the system tray in the shelf if it was active before. 207 // Deactivate the system tray in the shelf if it was active before.
207 void CloseSystemBubbleAndDeactivateSystemTray(); 208 void CloseSystemBubbleAndDeactivateSystemTray();
208 209
209 // Records UMA metrics for the number of user-visible rows in the system menu 210 // Records UMA metrics for the number of user-visible rows in the system menu
210 // and the percentage of the work area height covered by the system menu. 211 // and the percentage of the work area height covered by the system menu.
211 void RecordSystemMenuMetrics(); 212 void RecordSystemMenuMetrics();
212 213
213 const ScopedVector<SystemTrayItem>& items() const { return items_; } 214 const ScopedVector<SystemTrayItem>& items() const { return items_; }
214 215
216 // Sets an empty border around the system tray to change user-visible size
217 // of the dark background. Doesn't do anything in MD.
218 void AdjustStatusTrayBackground();
219
215 // Overridden from ActionableView. 220 // Overridden from ActionableView.
216 bool PerformAction(const ui::Event& event) override; 221 bool PerformAction(const ui::Event& event) override;
217 222
218 // The web notification tray view that appears adjacent to this view. 223 // The web notification tray view that appears adjacent to this view.
219 WebNotificationTray* web_notification_tray_; 224 WebNotificationTray* web_notification_tray_;
220 225
221 // Owned items. 226 // Owned items.
222 ScopedVector<SystemTrayItem> items_; 227 ScopedVector<SystemTrayItem> items_;
223 228
224 // Pointers to members of |items_|. 229 // Pointers to members of |items_|.
(...skipping 30 matching lines...) Expand all
255 // A reference to the Screen share and capture item. 260 // A reference to the Screen share and capture item.
256 ScreenTrayItem* screen_capture_tray_item_; // not owned 261 ScreenTrayItem* screen_capture_tray_item_; // not owned
257 ScreenTrayItem* screen_share_tray_item_; // not owned 262 ScreenTrayItem* screen_share_tray_item_; // not owned
258 263
259 DISALLOW_COPY_AND_ASSIGN(SystemTray); 264 DISALLOW_COPY_AND_ASSIGN(SystemTray);
260 }; 265 };
261 266
262 } // namespace ash 267 } // namespace ash
263 268
264 #endif // ASH_COMMON_SYSTEM_TRAY_SYSTEM_TRAY_H_ 269 #endif // ASH_COMMON_SYSTEM_TRAY_SYSTEM_TRAY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698