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

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/media/remote/NotificationTransportControl.java

Issue 1614793002: Merge setMediaRouteController and setRouteController for NotificationTransportControl (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/android/java/src/org/chromium/chrome/browser/media/remote/NotificationTransportControl.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/media/remote/NotificationTransportControl.java b/chrome/android/java/src/org/chromium/chrome/browser/media/remote/NotificationTransportControl.java
index d52b561eb258fb8f57cec7909237d33df6f18d07..055ec4aa3ffa782841fc0748428c0c82dfa7bd4e 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/media/remote/NotificationTransportControl.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/media/remote/NotificationTransportControl.java
@@ -337,7 +337,7 @@ public class NotificationTransportControl
new RemoteVideoInfo(null, 0, RemoteVideoInfo.PlayerState.STOPPED, 0, null));
}
- sInstance.setMediaRouteController(mrc);
+ sInstance.setRouteController(mrc);
return sInstance;
}
}
@@ -454,7 +454,9 @@ public class NotificationTransportControl
@Override
public void setRouteController(MediaRouteController controller) {
- setMediaRouteController(controller);
+ if (mMediaRouteController != null) mMediaRouteController.removeUiListener(this);
+ mMediaRouteController = controller;
+ if (controller != null) controller.addUiListener(this);
}
@Override
@@ -514,15 +516,4 @@ public class NotificationTransportControl
return scaleBitmap(bitmap, (int) maxWidth, (int) maxHeight);
}
- /**
- * Sets the MediaRouteController the notification should be using to get the data from.
- *
- * @param mrc the MediaRouteController object to use.
- */
- private void setMediaRouteController(@Nullable MediaRouteController mrc) {
- if (mMediaRouteController != null) mMediaRouteController.removeUiListener(this);
- mMediaRouteController = mrc;
- if (mrc != null) mrc.addUiListener(this);
- }
-
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698