Index: ash/system/cast/tray_cast.h |
diff --git a/ash/system/cast/tray_cast.h b/ash/system/cast/tray_cast.h |
index 04a4bc28a802aebee55c40818e4a36ed0e16a31e..05a4725bb87ac82215243c38844fbb1de869e1f4 100644 |
--- a/ash/system/cast/tray_cast.h |
+++ b/ash/system/cast/tray_cast.h |
@@ -5,6 +5,7 @@ |
#ifndef ASH_SYSTEM_CAST_TRAY_CAST_H_ |
#define ASH_SYSTEM_CAST_TRAY_CAST_H_ |
+#include "ash/ash_export.h" |
#include "ash/cast_config_delegate.h" |
#include "ash/shell_observer.h" |
#include "ash/system/tray/system_tray_item.h" |
@@ -18,12 +19,38 @@ class CastDetailedView; |
class CastDuplexView; |
} // namespace tray |
-class TrayCast : public SystemTrayItem, public ShellObserver { |
+class ASH_EXPORT TrayCastTestMethods { |
achuithb
2015/07/14 18:06:39
TrayCastTestingInterface?
Does it compile if you
jdufault
2015/07/15 17:35:01
Done.
I am unable to get it to compile moving it
achuithb
2015/07/15 18:56:47
That's what I would expect if the compiler refuses
jdufault
2015/07/15 20:08:42
Yes; I would have been surprised if it worked as w
|
+ public: |
+ virtual bool IsTrayInitializedForTest() const = 0; |
+ virtual bool IsTrayVisibleForTest() const = 0; |
+ virtual bool IsTrayCastViewVisibleForTest() const = 0; |
achuithb
2015/07/14 18:06:39
Maybe add a comment explaining the different betwe
jdufault
2015/07/15 17:35:01
Done.
achuithb
2015/07/15 18:56:47
I meant the difference between IsTrayCastViewVisib
jdufault
2015/07/15 20:08:42
Oops; done.
|
+ virtual bool IsTraySelectViewVisibleForTest() const = 0; |
+ // Start a new cast to the given receiver. |
+ virtual void StartCastForTest(const std::string& 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; |
+}; |
+ |
+class ASH_EXPORT TrayCast : public SystemTrayItem, |
+ public ShellObserver, |
+ public TrayCastTestMethods { |
public: |
explicit TrayCast(SystemTray* system_tray); |
~TrayCast() override; |
private: |
+ // Overridden from TrayCastTestMethods: |
achuithb
2015/07/14 18:06:39
use a period to be consistent with the rest of thi
jdufault
2015/07/15 17:35:01
Done.
|
+ bool IsTrayInitializedForTest() const override; |
+ bool IsTrayVisibleForTest() const override; |
+ bool IsTrayCastViewVisibleForTest() const override; |
+ bool IsTraySelectViewVisibleForTest() const override; |
+ void StartCastForTest(const std::string& id) override; |
+ void StopCastForTest() override; |
+ |
// Overridden from SystemTrayItem. |
views::View* CreateTrayView(user::LoginStatus status) override; |
views::View* CreateDefaultView(user::LoginStatus status) override; |