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

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

Issue 2873893003: [Media Router] Add features to control browser side discovery (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 // Used to pass feature configuration data from the Browser to Media Route
191 // Provider.
192 struct MediaRouteProviderConfig {
193 // If the MRP should enable DIAL discovery.
194 bool enable_dial_discovery;
195
196 // If the MRP should enable Cast discovery.
197 bool enable_cast_discovery;
198 };
199
190 // Modeled after the MediaRouter interface defined in 200 // Modeled after the MediaRouter interface defined in
191 // chrome/browser/media/router/media_router.h 201 // chrome/browser/media/router/media_router.h
192 interface MediaRouteProvider { 202 interface MediaRouteProvider {
193 // Creates a media route from |media_source| to the sink given by |sink_id|. 203 // Creates a media route from |media_source| to the sink given by |sink_id|.
194 // 204 //
195 // The presentation ID of the route created will be |presentation_id|, but it 205 // 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 206 // may be overridden by a provider implementation. The presentation ID will
197 // be used by the presentation API to refer to the created route. 207 // be used by the presentation API to refer to the created route.
198 // 208 //
199 // |origin| and |tab_id| may be passed in for enforcing same-origin and/or 209 // |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 { 426 enum PresentationConnectionCloseReason {
417 CONNECTION_ERROR, 427 CONNECTION_ERROR,
418 CLOSED, 428 CLOSED,
419 WENT_AWAY 429 WENT_AWAY
420 }; 430 };
421 431
422 // Registers a MediaRouteProvider with the MediaRouter. 432 // Registers a MediaRouteProvider with the MediaRouter.
423 // Returns a string that uniquely identifies the Media Router browser 433 // Returns a string that uniquely identifies the Media Router browser
424 // process. 434 // process.
425 RegisterMediaRouteProvider(MediaRouteProvider media_router_provider) => 435 RegisterMediaRouteProvider(MediaRouteProvider media_router_provider) =>
426 (string instance_id); 436 (string instance_id, MediaRouteProviderConfig config);
427 437
428 // Called when the Media Route Manager receives a new list of |sinks| 438 // 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 439 // compatible with |media_source|. The result is only valid for |origins|. If
430 // |origins| is empty, the result is valid for any origin. 440 // |origins| is empty, the result is valid for any origin.
431 OnSinksReceived(string media_source, array<MediaSink> sinks, 441 OnSinksReceived(string media_source, array<MediaSink> sinks,
432 array<url.mojom.Origin> origins); 442 array<url.mojom.Origin> origins);
433 443
434 // Called when issues are reported for media routes. 444 // Called when issues are reported for media routes.
435 OnIssue(Issue issue); 445 OnIssue(Issue issue);
436 446
(...skipping 18 matching lines...) Expand all
455 465
456 // Called when the a batch of messages arrives from the media sink for the 466 // Called when the a batch of messages arrives from the media sink for the
457 // route given by |route_id|. 467 // route given by |route_id|.
458 // |StartListeningForRouteMessages| must be called first in order to receive 468 // |StartListeningForRouteMessages| must be called first in order to receive
459 // messages. 469 // messages.
460 // |route_id|: ID of route of the messages. 470 // |route_id|: ID of route of the messages.
461 // |messages|: A non-empty list of messages received. 471 // |messages|: A non-empty list of messages received.
462 OnRouteMessagesReceived(string route_id, 472 OnRouteMessagesReceived(string route_id,
463 array<RouteMessage> messages); 473 array<RouteMessage> messages);
464 }; 474 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698