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

Unified Diff: ash/system/tray/system_tray_test_api.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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ash/system/tray/system_tray.cc ('k') | ash/test/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/system/tray/system_tray_test_api.h
diff --git a/ash/system/tray/system_tray_test_api.h b/ash/system/tray/system_tray_test_api.h
new file mode 100644
index 0000000000000000000000000000000000000000..4dfed95c520a2e496882e3adc6e1cb2a695f1d25
--- /dev/null
+++ b/ash/system/tray/system_tray_test_api.h
@@ -0,0 +1,40 @@
+// Copyright 2017 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef ASH_SYSTEM_TRAY_SYSTEM_TRAY_TEST_API_H_
+#define ASH_SYSTEM_TRAY_SYSTEM_TRAY_TEST_API_H_
+
+#include "ash/system/tray/system_tray.h"
+#include "base/macros.h"
+
+namespace ash {
+
+// Use by tests to access private state of SystemTray.
+class SystemTrayTestApi {
+ public:
+ explicit SystemTrayTestApi(SystemTray* tray) : tray_(tray) {}
+ ~SystemTrayTestApi() = default;
+
+ TrayAccessibility* tray_accessibility() { return tray_->tray_accessibility_; }
+ TrayCast* tray_cast() { return tray_->tray_cast_; }
+ TrayEnterprise* tray_enterprise() { return tray_->tray_enterprise_; }
+ TrayNetwork* tray_network() { return tray_->tray_network_; }
+ TraySessionLengthLimit* tray_session_length_limit() {
+ return tray_->tray_session_length_limit_;
+ }
+ TraySupervisedUser* tray_supervised_user() {
+ return tray_->tray_supervised_user_;
+ }
+ TraySystemInfo* tray_system_info() { return tray_->tray_system_info_; }
+ TrayTiles* tray_tiles() { return tray_->tray_tiles_; }
+
+ private:
+ SystemTray* const tray_;
+
+ DISALLOW_COPY_AND_ASSIGN(SystemTrayTestApi);
+};
+
+} // namespace ash
+
+#endif // ASH_SYSTEM_TRAY_SYSTEM_TRAY_TEST_API_H_
« no previous file with comments | « ash/system/tray/system_tray.cc ('k') | ash/test/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698