Chromium Code Reviews| 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_SYSTEM_CAST_TRAY_CAST_TESTING_INTERFACE_H_ | |
| 6 #define ASH_SYSTEM_CAST_TRAY_CAST_TESTING_INTERFACE_H_ | |
| 7 | |
| 8 #include <string> | |
| 9 | |
| 10 #include "ash/ash_export.h" | |
| 11 | |
| 12 namespace ash { | |
| 13 | |
| 14 // The testing API for TrayCast. | |
| 15 class ASH_EXPORT TrayCastTestingInterface { | |
|
oshima
2015/07/17 20:20:59
We usually put the test API in ash/test, and make
| |
| 16 public: | |
| 17 virtual bool IsTrayInitializedForTest() const = 0; | |
| 18 virtual bool IsTrayVisibleForTest() const = 0; | |
| 19 | |
| 20 // IsTrayCastViewVisibleForTest returns true if the active casting view is | |
| 21 // visible, ie, the TrayCast believes we are casting. | |
| 22 // IsTraySelectViewVisibleForTest returns true when the view for selecting a | |
| 23 // receiver is active, ie, the TrayCast believes we are not casting. | |
| 24 virtual bool IsTrayCastViewVisibleForTest() const = 0; | |
| 25 virtual bool IsTraySelectViewVisibleForTest() const = 0; | |
| 26 | |
| 27 // Start a new cast to the given receiver. | |
| 28 virtual void StartCastForTest(const std::string& receiver_id) = 0; | |
| 29 virtual void StopCastForTest() = 0; | |
| 30 | |
| 31 // Exposed callback to update the casting state. The test code needs to call | |
| 32 // this function manually, as there is no actual casting going on. In a real | |
| 33 // environment, this method is invoked by the casting system in Chrome. | |
| 34 virtual void OnCastingSessionStartedOrStopped(bool is_casting) = 0; | |
| 35 }; | |
| 36 | |
| 37 } // namespace ash | |
| 38 | |
| 39 #endif // ASH_SYSTEM_CAST_TRAY_CAST_TESTING_INTERFACE_H_ | |
| OLD | NEW |