Switch global error menu icon to vectorized MD asset
[chromium-blink-merge.git] / ash / test / tray_cast_test_api.h
blob67d699c786ceb08838f8bdc0955f4773dd2d5784
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.
5 #ifndef ASH_TEST_TRAY_CAST_TEST_API_H_
6 #define ASH_TEST_TRAY_CAST_TEST_API_H_
8 #include <string>
10 #include "ash/ash_export.h"
11 #include "ash/system/cast/tray_cast.h"
13 namespace ash {
15 class TrayCastTestAPI {
16 public:
17 explicit TrayCastTestAPI(TrayCast* tray_cast);
18 ~TrayCastTestAPI();
20 bool IsTrayInitialized() const;
21 bool IsTrayVisible() const;
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;
30 // Start a new cast to the given receiver.
31 void StartCast(const std::string& receiver_id);
32 void StopCast();
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);
39 private:
40 bool IsViewDrawn(TrayCast::ChildViewId id) const;
42 // Not owned.
43 TrayCast* tray_cast_;
45 DISALLOW_COPY_AND_ASSIGN(TrayCastTestAPI);
48 } // namespace ash
50 #endif // ASH_TEST_TRAY_CAST_TEST_API_H_