Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(47)

Side by Side Diff: chrome/browser/media/router/test_helper.h

Issue 1415103006: Non-Local Join for Media Router and Presentation API (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Review Fixes Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 void(const mojo::String& media_route_id, 114 void(const mojo::String& media_route_id,
115 const std::vector<uint8>& data, 115 const std::vector<uint8>& data,
116 const SendRouteMessageCallback& callback)); 116 const SendRouteMessageCallback& callback));
117 MOCK_METHOD2(ListenForRouteMessages, 117 MOCK_METHOD2(ListenForRouteMessages,
118 void(const mojo::String& route_id, 118 void(const mojo::String& route_id,
119 const ListenForRouteMessagesCallback& callback)); 119 const ListenForRouteMessagesCallback& callback));
120 MOCK_METHOD1(StopListeningForRouteMessages, 120 MOCK_METHOD1(StopListeningForRouteMessages,
121 void(const mojo::String& route_id)); 121 void(const mojo::String& route_id));
122 MOCK_METHOD1(OnPresentationSessionDetached, 122 MOCK_METHOD1(OnPresentationSessionDetached,
123 void(const mojo::String& route_id)); 123 void(const mojo::String& route_id));
124 MOCK_METHOD0(StartObservingMediaRoutes, void()); 124 MOCK_METHOD1(StartObservingMediaRoutes, void(const mojo::String& source));
125 MOCK_METHOD0(StopObservingMediaRoutes, void()); 125 MOCK_METHOD1(StopObservingMediaRoutes, void(const mojo::String& source));
126 126
127 private: 127 private:
128 DISALLOW_COPY_AND_ASSIGN(MockMediaRouteProvider); 128 DISALLOW_COPY_AND_ASSIGN(MockMediaRouteProvider);
129 }; 129 };
130 130
131 class MockMediaSinksObserver : public MediaSinksObserver { 131 class MockMediaSinksObserver : public MediaSinksObserver {
132 public: 132 public:
133 MockMediaSinksObserver(MediaRouter* router, const MediaSource& source); 133 MockMediaSinksObserver(MediaRouter* router, const MediaSource& source);
134 ~MockMediaSinksObserver() override; 134 ~MockMediaSinksObserver() override;
135 135
136 MOCK_METHOD1(OnSinksReceived, void(const std::vector<MediaSink>& sinks)); 136 MOCK_METHOD1(OnSinksReceived, void(const std::vector<MediaSink>& sinks));
137 }; 137 };
138 138
139 class MockMediaRoutesObserver : public MediaRoutesObserver { 139 class MockMediaRoutesObserver : public MediaRoutesObserver {
140 public: 140 public:
141 explicit MockMediaRoutesObserver(MediaRouter* router); 141 explicit MockMediaRoutesObserver(MediaRouter* router,
142 const MediaSource::Id source_id = std::string(""));
142 ~MockMediaRoutesObserver(); 143 ~MockMediaRoutesObserver();
143 144
144 MOCK_METHOD1(OnRoutesUpdated, void(const std::vector<MediaRoute>& sinks)); 145 MOCK_METHOD2(OnRoutesUpdated, void(const std::vector<MediaRoute>& routes,
146 const std::vector<MediaRoute::Id>& joinable_route_ids));
145 }; 147 };
146 148
147 class MockEventPageTracker : public extensions::EventPageTracker { 149 class MockEventPageTracker : public extensions::EventPageTracker {
148 public: 150 public:
149 MockEventPageTracker(); 151 MockEventPageTracker();
150 ~MockEventPageTracker(); 152 ~MockEventPageTracker();
151 153
152 MOCK_METHOD1(IsEventPageSuspended, bool(const std::string& extension_id)); 154 MOCK_METHOD1(IsEventPageSuspended, bool(const std::string& extension_id));
153 MOCK_METHOD2(WakeEventPage, 155 MOCK_METHOD2(WakeEventPage,
154 bool(const std::string& extension_id, 156 bool(const std::string& extension_id,
155 const base::Callback<void(bool)>& callback)); 157 const base::Callback<void(bool)>& callback));
156 }; 158 };
157 159
158 } // namespace media_router 160 } // namespace media_router
159 161
160 #endif // CHROME_BROWSER_MEDIA_ROUTER_TEST_HELPER_H_ 162 #endif // CHROME_BROWSER_MEDIA_ROUTER_TEST_HELPER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698