OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CHROME_BROWSER_MEDIA_ROUTER_TEST_HELPER_H_ | 5 #ifndef CHROME_BROWSER_MEDIA_ROUTER_TEST_HELPER_H_ |
6 #define CHROME_BROWSER_MEDIA_ROUTER_TEST_HELPER_H_ | 6 #define CHROME_BROWSER_MEDIA_ROUTER_TEST_HELPER_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
138 }; | 138 }; |
139 | 139 |
140 class MockMediaRoutesObserver : public MediaRoutesObserver { | 140 class MockMediaRoutesObserver : public MediaRoutesObserver { |
141 public: | 141 public: |
142 explicit MockMediaRoutesObserver(MediaRouter* router); | 142 explicit MockMediaRoutesObserver(MediaRouter* router); |
143 ~MockMediaRoutesObserver() override; | 143 ~MockMediaRoutesObserver() override; |
144 | 144 |
145 MOCK_METHOD1(OnRoutesUpdated, void(const std::vector<MediaRoute>& sinks)); | 145 MOCK_METHOD1(OnRoutesUpdated, void(const std::vector<MediaRoute>& sinks)); |
146 }; | 146 }; |
147 | 147 |
148 class MockPresentationConnectionStateObserver | |
149 : public PresentationConnectionStateObserver { | |
150 public: | |
151 MockPresentationConnectionStateObserver(MediaRouter* router, | |
152 const MediaRoute::Id& route_id); | |
153 ~MockPresentationConnectionStateObserver() override; | |
154 | |
155 MOCK_METHOD1(OnStateChanged, | |
156 void(content::PresentationConnectionState state)); | |
157 }; | |
158 | |
159 class MockEventPageTracker : public extensions::EventPageTracker { | 148 class MockEventPageTracker : public extensions::EventPageTracker { |
160 public: | 149 public: |
161 MockEventPageTracker(); | 150 MockEventPageTracker(); |
162 ~MockEventPageTracker(); | 151 ~MockEventPageTracker(); |
163 | 152 |
164 MOCK_METHOD1(IsEventPageSuspended, bool(const std::string& extension_id)); | 153 MOCK_METHOD1(IsEventPageSuspended, bool(const std::string& extension_id)); |
165 MOCK_METHOD2(WakeEventPage, | 154 MOCK_METHOD2(WakeEventPage, |
166 bool(const std::string& extension_id, | 155 bool(const std::string& extension_id, |
167 const base::Callback<void(bool)>& callback)); | 156 const base::Callback<void(bool)>& callback)); |
168 }; | 157 }; |
169 | 158 |
170 } // namespace media_router | 159 } // namespace media_router |
171 | 160 |
172 #endif // CHROME_BROWSER_MEDIA_ROUTER_TEST_HELPER_H_ | 161 #endif // CHROME_BROWSER_MEDIA_ROUTER_TEST_HELPER_H_ |
OLD | NEW |