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

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/media/ui/MediaNotificationInfo.java

Issue 2526533002: Allow MediaSession in iframes to be routed (Closed)
Patch Set: Created 4 years, 1 month 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/ui/MediaNotificationInfo.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/media/ui/MediaNotificationInfo.java b/chrome/android/java/src/org/chromium/chrome/browser/media/ui/MediaNotificationInfo.java
index c3dce37967316b46cff0f342eaf9ff5e5653fc6a..67ddb78efca9fa68d947a2ddc8d59dd54e916bb2 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/media/ui/MediaNotificationInfo.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/media/ui/MediaNotificationInfo.java
@@ -11,8 +11,8 @@ import android.text.TextUtils;
import org.chromium.chrome.browser.tab.Tab;
import org.chromium.content_public.common.MediaMetadata;
-import java.util.HashSet;
-import java.util.Set;
+import java.util.ArrayList;
+import java.util.List;
/**
* Exposes information about the current media notification to the external clients.
@@ -58,7 +58,7 @@ public class MediaNotificationInfo {
private int mId = INVALID_ID;
private Intent mContentIntent = null;
private MediaNotificationListener mListener = null;
- private Set<Integer> mMediaSessionActions = null;
+ private List<Integer> mMediaSessionActions = null;
whywhat 2016/11/22 23:13:16 Why this change?
Zhiqiang Zhang (Slow) 2016/11/25 14:50:41 Undone this change. Actually I thought we are now
/**
* Initializes the builder with the default values.
@@ -147,7 +147,7 @@ public class MediaNotificationInfo {
return this;
}
- public Builder setMediaSessionActions(Set<Integer> actions) {
+ public Builder setMediaSessionActions(List<Integer> actions) {
mMediaSessionActions = actions;
return this;
}
@@ -216,7 +216,7 @@ public class MediaNotificationInfo {
/**
* The actions enabled in MediaSession.
*/
- public final Set<Integer> mediaSessionActions;
+ public final List<Integer> mediaSessionActions;
/**
* @return if play/pause actions are supported by this notification.
@@ -249,10 +249,20 @@ public class MediaNotificationInfo {
* @param contentIntent the intent to send when the notification is selected.
* @param listener The listener for the control events.
*/
- private MediaNotificationInfo(MediaMetadata metadata, boolean isPaused, String origin,
- int tabId, boolean isPrivate, int icon, Bitmap largeIcon, int defaultLargeIcon,
- int actions, int id, Intent contentIntent, MediaNotificationListener listener,
- Set<Integer> mediaSessionActions) {
+ private MediaNotificationInfo(
+ MediaMetadata metadata,
+ boolean isPaused,
+ String origin,
+ int tabId,
+ boolean isPrivate,
+ int icon,
+ Bitmap largeIcon,
+ int defaultLargeIcon,
+ int actions,
+ int id,
+ Intent contentIntent,
+ MediaNotificationListener listener,
+ List<Integer> mediaSessionActions) {
this.metadata = metadata;
this.isPaused = isPaused;
this.origin = origin;
@@ -266,8 +276,8 @@ public class MediaNotificationInfo {
this.contentIntent = contentIntent;
this.listener = listener;
this.mediaSessionActions = (mediaSessionActions != null)
- ? new HashSet<Integer>(mediaSessionActions)
- : new HashSet<Integer>();
+ ? new ArrayList<Integer>(mediaSessionActions)
+ : new ArrayList<Integer>();
}
@Override

Powered by Google App Engine
This is Rietveld 408576698