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

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/media/router/cast/MediaSink.java

Issue 1294133002: [Presentation API, MediaRouter] Routing from media sink selection to route creation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@media-router-discovery-2
Patch Set: Added comments and DCHECKs for null presentation request Created 5 years, 4 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/android/java/src/org/chromium/chrome/browser/media/router/cast/MediaSink.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/media/router/cast/MediaSink.java b/chrome/android/java/src/org/chromium/chrome/browser/media/router/cast/MediaSink.java
index 3ea7e098c7aabc1d9efe8401f7a8a216e53e4be1..f3d167ea9bc37bcc450defdbbd13d97062e6298b 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/media/router/cast/MediaSink.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/media/router/cast/MediaSink.java
@@ -5,6 +5,7 @@
package org.chromium.chrome.browser.media.router.cast;
import android.support.v7.media.MediaRouter;
+import android.support.v7.media.MediaRouter.RouteInfo;
/**
* A common descriptor of a device that can present some URI.
@@ -50,7 +51,12 @@ public class MediaSink {
return result;
}
- static MediaSink fromRoute(MediaRouter.RouteInfo route) {
+ /**
+ * Returns a MediaSink instance corresponding to the specified {@link RouteInfo}.
+ * @param route the route information provided by Android
Wez 2015/08/18 21:50:08 nit: This is not very readable - should "the" be c
whywhat 2015/08/19 13:04:29 I believe we have a couple of common styles, this
+ * @return a new MediaSink instance
+ */
+ public static MediaSink fromRoute(MediaRouter.RouteInfo route) {
return new MediaSink(
route.getId(),
route.getName());

Powered by Google App Engine
This is Rietveld 408576698