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

Side by Side Diff: chrome/common/media_router/mojo/media_router.mojom

Issue 2837363002: [Media Router] Use DialMediaSinkService in MediaRouterMojoImpl (Closed)
Patch Set: resolve code review comments from Mark Created 3 years, 7 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 module media_router.mojom; 5 module media_router.mojom;
6 6
7 import "chrome/common/media_router/mojo/media_controller.mojom"; 7 import "chrome/common/media_router/mojo/media_controller.mojom";
8 import "chrome/common/media_router/mojo/media_status.mojom"; 8 import "chrome/common/media_router/mojo/media_status.mojom";
9 import "mojo/common/time.mojom"; 9 import "mojo/common/time.mojom";
10 import "net/interfaces/ip_address.mojom"; 10 import "net/interfaces/ip_address.mojom";
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after
180 TIMED_OUT, 180 TIMED_OUT,
181 ROUTE_NOT_FOUND, 181 ROUTE_NOT_FOUND,
182 SINK_NOT_FOUND, 182 SINK_NOT_FOUND,
183 INVALID_ORIGIN, 183 INVALID_ORIGIN,
184 INCOGNITO_MISMATCH, 184 INCOGNITO_MISMATCH,
185 NO_SUPPORTED_PROVIDER, 185 NO_SUPPORTED_PROVIDER,
186 CANCELLED 186 CANCELLED
187 // New values must be added here. 187 // New values must be added here.
188 }; 188 };
189 189
190 // Pass feature flags from browser to Media Route Provider
Kevin M 2017/05/03 21:07:28 Used to pass feature configuration data from the B
zhaobin 2017/05/04 23:52:36 Done.
191 struct MediaRouteProviderConfig {
192 // If the MRP should enable DIAL discovery in component extension.
Kevin M 2017/05/03 21:07:28 Nit: It seems like the component extension part is
zhaobin 2017/05/04 23:52:36 Done.
193 bool enable_dial_discovery;
194
195 // If the MRP should enable Cast discovery in component extension.
196 bool enable_cast_discovery;
197 };
198
190 // Modeled after the MediaRouter interface defined in 199 // Modeled after the MediaRouter interface defined in
191 // chrome/browser/media/router/media_router.h 200 // chrome/browser/media/router/media_router.h
192 interface MediaRouteProvider { 201 interface MediaRouteProvider {
193 // Creates a media route from |media_source| to the sink given by |sink_id|. 202 // Creates a media route from |media_source| to the sink given by |sink_id|.
194 // 203 //
195 // The presentation ID of the route created will be |presentation_id|, but it 204 // The presentation ID of the route created will be |presentation_id|, but it
196 // may be overridden by a provider implementation. The presentation ID will 205 // may be overridden by a provider implementation. The presentation ID will
197 // be used by the presentation API to refer to the created route. 206 // be used by the presentation API to refer to the created route.
198 // 207 //
199 // |origin| and |tab_id| may be passed in for enforcing same-origin and/or 208 // |origin| and |tab_id| may be passed in for enforcing same-origin and/or
(...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after
416 enum PresentationConnectionCloseReason { 425 enum PresentationConnectionCloseReason {
417 CONNECTION_ERROR, 426 CONNECTION_ERROR,
418 CLOSED, 427 CLOSED,
419 WENT_AWAY 428 WENT_AWAY
420 }; 429 };
421 430
422 // Registers a MediaRouteProvider with the MediaRouter. 431 // Registers a MediaRouteProvider with the MediaRouter.
423 // Returns a string that uniquely identifies the Media Router browser 432 // Returns a string that uniquely identifies the Media Router browser
424 // process. 433 // process.
425 RegisterMediaRouteProvider(MediaRouteProvider media_router_provider) => 434 RegisterMediaRouteProvider(MediaRouteProvider media_router_provider) =>
426 (string instance_id); 435 (string instance_id, MediaRouteProviderConfig config);
427 436
428 // Called when the Media Route Manager receives a new list of |sinks| 437 // Called when the Media Route Manager receives a new list of |sinks|
429 // compatible with |media_source|. The result is only valid for |origins|. If 438 // compatible with |media_source|. The result is only valid for |origins|. If
430 // |origins| is empty, the result is valid for any origin. 439 // |origins| is empty, the result is valid for any origin.
431 OnSinksReceived(string media_source, array<MediaSink> sinks, 440 OnSinksReceived(string media_source, array<MediaSink> sinks,
432 array<url.mojom.Origin> origins); 441 array<url.mojom.Origin> origins);
433 442
434 // Called when issues are reported for media routes. 443 // Called when issues are reported for media routes.
435 OnIssue(Issue issue); 444 OnIssue(Issue issue);
436 445
(...skipping 18 matching lines...) Expand all
455 464
456 // Called when the a batch of messages arrives from the media sink for the 465 // Called when the a batch of messages arrives from the media sink for the
457 // route given by |route_id|. 466 // route given by |route_id|.
458 // |StartListeningForRouteMessages| must be called first in order to receive 467 // |StartListeningForRouteMessages| must be called first in order to receive
459 // messages. 468 // messages.
460 // |route_id|: ID of route of the messages. 469 // |route_id|: ID of route of the messages.
461 // |messages|: A non-empty list of messages received. 470 // |messages|: A non-empty list of messages received.
462 OnRouteMessagesReceived(string route_id, 471 OnRouteMessagesReceived(string route_id,
463 array<RouteMessage> messages); 472 array<RouteMessage> messages);
464 }; 473 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698