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

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

Issue 2173953003: Media Router Mojo: Use new wrapper types. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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 269 matching lines...) Expand 10 before | Expand all | Expand 10 after
280 280
281 // Error handler callback for |binding_| and |media_route_provider_|. 281 // Error handler callback for |binding_| and |media_route_provider_|.
282 void OnConnectionError(); 282 void OnConnectionError();
283 283
284 // interfaces::MediaRouter implementation. 284 // interfaces::MediaRouter implementation.
285 void RegisterMediaRouteProvider( 285 void RegisterMediaRouteProvider(
286 interfaces::MediaRouteProviderPtr media_route_provider_ptr, 286 interfaces::MediaRouteProviderPtr media_route_provider_ptr,
287 const interfaces::MediaRouter::RegisterMediaRouteProviderCallback& 287 const interfaces::MediaRouter::RegisterMediaRouteProviderCallback&
288 callback) override; 288 callback) override;
289 void OnIssue(interfaces::IssuePtr issue) override; 289 void OnIssue(interfaces::IssuePtr issue) override;
290 void OnSinksReceived(const mojo::String& media_source, 290 void OnSinksReceived(const std::string& media_source,
291 mojo::Array<interfaces::MediaSinkPtr> sinks, 291 std::vector<interfaces::MediaSinkPtr> sinks,
292 mojo::Array<mojo::String> origins) override; 292 const std::vector<std::string>& origins) override;
293 void OnRoutesUpdated(mojo::Array<interfaces::MediaRoutePtr> routes, 293 void OnRoutesUpdated(
294 const mojo::String& media_source, 294 std::vector<interfaces::MediaRoutePtr> routes,
295 mojo::Array<mojo::String> joinable_route_ids) override; 295 const std::string& media_source,
296 const std::vector<std::string>& joinable_route_ids) override;
296 void OnSinkAvailabilityUpdated( 297 void OnSinkAvailabilityUpdated(
297 interfaces::MediaRouter::SinkAvailability availability) override; 298 interfaces::MediaRouter::SinkAvailability availability) override;
298 void OnPresentationConnectionStateChanged( 299 void OnPresentationConnectionStateChanged(
299 const mojo::String& route_id, 300 const std::string& route_id,
300 interfaces::MediaRouter::PresentationConnectionState state) override; 301 interfaces::MediaRouter::PresentationConnectionState state) override;
301 void OnPresentationConnectionClosed( 302 void OnPresentationConnectionClosed(
302 const mojo::String& route_id, 303 const std::string& route_id,
303 interfaces::MediaRouter::PresentationConnectionCloseReason reason, 304 interfaces::MediaRouter::PresentationConnectionCloseReason reason,
304 const mojo::String& message) override; 305 const std::string& message) override;
305 void OnRouteMessagesReceived( 306 void OnRouteMessagesReceived(
306 const mojo::String& route_id, 307 const std::string& route_id,
307 mojo::Array<interfaces::RouteMessagePtr> messages) override; 308 std::vector<interfaces::RouteMessagePtr> messages) override;
308 309
309 // Result callback when Mojo terminateRoute is invoked. |route_id| is bound 310 // Result callback when Mojo terminateRoute is invoked. |route_id| is bound
310 // to the ID of the route that was terminated. 311 // to the ID of the route that was terminated.
311 void OnTerminateRouteResult(const MediaRoute::Id& route_id, 312 void OnTerminateRouteResult(const MediaRoute::Id& route_id,
312 mojo::String error_text, 313 const base::Optional<std::string>& error_text,
313 interfaces::RouteRequestResultCode result_code); 314 interfaces::RouteRequestResultCode result_code);
314 315
315 // Converts the callback result of calling Mojo CreateRoute()/JoinRoute() 316 // Converts the callback result of calling Mojo CreateRoute()/JoinRoute()
316 // into a local callback. 317 // into a local callback.
317 void RouteResponseReceived( 318 void RouteResponseReceived(
318 const std::string& presentation_id, 319 const std::string& presentation_id,
319 bool incognito, 320 bool incognito,
320 const std::vector<MediaRouteResponseCallback>& callbacks, 321 const std::vector<MediaRouteResponseCallback>& callbacks,
321 interfaces::MediaRoutePtr media_route, 322 interfaces::MediaRoutePtr media_route,
322 mojo::String error_text, 323 const base::Optional<std::string>& error_text,
323 interfaces::RouteRequestResultCode result_code); 324 interfaces::RouteRequestResultCode result_code);
324 325
325 // Callback invoked by |event_page_tracker_| after an attempt to wake the 326 // Callback invoked by |event_page_tracker_| after an attempt to wake the
326 // component extension. If |success| is false, the pending request queue is 327 // component extension. If |success| is false, the pending request queue is
327 // drained. 328 // drained.
328 void EventPageWakeComplete(bool success); 329 void EventPageWakeComplete(bool success);
329 330
330 // Removes all requests from the pending requests queue. Called when there is 331 // Removes all requests from the pending requests queue. Called when there is
331 // a permanent error connecting to component extension. 332 // a permanent error connecting to component extension.
332 void DrainRequestQueue(); 333 void DrainRequestQueue();
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
433 #endif 434 #endif
434 435
435 base::WeakPtrFactory<MediaRouterMojoImpl> weak_factory_; 436 base::WeakPtrFactory<MediaRouterMojoImpl> weak_factory_;
436 437
437 DISALLOW_COPY_AND_ASSIGN(MediaRouterMojoImpl); 438 DISALLOW_COPY_AND_ASSIGN(MediaRouterMojoImpl);
438 }; 439 };
439 440
440 } // namespace media_router 441 } // namespace media_router
441 442
442 #endif // CHROME_BROWSER_MEDIA_ROUTER_MOJO_MEDIA_ROUTER_MOJO_IMPL_H_ 443 #endif // CHROME_BROWSER_MEDIA_ROUTER_MOJO_MEDIA_ROUTER_MOJO_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698