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

Side by Side Diff: ash/system/tray/system_tray.h

Issue 1867223004: Convert //ash from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address comments Created 4 years, 8 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 | « ash/system/tray/default_system_tray_delegate.cc ('k') | ash/system/tray/system_tray.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_SYSTEM_TRAY_SYSTEM_TRAY_H_ 5 #ifndef ASH_SYSTEM_TRAY_SYSTEM_TRAY_H_
6 #define ASH_SYSTEM_TRAY_SYSTEM_TRAY_H_ 6 #define ASH_SYSTEM_TRAY_SYSTEM_TRAY_H_
7 7
8 #include <map>
9 #include <memory>
10 #include <vector>
11
8 #include "ash/ash_export.h" 12 #include "ash/ash_export.h"
9 #include "ash/system/cast/tray_cast.h" 13 #include "ash/system/cast/tray_cast.h"
10 #include "ash/system/tray/system_tray_bubble.h" 14 #include "ash/system/tray/system_tray_bubble.h"
11 #include "ash/system/tray/tray_background_view.h" 15 #include "ash/system/tray/tray_background_view.h"
12 #include "ash/system/user/login_status.h" 16 #include "ash/system/user/login_status.h"
13 #include "base/compiler_specific.h" 17 #include "base/compiler_specific.h"
14 #include "base/macros.h" 18 #include "base/macros.h"
15 #include "base/memory/scoped_ptr.h"
16 #include "base/memory/scoped_vector.h" 19 #include "base/memory/scoped_vector.h"
17 #include "ui/views/bubble/tray_bubble_view.h" 20 #include "ui/views/bubble/tray_bubble_view.h"
18 #include "ui/views/view.h" 21 #include "ui/views/view.h"
19 22
20 #include <map>
21 #include <vector>
22
23 namespace ash { 23 namespace ash {
24 class ScreenTrayItem; 24 class ScreenTrayItem;
25 class SystemBubbleWrapper; 25 class SystemBubbleWrapper;
26 class SystemTrayDelegate; 26 class SystemTrayDelegate;
27 class SystemTrayItem; 27 class SystemTrayItem;
28 class TrayAccessibility; 28 class TrayAccessibility;
29 class TrayDate; 29 class TrayDate;
30 class TrayUser; 30 class TrayUser;
31 31
32 // There are different methods for creating bubble views. 32 // There are different methods for creating bubble views.
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after
210 ScopedVector<SystemTrayItem> items_; 210 ScopedVector<SystemTrayItem> items_;
211 211
212 // Pointers to members of |items_|. 212 // Pointers to members of |items_|.
213 SystemTrayItem* detailed_item_; 213 SystemTrayItem* detailed_item_;
214 std::vector<SystemTrayItem*> notification_items_; 214 std::vector<SystemTrayItem*> notification_items_;
215 215
216 // Mappings of system tray item and it's view in the tray. 216 // Mappings of system tray item and it's view in the tray.
217 std::map<SystemTrayItem*, views::View*> tray_item_map_; 217 std::map<SystemTrayItem*, views::View*> tray_item_map_;
218 218
219 // Bubble for default and detailed views. 219 // Bubble for default and detailed views.
220 scoped_ptr<SystemBubbleWrapper> system_bubble_; 220 std::unique_ptr<SystemBubbleWrapper> system_bubble_;
221 221
222 // Bubble for notifications. 222 // Bubble for notifications.
223 scoped_ptr<SystemBubbleWrapper> notification_bubble_; 223 std::unique_ptr<SystemBubbleWrapper> notification_bubble_;
224 224
225 // Keep track of the default view height so that when we create detailed 225 // Keep track of the default view height so that when we create detailed
226 // views directly (e.g. from a notification) we know what height to use. 226 // views directly (e.g. from a notification) we know what height to use.
227 int default_bubble_height_; 227 int default_bubble_height_;
228 228
229 // Set to true when system notifications should be hidden (e.g. web 229 // Set to true when system notifications should be hidden (e.g. web
230 // notification bubble is visible). 230 // notification bubble is visible).
231 bool hide_notifications_; 231 bool hide_notifications_;
232 232
233 // This is true when the displayed system tray menu is a full tray menu, 233 // This is true when the displayed system tray menu is a full tray menu,
234 // otherwise a single line item menu like the volume slider is shown. 234 // otherwise a single line item menu like the volume slider is shown.
235 // Note that the value is only valid when |system_bubble_| is true. 235 // Note that the value is only valid when |system_bubble_| is true.
236 bool full_system_tray_menu_; 236 bool full_system_tray_menu_;
237 237
238 TrayAccessibility* tray_accessibility_; // not owned 238 TrayAccessibility* tray_accessibility_; // not owned
239 TrayCast* tray_cast_; 239 TrayCast* tray_cast_;
240 TrayDate* tray_date_; 240 TrayDate* tray_date_;
241 241
242 // A reference to the Screen share and capture item. 242 // A reference to the Screen share and capture item.
243 ScreenTrayItem* screen_capture_tray_item_; // not owned 243 ScreenTrayItem* screen_capture_tray_item_; // not owned
244 ScreenTrayItem* screen_share_tray_item_; // not owned 244 ScreenTrayItem* screen_share_tray_item_; // not owned
245 245
246 DISALLOW_COPY_AND_ASSIGN(SystemTray); 246 DISALLOW_COPY_AND_ASSIGN(SystemTray);
247 }; 247 };
248 248
249 } // namespace ash 249 } // namespace ash
250 250
251 #endif // ASH_SYSTEM_TRAY_SYSTEM_TRAY_H_ 251 #endif // ASH_SYSTEM_TRAY_SYSTEM_TRAY_H_
OLDNEW
« no previous file with comments | « ash/system/tray/default_system_tray_delegate.cc ('k') | ash/system/tray/system_tray.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698