Chromium Code Reviews| OLD | NEW |
|---|---|
| 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_ |
|
tdanderson
2017/04/19 18:47:43
nit: typo in the CL description (opend->opened)
n
| |
| 6 #define ASH_SYSTEM_TRAY_SYSTEM_TRAY_H_ | 6 #define ASH_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> |
| 11 | 11 |
| 12 #include "ash/ash_export.h" | 12 #include "ash/ash_export.h" |
| 13 #include "ash/system/tray/system_tray_bubble.h" | 13 #include "ash/system/tray/system_tray_bubble.h" |
| 14 #include "ash/system/tray/tray_background_view.h" | 14 #include "ash/system/tray/tray_background_view.h" |
| 15 #include "base/macros.h" | 15 #include "base/macros.h" |
| (...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 195 void CloseSystemBubbleAndDeactivateSystemTray(); | 195 void CloseSystemBubbleAndDeactivateSystemTray(); |
| 196 | 196 |
| 197 // Records UMA metrics for the number of user-visible rows in the system menu | 197 // Records UMA metrics for the number of user-visible rows in the system menu |
| 198 // and the percentage of the work area height covered by the system menu. | 198 // and the percentage of the work area height covered by the system menu. |
| 199 void RecordSystemMenuMetrics(); | 199 void RecordSystemMenuMetrics(); |
| 200 | 200 |
| 201 // Overridden from ActionableView. | 201 // Overridden from ActionableView. |
| 202 bool PerformAction(const ui::Event& event) override; | 202 bool PerformAction(const ui::Event& event) override; |
| 203 | 203 |
| 204 // The web notification tray view that appears adjacent to this view. | 204 // The web notification tray view that appears adjacent to this view. |
| 205 WebNotificationTray* web_notification_tray_; | 205 WebNotificationTray* web_notification_tray_ = nullptr; |
| 206 | 206 |
| 207 // Items. | 207 // Items. |
| 208 std::vector<std::unique_ptr<SystemTrayItem>> items_; | 208 std::vector<std::unique_ptr<SystemTrayItem>> items_; |
| 209 | 209 |
| 210 // Pointers to members of |items_|. | 210 // Pointers to members of |items_|. |
| 211 SystemTrayItem* detailed_item_; | 211 SystemTrayItem* detailed_item_ = nullptr; |
| 212 | 212 |
| 213 // Mappings of system tray item and it's view in the tray. | 213 // Mappings of system tray item and it's view in the tray. |
| 214 std::map<SystemTrayItem*, views::View*> tray_item_map_; | 214 std::map<SystemTrayItem*, views::View*> tray_item_map_; |
| 215 | 215 |
| 216 // Bubble for default and detailed views. | 216 // Bubble for default and detailed views. |
| 217 std::unique_ptr<SystemBubbleWrapper> system_bubble_; | 217 std::unique_ptr<SystemBubbleWrapper> system_bubble_; |
| 218 | 218 |
| 219 // Keep track of the default view height so that when we create detailed | 219 // Keep track of the default view height so that when we create detailed |
| 220 // views directly (e.g. from a notification) we know what height to use. | 220 // views directly (e.g. from a notification) we know what height to use. |
| 221 int default_bubble_height_; | 221 int default_bubble_height_ = 0; |
| 222 | 222 |
| 223 // This is true when the displayed system tray menu is a full tray menu, | 223 // This is true when the displayed system tray menu is a full tray menu, |
| 224 // otherwise a single line item menu like the volume slider is shown. | 224 // otherwise a single line item menu like the volume slider is shown. |
| 225 // Note that the value is only valid when |system_bubble_| is true. | 225 // Note that the value is only valid when |system_bubble_| is true. |
| 226 bool full_system_tray_menu_; | 226 bool full_system_tray_menu_ = false; |
| 227 | 227 |
| 228 // These objects are not owned by this class. | 228 // These objects are not owned by this class. |
| 229 TrayAccessibility* tray_accessibility_; | 229 TrayAccessibility* tray_accessibility_ = nullptr; |
| 230 TrayAudio* tray_audio_; // May be null. | 230 TrayAudio* tray_audio_ = nullptr; // May be null. |
| 231 TrayCast* tray_cast_; | 231 TrayCast* tray_cast_ = nullptr; |
| 232 TrayNetwork* tray_network_; | 232 TrayNetwork* tray_network_ = nullptr; |
| 233 TrayTiles* tray_tiles_; // only used in material design. | 233 TrayTiles* tray_tiles_ = nullptr; |
| 234 TraySystemInfo* tray_system_info_; // only used in material design. | 234 TraySystemInfo* tray_system_info_ = nullptr; |
| 235 TrayUpdate* tray_update_; | 235 TrayUpdate* tray_update_ = nullptr; |
| 236 | 236 |
| 237 // A reference to the Screen share and capture item. | 237 // A reference to the Screen share and capture item. |
| 238 ScreenTrayItem* screen_capture_tray_item_; // not owned | 238 ScreenTrayItem* screen_capture_tray_item_ = nullptr; // not owned |
| 239 ScreenTrayItem* screen_share_tray_item_; // not owned | 239 ScreenTrayItem* screen_share_tray_item_ = nullptr; // not owned |
| 240 | 240 |
| 241 std::unique_ptr<KeyEventWatcher> key_event_watcher_; | 241 std::unique_ptr<KeyEventWatcher> key_event_watcher_; |
| 242 | 242 |
| 243 std::unique_ptr<ActivationObserver> activation_observer_; | 243 std::unique_ptr<ActivationObserver> activation_observer_; |
| 244 | 244 |
| 245 DISALLOW_COPY_AND_ASSIGN(SystemTray); | 245 DISALLOW_COPY_AND_ASSIGN(SystemTray); |
| 246 }; | 246 }; |
| 247 | 247 |
| 248 } // namespace ash | 248 } // namespace ash |
| 249 | 249 |
| 250 #endif // ASH_SYSTEM_TRAY_SYSTEM_TRAY_H_ | 250 #endif // ASH_SYSTEM_TRAY_SYSTEM_TRAY_H_ |
| OLD | NEW |