OLD | NEW |
---|---|
(Empty) | |
1 // Copyright 2017 The Chromium Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef ASH_SYSTEM_TRAY_SYSTEM_TRAY_TEST_API_H_ | |
6 #define ASH_SYSTEM_TRAY_SYSTEM_TRAY_TEST_API_H_ | |
7 | |
8 #include "ash/system/tray/system_tray.h" | |
9 #include "base/macros.h" | |
10 | |
11 namespace ash { | |
12 | |
13 // Use by tests to access private state of SystemTray. | |
14 class SystemTrayTestApi { | |
15 public: | |
16 explicit SystemTrayTestApi(SystemTray* tray) : tray_(tray) {} | |
17 ~SystemTrayTestApi() = default; | |
18 | |
19 TrayAccessibility* tray_accessibility() { return tray_->tray_accessibility_; } | |
20 TrayCast* tray_cast() { return tray_->tray_cast_; } | |
21 TrayEnterprise* tray_enterprise() { return tray_->tray_enterprise_; } | |
22 TrayNetwork* tray_network() { return tray_->tray_network_; } | |
23 TraySupervisedUser* tray_supervised_user() { | |
24 return tray_->tray_supervised_user_; | |
25 } | |
26 TraySystemInfo* tray_system_info() { return tray_->tray_system_info_; } | |
27 TrayTiles* tray_tiles() { return tray_->tray_tiles_; } | |
28 | |
29 private: | |
30 SystemTray* tray_; | |
xiyuan
2017/06/07 16:29:08
nit: SystemTray* const since |tray_| should never
James Cook
2017/06/07 16:35:53
Done.
| |
31 | |
32 DISALLOW_COPY_AND_ASSIGN(SystemTrayTestApi); | |
33 }; | |
34 | |
35 } // namespace ash | |
36 | |
37 #endif // ASH_SYSTEM_TRAY_SYSTEM_TRAY_TEST_API_H_ | |
OLD | NEW |