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

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

Issue 2931643002: chromeos: Introduce ash::SystemTrayTestApi (Closed)
Patch Set: review comments Created 3 years, 6 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/supervised/tray_supervised_user_unittest.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> 8 #include <map>
9 #include <memory> 9 #include <memory>
10 #include <vector> 10 #include <vector>
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 // views::TrayBubbleView::Delegate: 132 // views::TrayBubbleView::Delegate:
133 void BubbleViewDestroyed() override; 133 void BubbleViewDestroyed() override;
134 void OnMouseEnteredView() override; 134 void OnMouseEnteredView() override;
135 void OnMouseExitedView() override; 135 void OnMouseExitedView() override;
136 base::string16 GetAccessibleNameForBubble() override; 136 base::string16 GetAccessibleNameForBubble() override;
137 void HideBubble(const views::TrayBubbleView* bubble_view) override; 137 void HideBubble(const views::TrayBubbleView* bubble_view) override;
138 138
139 ScreenTrayItem* GetScreenShareItem() { return screen_share_tray_item_; } 139 ScreenTrayItem* GetScreenShareItem() { return screen_share_tray_item_; }
140 ScreenTrayItem* GetScreenCaptureItem() { return screen_capture_tray_item_; } 140 ScreenTrayItem* GetScreenCaptureItem() { return screen_capture_tray_item_; }
141 141
142 TrayAccessibility* GetTrayAccessibilityForTest() {
143 return tray_accessibility_;
144 }
145
146 // TODO(jamescook): Add a SystemTrayTestApi instead of these methods.
147 TrayCast* GetTrayCastForTesting() const;
148 TrayEnterprise* GetTrayEnterpriseForTesting() const;
149 TrayNetwork* GetTrayNetworkForTesting() const;
150 TraySessionLengthLimit* GetTraySessionLengthLimitForTesting() const;
151 TraySupervisedUser* GetTraySupervisedUserForTesting() const;
152 TraySystemInfo* GetTraySystemInfoForTesting() const;
153 TrayTiles* GetTrayTilesForTesting() const;
154
155 // Activates the system tray bubble. 142 // Activates the system tray bubble.
156 void ActivateBubble(); 143 void ActivateBubble();
157 144
158 private: 145 private:
146 friend class SystemTrayTestApi;
159 class ActivationObserver; 147 class ActivationObserver;
160 148
161 // Closes the bubble. Used to bind as a KeyEventWatcher::KeyEventCallback. 149 // Closes the bubble. Used to bind as a KeyEventWatcher::KeyEventCallback.
162 void CloseBubble(const ui::KeyEvent& key_event); 150 void CloseBubble(const ui::KeyEvent& key_event);
163 151
164 // Activates the bubble and starts key navigation with the |key_event|. 152 // Activates the bubble and starts key navigation with the |key_event|.
165 void ActivateAndStartNavigation(const ui::KeyEvent& key_event); 153 void ActivateAndStartNavigation(const ui::KeyEvent& key_event);
166 154
167 // Creates the key event watcher. See |ShowItems()| for why key events are 155 // Creates the key event watcher. See |ShowItems()| for why key events are
168 // observed. 156 // observed.
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
247 std::unique_ptr<KeyEventWatcher> key_event_watcher_; 235 std::unique_ptr<KeyEventWatcher> key_event_watcher_;
248 236
249 std::unique_ptr<ActivationObserver> activation_observer_; 237 std::unique_ptr<ActivationObserver> activation_observer_;
250 238
251 DISALLOW_COPY_AND_ASSIGN(SystemTray); 239 DISALLOW_COPY_AND_ASSIGN(SystemTray);
252 }; 240 };
253 241
254 } // namespace ash 242 } // namespace ash
255 243
256 #endif // ASH_SYSTEM_TRAY_SYSTEM_TRAY_H_ 244 #endif // ASH_SYSTEM_TRAY_SYSTEM_TRAY_H_
OLDNEW
« no previous file with comments | « ash/system/supervised/tray_supervised_user_unittest.cc ('k') | ash/system/tray/system_tray.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698