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

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

Issue 1847063005: [Media, UI] Change MediaNotification style to MediaStyle (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix tests and rebase Created 4 years, 8 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/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 083c3eedad33be3a402b9c4e3fb079dec02be4fc..0bc67f3db6f609e4db2bbd44bb0c3bd52ebe628c 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
@@ -49,6 +49,7 @@ public class MediaNotificationInfo {
private int mTabId = Tab.INVALID_TAB_ID;
private boolean mIsPrivate = true;
private int mIcon = -1;
+ private Bitmap mLargeIcon = null;
private int mActions = ACTION_PLAY_PAUSE | ACTION_SWIPEAWAY;
private int mId = INVALID_ID;
private Intent mContentIntent = null;
@@ -73,6 +74,7 @@ public class MediaNotificationInfo {
mTabId,
mIsPrivate,
mIcon,
+ mLargeIcon,
mActions,
mId,
mImage,
@@ -110,6 +112,11 @@ public class MediaNotificationInfo {
return this;
}
+ public Builder setLargeIcon(Bitmap icon) {
+ mLargeIcon = icon;
+ return this;
+ }
+
public Builder setActions(int actions) {
mActions = actions;
return this;
@@ -172,6 +179,11 @@ public class MediaNotificationInfo {
public final int icon;
/**
+ * The Bitmap resource used for a large icon.
+ */
+ public final Bitmap largeIcon;
+
+ /**
* The id to use for the notification itself.
*/
public final int id;
@@ -230,6 +242,7 @@ public class MediaNotificationInfo {
int tabId,
boolean isPrivate,
int icon,
+ Bitmap largeIcon,
int actions,
int id,
Bitmap image,
@@ -241,6 +254,7 @@ public class MediaNotificationInfo {
this.tabId = tabId;
this.isPrivate = isPrivate;
this.icon = icon;
+ this.largeIcon = largeIcon;
this.mActions = actions;
this.id = id;
this.contentIntent = contentIntent;
@@ -258,6 +272,7 @@ public class MediaNotificationInfo {
&& isPrivate == other.isPrivate
&& tabId == other.tabId
&& icon == other.icon
+ && largeIcon == other.largeIcon
&& mActions == other.mActions
&& id == other.id
&& metadata.equals(other.metadata)
@@ -277,6 +292,7 @@ public class MediaNotificationInfo {
result = 31 * result + (contentIntent == null ? 0 : contentIntent.hashCode());
result = 31 * result + tabId;
result = 31 * result + icon;
+ result = 31 * result + (largeIcon == null ? 0 : largeIcon.hashCode());
result = 31 * result + mActions;
result = 31 * result + id;
result = 31 * result + listener.hashCode();

Powered by Google App Engine
This is Rietveld 408576698