| 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_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 Loading... |
| 22 class KeyEventWatcher; | 22 class KeyEventWatcher; |
| 23 enum class LoginStatus; | 23 enum class LoginStatus; |
| 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 TrayAudio; | 29 class TrayAudio; |
| 30 class TrayCast; | 30 class TrayCast; |
| 31 class TrayDate; | 31 class TrayDate; |
| 32 class TrayNetwork; |
| 32 class TraySystemInfo; | 33 class TraySystemInfo; |
| 33 class TrayTiles; | 34 class TrayTiles; |
| 34 class TrayUpdate; | 35 class TrayUpdate; |
| 35 class WebNotificationTray; | 36 class WebNotificationTray; |
| 36 | 37 |
| 37 // There are different methods for creating bubble views. | 38 // There are different methods for creating bubble views. |
| 38 enum BubbleCreationType { | 39 enum BubbleCreationType { |
| 39 BUBBLE_CREATE_NEW, // Closes any existing bubble and creates a new one. | 40 BUBBLE_CREATE_NEW, // Closes any existing bubble and creates a new one. |
| 40 BUBBLE_USE_EXISTING, // Uses any existing bubble, or creates a new one. | 41 BUBBLE_USE_EXISTING, // Uses any existing bubble, or creates a new one. |
| 41 }; | 42 }; |
| (...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 157 | 158 |
| 158 TrayAccessibility* GetTrayAccessibilityForTest() { | 159 TrayAccessibility* GetTrayAccessibilityForTest() { |
| 159 return tray_accessibility_; | 160 return tray_accessibility_; |
| 160 } | 161 } |
| 161 | 162 |
| 162 // Get the tray item view (or NULL) for a given |tray_item| in a unit test. | 163 // Get the tray item view (or NULL) for a given |tray_item| in a unit test. |
| 163 views::View* GetTrayItemViewForTest(SystemTrayItem* tray_item); | 164 views::View* GetTrayItemViewForTest(SystemTrayItem* tray_item); |
| 164 | 165 |
| 165 TrayCast* GetTrayCastForTesting() const; | 166 TrayCast* GetTrayCastForTesting() const; |
| 166 TrayDate* GetTrayDateForTesting() const; | 167 TrayDate* GetTrayDateForTesting() const; |
| 168 TrayNetwork* GetTrayNetworkForTesting() const; |
| 167 TraySystemInfo* GetTraySystemInfoForTesting() const; | 169 TraySystemInfo* GetTraySystemInfoForTesting() const; |
| 168 TrayTiles* GetTrayTilesForTesting() const; | 170 TrayTiles* GetTrayTilesForTesting() const; |
| 169 TrayUpdate* GetTrayUpdateForTesting() const; | 171 TrayUpdate* GetTrayUpdateForTesting() const; |
| 170 | 172 |
| 171 // Activates the system tray bubble. | 173 // Activates the system tray bubble. |
| 172 void ActivateBubble(); | 174 void ActivateBubble(); |
| 173 | 175 |
| 174 private: | 176 private: |
| 175 class ActivationObserver; | 177 class ActivationObserver; |
| 176 | 178 |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 260 // This is true when the displayed system tray menu is a full tray menu, | 262 // This is true when the displayed system tray menu is a full tray menu, |
| 261 // otherwise a single line item menu like the volume slider is shown. | 263 // otherwise a single line item menu like the volume slider is shown. |
| 262 // Note that the value is only valid when |system_bubble_| is true. | 264 // Note that the value is only valid when |system_bubble_| is true. |
| 263 bool full_system_tray_menu_; | 265 bool full_system_tray_menu_; |
| 264 | 266 |
| 265 // These objects are not owned by this class. | 267 // These objects are not owned by this class. |
| 266 TrayAccessibility* tray_accessibility_; | 268 TrayAccessibility* tray_accessibility_; |
| 267 TrayAudio* tray_audio_; // May be null. | 269 TrayAudio* tray_audio_; // May be null. |
| 268 TrayCast* tray_cast_; | 270 TrayCast* tray_cast_; |
| 269 TrayDate* tray_date_; // null for material design. | 271 TrayDate* tray_date_; // null for material design. |
| 272 TrayNetwork* tray_network_; |
| 270 TrayTiles* tray_tiles_; // only used in material design. | 273 TrayTiles* tray_tiles_; // only used in material design. |
| 271 TraySystemInfo* tray_system_info_; // only used in material design. | 274 TraySystemInfo* tray_system_info_; // only used in material design. |
| 272 TrayUpdate* tray_update_; | 275 TrayUpdate* tray_update_; |
| 273 | 276 |
| 274 // A reference to the Screen share and capture item. | 277 // A reference to the Screen share and capture item. |
| 275 ScreenTrayItem* screen_capture_tray_item_; // not owned | 278 ScreenTrayItem* screen_capture_tray_item_; // not owned |
| 276 ScreenTrayItem* screen_share_tray_item_; // not owned | 279 ScreenTrayItem* screen_share_tray_item_; // not owned |
| 277 | 280 |
| 278 // TODO(oshima): Remove this when crbug.com/651242 is fixed. | 281 // TODO(oshima): Remove this when crbug.com/651242 is fixed. |
| 279 bool activating_ = false; | 282 bool activating_ = false; |
| 280 | 283 |
| 281 std::unique_ptr<KeyEventWatcher> key_event_watcher_; | 284 std::unique_ptr<KeyEventWatcher> key_event_watcher_; |
| 282 | 285 |
| 283 std::unique_ptr<ActivationObserver> activation_observer_; | 286 std::unique_ptr<ActivationObserver> activation_observer_; |
| 284 | 287 |
| 285 DISALLOW_COPY_AND_ASSIGN(SystemTray); | 288 DISALLOW_COPY_AND_ASSIGN(SystemTray); |
| 286 }; | 289 }; |
| 287 | 290 |
| 288 } // namespace ash | 291 } // namespace ash |
| 289 | 292 |
| 290 #endif // ASH_COMMON_SYSTEM_TRAY_SYSTEM_TRAY_H_ | 293 #endif // ASH_COMMON_SYSTEM_TRAY_SYSTEM_TRAY_H_ |
| OLD | NEW |