Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(665)

Side by Side Diff: chrome/browser/media/router/mojo/media_router_mojo_impl.h

Issue 2679893002: [Media Router] Add ProvideSinks() Mojo API (Closed)
Patch Set: merge with https://codereview.chromium.org/2675033002/ Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 const SendRouteMessageCallback& callback) override; 101 const SendRouteMessageCallback& callback) override;
102 void AddIssue(const IssueInfo& issue_info) override; 102 void AddIssue(const IssueInfo& issue_info) override;
103 void ClearIssue(const Issue::Id& issue_id) override; 103 void ClearIssue(const Issue::Id& issue_id) override;
104 void OnUserGesture() override; 104 void OnUserGesture() override;
105 void SearchSinks( 105 void SearchSinks(
106 const MediaSink::Id& sink_id, 106 const MediaSink::Id& sink_id,
107 const MediaSource::Id& source_id, 107 const MediaSource::Id& source_id,
108 const std::string& search_input, 108 const std::string& search_input,
109 const std::string& domain, 109 const std::string& domain,
110 const MediaSinkSearchResponseCallback& sink_callback) override; 110 const MediaSinkSearchResponseCallback& sink_callback) override;
111 void ProvideSinks(const std::string& provider_name,
112 const MediaSinkList& sinks) override;
111 113
112 const std::string& media_route_provider_extension_id() const { 114 const std::string& media_route_provider_extension_id() const {
113 return media_route_provider_extension_id_; 115 return media_route_provider_extension_id_;
114 } 116 }
115 117
116 void set_instance_id_for_test(const std::string& instance_id) { 118 void set_instance_id_for_test(const std::string& instance_id) {
117 instance_id_ = instance_id; 119 instance_id_ = instance_id;
118 } 120 }
119 121
120 private: 122 private:
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
269 void DoStopObservingMediaSinks(const MediaSource::Id& source_id); 271 void DoStopObservingMediaSinks(const MediaSource::Id& source_id);
270 void DoStartObservingMediaRoutes(const MediaSource::Id& source_id); 272 void DoStartObservingMediaRoutes(const MediaSource::Id& source_id);
271 void DoStopObservingMediaRoutes(const MediaSource::Id& source_id); 273 void DoStopObservingMediaRoutes(const MediaSource::Id& source_id);
272 void DoSearchSinks( 274 void DoSearchSinks(
273 const MediaSink::Id& sink_id, 275 const MediaSink::Id& sink_id,
274 const MediaSource::Id& source_id, 276 const MediaSource::Id& source_id,
275 const std::string& search_input, 277 const std::string& search_input,
276 const std::string& domain, 278 const std::string& domain,
277 const MediaSinkSearchResponseCallback& sink_callback); 279 const MediaSinkSearchResponseCallback& sink_callback);
278 280
281 void DoProvideSinks(const std::string& provider_name,
282 const MediaSinkList& sinks);
283
279 // Error handler callback for |binding_| and |media_route_provider_|. 284 // Error handler callback for |binding_| and |media_route_provider_|.
280 void OnConnectionError(); 285 void OnConnectionError();
281 286
282 // mojom::MediaRouter implementation. 287 // mojom::MediaRouter implementation.
283 void RegisterMediaRouteProvider( 288 void RegisterMediaRouteProvider(
284 mojom::MediaRouteProviderPtr media_route_provider_ptr, 289 mojom::MediaRouteProviderPtr media_route_provider_ptr,
285 const mojom::MediaRouter::RegisterMediaRouteProviderCallback& 290 const mojom::MediaRouter::RegisterMediaRouteProviderCallback&
286 callback) override; 291 callback) override;
287 void OnIssue(const IssueInfo& issue) override; 292 void OnIssue(const IssueInfo& issue) override;
288 void OnSinksReceived(const std::string& media_source, 293 void OnSinksReceived(const std::string& media_source,
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
430 #endif 435 #endif
431 436
432 base::WeakPtrFactory<MediaRouterMojoImpl> weak_factory_; 437 base::WeakPtrFactory<MediaRouterMojoImpl> weak_factory_;
433 438
434 DISALLOW_COPY_AND_ASSIGN(MediaRouterMojoImpl); 439 DISALLOW_COPY_AND_ASSIGN(MediaRouterMojoImpl);
435 }; 440 };
436 441
437 } // namespace media_router 442 } // namespace media_router
438 443
439 #endif // CHROME_BROWSER_MEDIA_ROUTER_MOJO_MEDIA_ROUTER_MOJO_IMPL_H_ 444 #endif // CHROME_BROWSER_MEDIA_ROUTER_MOJO_MEDIA_ROUTER_MOJO_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698