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

Unified Diff: ash/system/cast/tray_cast_testing_interface.h

Issue 1218653006: Add support code to test the cast system tray item. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@lkgr
Patch Set: Created 5 years, 5 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/cast/tray_cast.cc ('k') | ash/system/tray/system_tray.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_
« no previous file with comments | « ash/system/cast/tray_cast.cc ('k') | ash/system/tray/system_tray.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698