Index: ash/system/cast/tray_cast_testing_interface.h |
diff --git a/ash/system/cast/tray_cast_testing_interface.h b/ash/system/cast/tray_cast_testing_interface.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..af5f604d87ec5637ca6fe2a6ea92c6ee876f0e49 |
--- /dev/null |
+++ b/ash/system/cast/tray_cast_testing_interface.h |
@@ -0,0 +1,39 @@ |
+// Copyright 2015 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_CAST_TRAY_CAST_TESTING_INTERFACE_H_ |
+#define ASH_SYSTEM_CAST_TRAY_CAST_TESTING_INTERFACE_H_ |
+ |
+#include <string> |
+ |
+#include "ash/ash_export.h" |
+ |
+namespace ash { |
+ |
+// The testing API for TrayCast. |
+class ASH_EXPORT TrayCastTestingInterface { |
oshima
2015/07/17 20:20:59
We usually put the test API in ash/test, and make
|
+ public: |
+ virtual bool IsTrayInitializedForTest() const = 0; |
+ virtual bool IsTrayVisibleForTest() const = 0; |
+ |
+ // IsTrayCastViewVisibleForTest returns true if the active casting view is |
+ // visible, ie, the TrayCast believes we are casting. |
+ // IsTraySelectViewVisibleForTest returns true when the view for selecting a |
+ // receiver is active, ie, the TrayCast believes we are not casting. |
+ virtual bool IsTrayCastViewVisibleForTest() const = 0; |
+ virtual bool IsTraySelectViewVisibleForTest() const = 0; |
+ |
+ // Start a new cast to the given receiver. |
+ virtual void StartCastForTest(const std::string& receiver_id) = 0; |
+ virtual void StopCastForTest() = 0; |
+ |
+ // Exposed callback to update the casting state. The test code needs to call |
+ // this function manually, as there is no actual casting going on. In a real |
+ // environment, this method is invoked by the casting system in Chrome. |
+ virtual void OnCastingSessionStartedOrStopped(bool is_casting) = 0; |
+}; |
+ |
+} // namespace ash |
+ |
+#endif // ASH_SYSTEM_CAST_TRAY_CAST_TESTING_INTERFACE_H_ |