| 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 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 174 // caller destroys the Subscription object. | 174 // caller destroys the Subscription object. |
| 175 virtual std::unique_ptr<PresentationConnectionStateSubscription> | 175 virtual std::unique_ptr<PresentationConnectionStateSubscription> |
| 176 AddPresentationConnectionStateChangedCallback( | 176 AddPresentationConnectionStateChangedCallback( |
| 177 const MediaRoute::Id& route_id, | 177 const MediaRoute::Id& route_id, |
| 178 const content::PresentationConnectionStateChangedCallback& callback) = 0; | 178 const content::PresentationConnectionStateChangedCallback& callback) = 0; |
| 179 | 179 |
| 180 // Called when the incognito profile for this instance is being shut down. | 180 // Called when the incognito profile for this instance is being shut down. |
| 181 // This will terminate all incognito media routes. | 181 // This will terminate all incognito media routes. |
| 182 virtual void OnIncognitoProfileShutdown() = 0; | 182 virtual void OnIncognitoProfileShutdown() = 0; |
| 183 | 183 |
| 184 // Returns the media routes that currently exist. To get notified whenever |
| 185 // there is a change to the media routes, subclass MediaRoutesObserver. |
| 186 virtual std::vector<MediaRoute> GetCurrentRoutes() const = 0; |
| 187 |
| 184 private: | 188 private: |
| 185 friend class IssuesObserver; | 189 friend class IssuesObserver; |
| 186 friend class MediaSinksObserver; | 190 friend class MediaSinksObserver; |
| 187 friend class MediaRoutesObserver; | 191 friend class MediaRoutesObserver; |
| 188 friend class PresentationConnectionStateObserver; | 192 friend class PresentationConnectionStateObserver; |
| 189 friend class RouteMessageObserver; | 193 friend class RouteMessageObserver; |
| 190 | 194 |
| 191 // The following functions are called by friend Observer classes above. | 195 // The following functions are called by friend Observer classes above. |
| 192 | 196 |
| 193 // Registers |observer| with this MediaRouter. |observer| specifies a media | 197 // Registers |observer| with this MediaRouter. |observer| specifies a media |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 237 | 241 |
| 238 // Unregisters a previously registered RouteMessagesObserver. |observer| will | 242 // Unregisters a previously registered RouteMessagesObserver. |observer| will |
| 239 // stop receiving further updates. | 243 // stop receiving further updates. |
| 240 virtual void UnregisterRouteMessageObserver( | 244 virtual void UnregisterRouteMessageObserver( |
| 241 RouteMessageObserver* observer) = 0; | 245 RouteMessageObserver* observer) = 0; |
| 242 }; | 246 }; |
| 243 | 247 |
| 244 } // namespace media_router | 248 } // namespace media_router |
| 245 | 249 |
| 246 #endif // CHROME_BROWSER_MEDIA_ROUTER_MEDIA_ROUTER_H_ | 250 #endif // CHROME_BROWSER_MEDIA_ROUTER_MEDIA_ROUTER_H_ |
| OLD | NEW |