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

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

Issue 2111303003: [Media Router] Replace route messaging API. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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 816527e1d1d0c9cd3d1fc8f3cc37cb230a49a85a..2d12a6fcab91627c8fbcbca76284488775d35e95 100644
--- a/chrome/browser/media/router/mojo/media_router.mojom
+++ b/chrome/browser/media/router/mojo/media_router.mojom
@@ -206,8 +206,8 @@ interface MediaRouteProvider {
// CreateRoute for additional documentation.
//
// If |timeout_millis| is positive, it will be used in place of the default
- // timeout defined by Media Route Provider Manager; see CreateRoute for additional
- // documentation.
+ // timeout defined by Media Route Provider Manager; see CreateRoute for
+ // additional documentation.
//
// If the route request was created by an off the record (incognito) profile,
// |off_the_record| must be true.
@@ -272,18 +272,13 @@ interface MediaRouteProvider {
// that being with StartObservingMediaRoutes()).
StopObservingMediaRoutes(string media_source);
- // Called when the MediaRouter is ready to get the next batch of messages
- // associated with |route_id|.
- // |messages| returned will contain the batch of messages.
- // |messages| will be empty if |StopListeningForRouteMessages| was invoked.
- // |error| indicates if a permanent error occurred. If true, then subsequent
- // calls will also return with |error| being true.
- ListenForRouteMessages(string route_id) =>
- (array<RouteMessage> messages, bool error);
+ // Starts listening for messages from the given route.
mark a. foltz 2016/07/02 01:18:43 ...messages from the media sink for the route give
imcheng 2016/07/06 17:56:23 Done.
+ // |MediaRouter::OnRouteMessagesReceived| will be invoked when a batch of
+ // messages arrives, or when there is an error.
+ // Messages will stop arriving if |StopListeningForRouteMessages| is called.
mark a. foltz 2016/07/02 01:18:42 Messages could still arrive from the sink but the
imcheng 2016/07/06 17:56:22 Yeah, I meant that the messages will stop arriving
+ StartListeningForRouteMessages(string route_id);
// Called when there are no more listeners for messages for |route_id|.
- // Calling this will resolve the pending |ListenForRouteMessages| callback
- // with an empty list.
StopListeningForRouteMessages(string route_id);
// Indicates that a PresentationConnection that was connected to route
@@ -374,5 +369,13 @@ interface MediaRouter {
OnPresentationConnectionClosed(
string route_id, PresentationConnectionCloseReason reason,
string message);
+
+ // Called when the a batch of messages from the given route arrives.
mark a. foltz 2016/07/02 01:18:42 messages arrives from the media sink for the route
imcheng 2016/07/06 17:56:22 Done.
+ // |StartListeningForRouteMessages| must be called first in order to recieve
mark a. foltz 2016/07/02 01:18:42 Nit: typo in receive
imcheng 2016/07/06 17:56:22 Done.
+ // messages.
+ // |route_id|: ID of route of the messages.
+ // |messages|: A non-empty list of messages received.
+ OnRouteMessagesReceived(string route_id,
+ array<RouteMessage> messages);
};

Powered by Google App Engine
This is Rietveld 408576698