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

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

Issue 2951523002: Media Remoting: Add mojo interfaces between browser and extension. (Closed)
Patch Set: Fix unittests. Created 3 years, 5 months 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_MEDIA_ROUTER_H_ 5 #ifndef CHROME_BROWSER_MEDIA_ROUTER_MEDIA_ROUTER_H_
6 #define CHROME_BROWSER_MEDIA_ROUTER_MEDIA_ROUTER_H_ 6 #define CHROME_BROWSER_MEDIA_ROUTER_MEDIA_ROUTER_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <string> 10 #include <string>
11 #include <vector> 11 #include <vector>
12 12
13 #include "base/callback.h" 13 #include "base/callback.h"
14 #include "base/callback_list.h" 14 #include "base/callback_list.h"
15 #include "base/time/time.h" 15 #include "base/time/time.h"
16 #include "chrome/browser/media/cast_remoting_connector.h"
16 #include "chrome/browser/media/router/route_message_observer.h" 17 #include "chrome/browser/media/router/route_message_observer.h"
17 #include "chrome/common/media_router/discovery/media_sink_internal.h" 18 #include "chrome/common/media_router/discovery/media_sink_internal.h"
18 #include "chrome/common/media_router/issue.h" 19 #include "chrome/common/media_router/issue.h"
19 #include "chrome/common/media_router/media_route.h" 20 #include "chrome/common/media_router/media_route.h"
20 #include "chrome/common/media_router/media_sink.h" 21 #include "chrome/common/media_router/media_sink.h"
21 #include "chrome/common/media_router/media_source.h" 22 #include "chrome/common/media_router/media_source.h"
22 #include "components/keyed_service/core/keyed_service.h" 23 #include "components/keyed_service/core/keyed_service.h"
23 #include "content/public/browser/presentation_service_delegate.h" 24 #include "content/public/browser/presentation_service_delegate.h"
24 25
25 namespace content { 26 namespace content {
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
192 193
193 // Returns the media routes that currently exist. To get notified whenever 194 // Returns the media routes that currently exist. To get notified whenever
194 // there is a change to the media routes, subclass MediaRoutesObserver. 195 // there is a change to the media routes, subclass MediaRoutesObserver.
195 virtual std::vector<MediaRoute> GetCurrentRoutes() const = 0; 196 virtual std::vector<MediaRoute> GetCurrentRoutes() const = 0;
196 197
197 // Returns a controller for sending media commands to a route. Returns a 198 // Returns a controller for sending media commands to a route. Returns a
198 // nullptr if no MediaRoute exists for the given |route_id|. 199 // nullptr if no MediaRoute exists for the given |route_id|.
199 virtual scoped_refptr<MediaRouteController> GetRouteController( 200 virtual scoped_refptr<MediaRouteController> GetRouteController(
200 const MediaRoute::Id& route_id) = 0; 201 const MediaRoute::Id& route_id) = 0;
201 202
203 // Registers/Unregisters a CastRemotingConnector with the |tab_id|. For a
204 // given |tab_id|, only one CastRemotingConnector can be registered. The
205 // registered CastRemotingConnector should be removed before it is destroyed.
206 virtual void RegisterRemotingSource(
207 int32_t tab_id,
208 CastRemotingConnector* remoting_source) = 0;
209 virtual void UnregisterRemotingSource(int32_t tab_id) = 0;
210
202 private: 211 private:
203 friend class IssuesObserver; 212 friend class IssuesObserver;
204 friend class MediaSinksObserver; 213 friend class MediaSinksObserver;
205 friend class MediaRouteController; 214 friend class MediaRouteController;
206 friend class MediaRoutesObserver; 215 friend class MediaRoutesObserver;
207 friend class PresentationConnectionStateObserver; 216 friend class PresentationConnectionStateObserver;
208 friend class RouteMessageObserver; 217 friend class RouteMessageObserver;
209 218
210 // The following functions are called by friend Observer classes above. 219 // The following functions are called by friend Observer classes above.
211 220
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
262 // Removes the MediaRouteController for |route_id| from the list of 271 // Removes the MediaRouteController for |route_id| from the list of
263 // controllers held by |this|. Called by MediaRouteController when it is 272 // controllers held by |this|. Called by MediaRouteController when it is
264 // invalidated. 273 // invalidated.
265 virtual void DetachRouteController(const MediaRoute::Id& route_id, 274 virtual void DetachRouteController(const MediaRoute::Id& route_id,
266 MediaRouteController* controller) = 0; 275 MediaRouteController* controller) = 0;
267 }; 276 };
268 277
269 } // namespace media_router 278 } // namespace media_router
270 279
271 #endif // CHROME_BROWSER_MEDIA_ROUTER_MEDIA_ROUTER_H_ 280 #endif // CHROME_BROWSER_MEDIA_ROUTER_MEDIA_ROUTER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698