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_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 Loading... | |
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 // Register/UnRegister a CastRemotingConnector with the |tab_id|. For a given | |
imcheng
2017/06/22 01:13:27
Registers/unregisters
xjz
2017/06/23 19:02:41
Done.
| |
204 // |tab_id|, only one CastRemotingConnector can be registered. The registered | |
205 // 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( | |
imcheng
2017/06/22 01:13:27
s/UnRegister/Unregister
xjz
2017/06/23 19:02:41
Done.
| |
210 int32_t tab_id, | |
211 CastRemotingConnector* remoting_source) = 0; | |
212 | |
202 private: | 213 private: |
203 friend class IssuesObserver; | 214 friend class IssuesObserver; |
204 friend class MediaSinksObserver; | 215 friend class MediaSinksObserver; |
205 friend class MediaRouteController; | 216 friend class MediaRouteController; |
206 friend class MediaRoutesObserver; | 217 friend class MediaRoutesObserver; |
207 friend class PresentationConnectionStateObserver; | 218 friend class PresentationConnectionStateObserver; |
208 friend class RouteMessageObserver; | 219 friend class RouteMessageObserver; |
209 | 220 |
210 // The following functions are called by friend Observer classes above. | 221 // The following functions are called by friend Observer classes above. |
211 | 222 |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
262 // Removes the MediaRouteController for |route_id| from the list of | 273 // Removes the MediaRouteController for |route_id| from the list of |
263 // controllers held by |this|. Called by MediaRouteController when it is | 274 // controllers held by |this|. Called by MediaRouteController when it is |
264 // invalidated. | 275 // invalidated. |
265 virtual void DetachRouteController(const MediaRoute::Id& route_id, | 276 virtual void DetachRouteController(const MediaRoute::Id& route_id, |
266 MediaRouteController* controller) = 0; | 277 MediaRouteController* controller) = 0; |
267 }; | 278 }; |
268 | 279 |
269 } // namespace media_router | 280 } // namespace media_router |
270 | 281 |
271 #endif // CHROME_BROWSER_MEDIA_ROUTER_MEDIA_ROUTER_H_ | 282 #endif // CHROME_BROWSER_MEDIA_ROUTER_MEDIA_ROUTER_H_ |
OLD | NEW |