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

Side by Side Diff: chrome/browser/media/router/mojo/media_router.mojom

Issue 2724513002: (Not for review) Dummy C++ side Custom Controls implementation (Closed)
Patch Set: . 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 module media_router.mojom; 5 module media_router.mojom;
6 6
7 import "chrome/browser/media/router/mojo/media_controller.mojom";
7 import "mojo/common/time.mojom"; 8 import "mojo/common/time.mojom";
8 import "url/mojo/origin.mojom"; 9 import "url/mojo/origin.mojom";
9 10
10 // Represents an output sink to which media can be routed. 11 // Represents an output sink to which media can be routed.
11 struct MediaSink { 12 struct MediaSink {
12 enum IconType { 13 enum IconType {
13 CAST, 14 CAST,
14 CAST_AUDIO, 15 CAST_AUDIO,
15 CAST_AUDIO_GROUP, 16 CAST_AUDIO_GROUP,
16 GENERIC, 17 GENERIC,
(...skipping 298 matching lines...) Expand 10 before | Expand all | Expand 10 after
315 // Indicates that the Media Router is interested in finding a sink that 316 // Indicates that the Media Router is interested in finding a sink that
316 // matches |search_criteria| and is compatible with the source urn 317 // matches |search_criteria| and is compatible with the source urn
317 // |media_source|. |search_criteria| should contain an exact copy of the user 318 // |media_source|. |search_criteria| should contain an exact copy of the user
318 // input. The user's current domain is also used to search. The domain is the 319 // input. The user's current domain is also used to search. The domain is the
319 // hosted domain of the user's signed-in identity, or empty if the user has no 320 // hosted domain of the user's signed-in identity, or empty if the user has no
320 // domain or is not signed in. 321 // domain or is not signed in.
321 SearchSinks(string sink_id, 322 SearchSinks(string sink_id,
322 string media_source, 323 string media_source,
323 SinkSearchCriteria search_criteria) => 324 SinkSearchCriteria search_criteria) =>
324 (string sink_id); 325 (string sink_id);
326
327 // Creates a controller for the media route with given |route_id| and binds it
328 // to |media_controller| for receiving media commands. This method returns
329 // false if such a media route doesn't exist, a controller already exists
330 // for it, or there was an error while creating a controller.
331 // |media_controller| becomes invalid when the media route is terminated. The
332 // created controller is destroyed when |media_controller| becomes invalid.
333 // TODO(takumif): Consider returning an enum instead of a bool to distinguish
334 // between error conditions for metrics/debugging.
335 CreateMediaRouteController(string route_id,
336 MediaController& media_controller) =>
337 (bool success);
325 }; 338 };
326 339
327 // Interface for a service which observes state changes across media 340 // Interface for a service which observes state changes across media
328 // sources, sinks, and issues. 341 // sources, sinks, and issues.
329 interface MediaRouter { 342 interface MediaRouter {
330 343
331 // Represents overall media sink availability states. 344 // Represents overall media sink availability states.
332 // UNAVAILABLE - No sinks are available. 345 // UNAVAILABLE - No sinks are available.
333 // PER_SOURCE - Sinks are available, but are only compatible with specific 346 // PER_SOURCE - Sinks are available, but are only compatible with specific
334 // media sources. 347 // media sources.
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
390 403
391 // Called when the a batch of messages arrives from the media sink for the 404 // Called when the a batch of messages arrives from the media sink for the
392 // route given by |route_id|. 405 // route given by |route_id|.
393 // |StartListeningForRouteMessages| must be called first in order to receive 406 // |StartListeningForRouteMessages| must be called first in order to receive
394 // messages. 407 // messages.
395 // |route_id|: ID of route of the messages. 408 // |route_id|: ID of route of the messages.
396 // |messages|: A non-empty list of messages received. 409 // |messages|: A non-empty list of messages received.
397 OnRouteMessagesReceived(string route_id, 410 OnRouteMessagesReceived(string route_id,
398 array<RouteMessage> messages); 411 array<RouteMessage> messages);
399 }; 412 };
OLDNEW
« no previous file with comments | « chrome/browser/media/router/mojo/media_route_controller.cc ('k') | chrome/browser/media/router/mojo/media_router_mojo_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698