Chromium Code Reviews| 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> |
| (...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 182 const content::PresentationConnectionStateChangedCallback& callback) = 0; | 182 const content::PresentationConnectionStateChangedCallback& callback) = 0; |
| 183 | 183 |
| 184 // Called when the incognito profile for this instance is being shut down. | 184 // Called when the incognito profile for this instance is being shut down. |
| 185 // This will terminate all incognito media routes. | 185 // This will terminate all incognito media routes. |
| 186 virtual void OnIncognitoProfileShutdown() = 0; | 186 virtual void OnIncognitoProfileShutdown() = 0; |
| 187 | 187 |
| 188 // Returns the media routes that currently exist. To get notified whenever | 188 // Returns the media routes that currently exist. To get notified whenever |
| 189 // there is a change to the media routes, subclass MediaRoutesObserver. | 189 // there is a change to the media routes, subclass MediaRoutesObserver. |
| 190 virtual std::vector<MediaRoute> GetCurrentRoutes() const = 0; | 190 virtual std::vector<MediaRoute> GetCurrentRoutes() const = 0; |
| 191 | 191 |
| 192 // Register |route| associated with |presentation_id| with this MediaRouter. | |
|
imcheng
2017/03/08 20:06:35
Registers
zhaobin
2017/03/09 00:34:27
Code removed.
| |
| 193 virtual void RegisterPresentationRoute(const std::string& presentation_id, | |
| 194 const MediaRoute& route) = 0; | |
| 195 | |
| 196 // Unregister media route associated with |presentation_id| with this | |
|
imcheng
2017/03/08 20:06:35
Unregisters
zhaobin
2017/03/09 00:34:27
Code removed.
| |
| 197 // MediaRouter. | |
| 198 virtual void UnregisterPresentationRoute( | |
| 199 const std::string& presentation_id) = 0; | |
| 200 | |
| 201 // Returns underlying media route associated with |presentation_id|. Returns | |
|
imcheng
2017/03/08 20:06:35
s/underlying/the
s/media route/MediaRoute
zhaobin
2017/03/09 00:34:27
Done.
| |
| 202 // nullptr if no such media route exists. | |
| 203 virtual const MediaRoute* GetPresentationRoute( | |
| 204 const std::string& presentation_id) const = 0; | |
| 205 | |
| 192 private: | 206 private: |
| 193 friend class IssuesObserver; | 207 friend class IssuesObserver; |
| 194 friend class MediaSinksObserver; | 208 friend class MediaSinksObserver; |
| 195 friend class MediaRoutesObserver; | 209 friend class MediaRoutesObserver; |
| 196 friend class PresentationConnectionStateObserver; | 210 friend class PresentationConnectionStateObserver; |
| 197 friend class RouteMessageObserver; | 211 friend class RouteMessageObserver; |
| 198 | 212 |
| 199 // The following functions are called by friend Observer classes above. | 213 // The following functions are called by friend Observer classes above. |
| 200 | 214 |
| 201 // Registers |observer| with this MediaRouter. |observer| specifies a media | 215 // Registers |observer| with this MediaRouter. |observer| specifies a media |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 245 | 259 |
| 246 // Unregisters a previously registered RouteMessagesObserver. |observer| will | 260 // Unregisters a previously registered RouteMessagesObserver. |observer| will |
| 247 // stop receiving further updates. | 261 // stop receiving further updates. |
| 248 virtual void UnregisterRouteMessageObserver( | 262 virtual void UnregisterRouteMessageObserver( |
| 249 RouteMessageObserver* observer) = 0; | 263 RouteMessageObserver* observer) = 0; |
| 250 }; | 264 }; |
| 251 | 265 |
| 252 } // namespace media_router | 266 } // namespace media_router |
| 253 | 267 |
| 254 #endif // CHROME_BROWSER_MEDIA_ROUTER_MEDIA_ROUTER_H_ | 268 #endif // CHROME_BROWSER_MEDIA_ROUTER_MEDIA_ROUTER_H_ |
| OLD | NEW |