| 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/router/discovery/media_sink_internal.h" |
| 16 #include "chrome/browser/media/router/issue.h" | 17 #include "chrome/browser/media/router/issue.h" |
| 17 #include "chrome/browser/media/router/media_route.h" | 18 #include "chrome/browser/media/router/media_route.h" |
| 18 #include "chrome/browser/media/router/media_sink.h" | 19 #include "chrome/browser/media/router/media_sink.h" |
| 19 #include "chrome/browser/media/router/media_source.h" | 20 #include "chrome/browser/media/router/media_source.h" |
| 20 #include "chrome/browser/media/router/route_message_observer.h" | 21 #include "chrome/browser/media/router/route_message_observer.h" |
| 21 #include "components/keyed_service/core/keyed_service.h" | 22 #include "components/keyed_service/core/keyed_service.h" |
| 22 #include "content/public/browser/presentation_service_delegate.h" | 23 #include "content/public/browser/presentation_service_delegate.h" |
| 23 | 24 |
| 24 namespace content { | 25 namespace content { |
| 25 class WebContents; | 26 class WebContents; |
| (...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 164 // the user has no domain or is not signed in. |sink_callback| will be called | 165 // the user has no domain or is not signed in. |sink_callback| will be called |
| 165 // either with the ID of the new sink when it is found or with an empty string | 166 // either with the ID of the new sink when it is found or with an empty string |
| 166 // if no sink was found. | 167 // if no sink was found. |
| 167 virtual void SearchSinks( | 168 virtual void SearchSinks( |
| 168 const MediaSink::Id& sink_id, | 169 const MediaSink::Id& sink_id, |
| 169 const MediaSource::Id& source_id, | 170 const MediaSource::Id& source_id, |
| 170 const std::string& search_input, | 171 const std::string& search_input, |
| 171 const std::string& domain, | 172 const std::string& domain, |
| 172 const MediaSinkSearchResponseCallback& sink_callback) = 0; | 173 const MediaSinkSearchResponseCallback& sink_callback) = 0; |
| 173 | 174 |
| 175 // Notifies the Media Router that the list of MediaSinks discovered by a |
| 176 // MediaSinkService has been updated. |
| 177 // |provider_name|: Name of the MediaSinkService providing the sinks. |
| 178 // |sinks|: sinks discovered by MediaSinkService. |
| 179 virtual void ProvideSinks(const std::string& provider_name, |
| 180 const std::vector<MediaSinkInternal>& sinks) = 0; |
| 181 |
| 174 // Adds |callback| to listen for state changes for presentation connected to | 182 // Adds |callback| to listen for state changes for presentation connected to |
| 175 // |route_id|. The returned Subscription object is owned by the caller. | 183 // |route_id|. The returned Subscription object is owned by the caller. |
| 176 // |callback| will be invoked whenever there are state changes, until the | 184 // |callback| will be invoked whenever there are state changes, until the |
| 177 // caller destroys the Subscription object. | 185 // caller destroys the Subscription object. |
| 178 virtual std::unique_ptr<PresentationConnectionStateSubscription> | 186 virtual std::unique_ptr<PresentationConnectionStateSubscription> |
| 179 AddPresentationConnectionStateChangedCallback( | 187 AddPresentationConnectionStateChangedCallback( |
| 180 const MediaRoute::Id& route_id, | 188 const MediaRoute::Id& route_id, |
| 181 const content::PresentationConnectionStateChangedCallback& callback) = 0; | 189 const content::PresentationConnectionStateChangedCallback& callback) = 0; |
| 182 | 190 |
| 183 // Called when the incognito profile for this instance is being shut down. | 191 // Called when the incognito profile for this instance is being shut down. |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 244 | 252 |
| 245 // Unregisters a previously registered RouteMessagesObserver. |observer| will | 253 // Unregisters a previously registered RouteMessagesObserver. |observer| will |
| 246 // stop receiving further updates. | 254 // stop receiving further updates. |
| 247 virtual void UnregisterRouteMessageObserver( | 255 virtual void UnregisterRouteMessageObserver( |
| 248 RouteMessageObserver* observer) = 0; | 256 RouteMessageObserver* observer) = 0; |
| 249 }; | 257 }; |
| 250 | 258 |
| 251 } // namespace media_router | 259 } // namespace media_router |
| 252 | 260 |
| 253 #endif // CHROME_BROWSER_MEDIA_ROUTER_MEDIA_ROUTER_H_ | 261 #endif // CHROME_BROWSER_MEDIA_ROUTER_MEDIA_ROUTER_H_ |
| OLD | NEW |