| 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_MOJO_MEDIA_ROUTER_MOJO_IMPL_H_ | 5 #ifndef CHROME_BROWSER_MEDIA_ROUTER_MOJO_MEDIA_ROUTER_MOJO_IMPL_H_ |
| 6 #define CHROME_BROWSER_MEDIA_ROUTER_MOJO_MEDIA_ROUTER_MOJO_IMPL_H_ | 6 #define CHROME_BROWSER_MEDIA_ROUTER_MOJO_MEDIA_ROUTER_MOJO_IMPL_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <deque> | 10 #include <deque> |
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 100 const SendRouteMessageCallback& callback) override; | 100 const SendRouteMessageCallback& callback) override; |
| 101 void AddIssue(const IssueInfo& issue_info) override; | 101 void AddIssue(const IssueInfo& issue_info) override; |
| 102 void ClearIssue(const Issue::Id& issue_id) override; | 102 void ClearIssue(const Issue::Id& issue_id) override; |
| 103 void OnUserGesture() override; | 103 void OnUserGesture() override; |
| 104 void SearchSinks( | 104 void SearchSinks( |
| 105 const MediaSink::Id& sink_id, | 105 const MediaSink::Id& sink_id, |
| 106 const MediaSource::Id& source_id, | 106 const MediaSource::Id& source_id, |
| 107 const std::string& search_input, | 107 const std::string& search_input, |
| 108 const std::string& domain, | 108 const std::string& domain, |
| 109 const MediaSinkSearchResponseCallback& sink_callback) override; | 109 const MediaSinkSearchResponseCallback& sink_callback) override; |
| 110 void OnSinksDiscovered(std::unique_ptr<MediaSinkList> sinks) override; |
| 110 | 111 |
| 111 const std::string& media_route_provider_extension_id() const { | 112 const std::string& media_route_provider_extension_id() const { |
| 112 return media_route_provider_extension_id_; | 113 return media_route_provider_extension_id_; |
| 113 } | 114 } |
| 114 | 115 |
| 115 void set_instance_id_for_test(const std::string& instance_id) { | 116 void set_instance_id_for_test(const std::string& instance_id) { |
| 116 instance_id_ = instance_id; | 117 instance_id_ = instance_id; |
| 117 } | 118 } |
| 118 | 119 |
| 119 private: | 120 private: |
| (...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 268 void DoStopObservingMediaSinks(const MediaSource::Id& source_id); | 269 void DoStopObservingMediaSinks(const MediaSource::Id& source_id); |
| 269 void DoStartObservingMediaRoutes(const MediaSource::Id& source_id); | 270 void DoStartObservingMediaRoutes(const MediaSource::Id& source_id); |
| 270 void DoStopObservingMediaRoutes(const MediaSource::Id& source_id); | 271 void DoStopObservingMediaRoutes(const MediaSource::Id& source_id); |
| 271 void DoSearchSinks( | 272 void DoSearchSinks( |
| 272 const MediaSink::Id& sink_id, | 273 const MediaSink::Id& sink_id, |
| 273 const MediaSource::Id& source_id, | 274 const MediaSource::Id& source_id, |
| 274 const std::string& search_input, | 275 const std::string& search_input, |
| 275 const std::string& domain, | 276 const std::string& domain, |
| 276 const MediaSinkSearchResponseCallback& sink_callback); | 277 const MediaSinkSearchResponseCallback& sink_callback); |
| 277 | 278 |
| 279 void DoOnSinksDiscovered(std::unique_ptr<MediaSinkList> sinks); |
| 280 |
| 278 // Error handler callback for |binding_| and |media_route_provider_|. | 281 // Error handler callback for |binding_| and |media_route_provider_|. |
| 279 void OnConnectionError(); | 282 void OnConnectionError(); |
| 280 | 283 |
| 281 // mojom::MediaRouter implementation. | 284 // mojom::MediaRouter implementation. |
| 282 void RegisterMediaRouteProvider( | 285 void RegisterMediaRouteProvider( |
| 283 mojom::MediaRouteProviderPtr media_route_provider_ptr, | 286 mojom::MediaRouteProviderPtr media_route_provider_ptr, |
| 284 const mojom::MediaRouter::RegisterMediaRouteProviderCallback& | 287 const mojom::MediaRouter::RegisterMediaRouteProviderCallback& |
| 285 callback) override; | 288 callback) override; |
| 286 void OnIssue(const IssueInfo& issue) override; | 289 void OnIssue(const IssueInfo& issue) override; |
| 287 void OnSinksReceived(const std::string& media_source, | 290 void OnSinksReceived(const std::string& media_source, |
| (...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 429 #endif | 432 #endif |
| 430 | 433 |
| 431 base::WeakPtrFactory<MediaRouterMojoImpl> weak_factory_; | 434 base::WeakPtrFactory<MediaRouterMojoImpl> weak_factory_; |
| 432 | 435 |
| 433 DISALLOW_COPY_AND_ASSIGN(MediaRouterMojoImpl); | 436 DISALLOW_COPY_AND_ASSIGN(MediaRouterMojoImpl); |
| 434 }; | 437 }; |
| 435 | 438 |
| 436 } // namespace media_router | 439 } // namespace media_router |
| 437 | 440 |
| 438 #endif // CHROME_BROWSER_MEDIA_ROUTER_MOJO_MEDIA_ROUTER_MOJO_IMPL_H_ | 441 #endif // CHROME_BROWSER_MEDIA_ROUTER_MOJO_MEDIA_ROUTER_MOJO_IMPL_H_ |
| OLD | NEW |