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

Unified Diff: chrome/browser/media/router/mojo/media_router.mojom

Issue 2728543009: [Media Router] Custom Controls 2 - add MediaRouter::GetRouteController() (Closed)
Patch Set: Address Daniel's and Derek's comments 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/media/router/mojo/media_router.mojom
diff --git a/chrome/browser/media/router/mojo/media_router.mojom b/chrome/browser/media/router/mojo/media_router.mojom
index 173de06877a7f630daee0c4f115351fdfa3318d7..1dcce2f3f86e821b29a0bf7b7127b82e2f664ca0 100644
--- a/chrome/browser/media/router/mojo/media_router.mojom
+++ b/chrome/browser/media/router/mojo/media_router.mojom
@@ -4,6 +4,8 @@
module media_router.mojom;
+import "chrome/browser/media/router/mojo/media_controller.mojom";
+import "chrome/browser/media/router/mojo/media_status.mojom";
import "mojo/common/time.mojom";
import "net/interfaces/ip_address.mojom";
import "url/mojo/origin.mojom";
@@ -79,8 +81,7 @@ struct MediaRoute {
string? media_source;
// The ID of sink that is rendering the media content.
string media_sink_id;
- // Human readable description of this route, e.g.
- // "Tab casting".
+ // Human readable description of this route, e.g. "Tab casting".
string description;
// Specifies that the route is requested locally.
bool is_local;
@@ -363,6 +364,24 @@ interface MediaRouteProvider {
string media_source,
SinkSearchCriteria search_criteria) =>
(string sink_id);
+
+ // Creates a controller for the media route with given |route_id| and binds it
+ // to |media_controller| for receiving media commands. This method returns
+ // false if such a media route doesn't exist, a controller already exists
+ // for it, or there was an error while creating a controller.
mark a. foltz 2017/03/30 23:03:28 I think an earlier draft returned an existing cont
imcheng 2017/03/31 01:30:25 We can bind multiple interface requests to the sam
+ // |media_controller| becomes invalid when the media route is terminated. The
+ // created controller is destroyed when |media_controller| becomes invalid.
mark a. foltz 2017/03/30 23:03:28 If a returned controller is invalidated/destroyed,
takumif 2017/04/04 03:19:50 Done.
+ // TODO(takumif): Consider returning an enum instead of a bool to distinguish
+ // between error conditions for metrics/debugging.
+ CreateMediaRouteController(string route_id,
+ MediaController& media_controller) =>
+ (bool success);
+
+ // Sets the observer to be notified whenever there is a change in the status
+ // of a media route. A media route can have at most one observer at a time,
+ // and it will be overwritten each time this method is called with the same
+ // |route_id|.
+ SetMediaRouteStatusObserver(string route_id, MediaStatusObserver observer);
};
// Interface for a service which observes state changes across media

Powered by Google App Engine
This is Rietveld 408576698