| 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_ |
| 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> |
| (...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 131 // views::TrayBubbleView::Delegate: | 131 // views::TrayBubbleView::Delegate: |
| 132 void BubbleViewDestroyed() override; | 132 void BubbleViewDestroyed() override; |
| 133 void OnMouseEnteredView() override; | 133 void OnMouseEnteredView() override; |
| 134 void OnMouseExitedView() override; | 134 void OnMouseExitedView() override; |
| 135 base::string16 GetAccessibleNameForBubble() override; | 135 base::string16 GetAccessibleNameForBubble() override; |
| 136 void HideBubble(const views::TrayBubbleView* bubble_view) override; | 136 void HideBubble(const views::TrayBubbleView* bubble_view) override; |
| 137 | 137 |
| 138 ScreenTrayItem* GetScreenShareItem() { return screen_share_tray_item_; } | 138 ScreenTrayItem* GetScreenShareItem() { return screen_share_tray_item_; } |
| 139 ScreenTrayItem* GetScreenCaptureItem() { return screen_capture_tray_item_; } | 139 ScreenTrayItem* GetScreenCaptureItem() { return screen_capture_tray_item_; } |
| 140 | 140 |
| 141 TrayAccessibility* GetTrayAccessibilityForTest() { | |
| 142 return tray_accessibility_; | |
| 143 } | |
| 144 | |
| 145 // TODO(jamescook): Add a SystemTrayTestApi instead of these methods. | |
| 146 TrayCast* GetTrayCastForTesting() const; | |
| 147 TrayEnterprise* GetTrayEnterpriseForTesting() const; | |
| 148 TrayNetwork* GetTrayNetworkForTesting() const; | |
| 149 TraySupervisedUser* GetTraySupervisedUserForTesting() const; | |
| 150 TraySystemInfo* GetTraySystemInfoForTesting() const; | |
| 151 TrayTiles* GetTrayTilesForTesting() const; | |
| 152 | |
| 153 // Activates the system tray bubble. | 141 // Activates the system tray bubble. |
| 154 void ActivateBubble(); | 142 void ActivateBubble(); |
| 155 | 143 |
| 156 private: | 144 private: |
| 145 friend class SystemTrayTestApi; |
| 157 class ActivationObserver; | 146 class ActivationObserver; |
| 158 | 147 |
| 159 // Closes the bubble. Used to bind as a KeyEventWatcher::KeyEventCallback. | 148 // Closes the bubble. Used to bind as a KeyEventWatcher::KeyEventCallback. |
| 160 void CloseBubble(const ui::KeyEvent& key_event); | 149 void CloseBubble(const ui::KeyEvent& key_event); |
| 161 | 150 |
| 162 // Activates the bubble and starts key navigation with the |key_event|. | 151 // Activates the bubble and starts key navigation with the |key_event|. |
| 163 void ActivateAndStartNavigation(const ui::KeyEvent& key_event); | 152 void ActivateAndStartNavigation(const ui::KeyEvent& key_event); |
| 164 | 153 |
| 165 // Creates the key event watcher. See |ShowItems()| for why key events are | 154 // Creates the key event watcher. See |ShowItems()| for why key events are |
| 166 // observed. | 155 // observed. |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 244 std::unique_ptr<KeyEventWatcher> key_event_watcher_; | 233 std::unique_ptr<KeyEventWatcher> key_event_watcher_; |
| 245 | 234 |
| 246 std::unique_ptr<ActivationObserver> activation_observer_; | 235 std::unique_ptr<ActivationObserver> activation_observer_; |
| 247 | 236 |
| 248 DISALLOW_COPY_AND_ASSIGN(SystemTray); | 237 DISALLOW_COPY_AND_ASSIGN(SystemTray); |
| 249 }; | 238 }; |
| 250 | 239 |
| 251 } // namespace ash | 240 } // namespace ash |
| 252 | 241 |
| 253 #endif // ASH_SYSTEM_TRAY_SYSTEM_TRAY_H_ | 242 #endif // ASH_SYSTEM_TRAY_SYSTEM_TRAY_H_ |
| OLD | NEW |