OLD | NEW |
---|---|
(Empty) | |
1 // Copyright 2015 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_TEST_TRAY_CAST_TEST_API_H_ | |
6 #define ASH_TEST_TRAY_CAST_TEST_API_H_ | |
7 | |
8 #include <string> | |
9 | |
10 #include "ash/ash_export.h" | |
11 #include "ash/system/cast/tray_cast.h" | |
12 | |
13 namespace ash { | |
14 | |
15 class ASH_EXPORT TrayCastTestAPI { | |
16 public: | |
17 explicit TrayCastTestAPI(TrayCast* tray_cast); | |
18 ~TrayCastTestAPI(); | |
19 | |
20 bool IsTrayInitialized() const; | |
21 bool IsTrayVisible() const; | |
22 | |
23 // IsTrayCastViewVisible returns true if the active casting view is | |
24 // visible, ie, the TrayCast believes we are casting. | |
25 // IsTraySelectViewVisible returns true when the view for selecting a | |
26 // receiver is active, ie, the TrayCast believes we are not casting. | |
27 bool IsTrayCastViewVisible() const; | |
28 bool IsTraySelectViewVisible() const; | |
29 | |
30 // Start a new cast to the given receiver. | |
31 void StartCast(const std::string& receiver_id); | |
32 void StopCast(); | |
33 | |
34 // Exposed callback to update the casting state. The test code needs to call | |
35 // this function manually, as there is no actual casting going on. In a real | |
36 // environment, this method is invoked by the casting system in Chrome. | |
37 void OnCastingSessionStartedOrStopped(bool is_casting); | |
38 | |
39 private: | |
40 TrayCast* tray_cast_; | |
achuithb
2015/07/20 22:28:26
nit: add // not owned.
jdufault
2015/07/20 22:39:57
Done.
| |
41 | |
42 DISALLOW_COPY_AND_ASSIGN(TrayCastTestAPI); | |
43 }; | |
44 | |
45 } // namespace ash | |
46 | |
47 #endif // ASH_TEST_TRAY_CAST_TEST_API_H_ | |
OLD | NEW |