Index: chrome/android/java/src/org/chromium/chrome/browser/ShortcutHelper.java |
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ShortcutHelper.java b/chrome/android/java/src/org/chromium/chrome/browser/ShortcutHelper.java |
index 1b5ccd403adafc026f05b69d0d2c0744ab96f67a..0bd5ca69d56acc2210589d09acb4961a4655ad9d 100644 |
--- a/chrome/android/java/src/org/chromium/chrome/browser/ShortcutHelper.java |
+++ b/chrome/android/java/src/org/chromium/chrome/browser/ShortcutHelper.java |
@@ -32,9 +32,13 @@ public class ShortcutHelper { |
public static final String EXTRA_MAC = "org.chromium.chrome.browser.webapp_mac"; |
public static final String EXTRA_TITLE = "org.chromium.chrome.browser.webapp_title"; |
public static final String EXTRA_URL = "org.chromium.chrome.browser.webapp_url"; |
+ public static final String EXTRA_THEME_COLOR = "org.chromium.chrome.browser.theme_color"; |
public static final String EXTRA_ORIENTATION = ScreenOrientationConstants.EXTRA_ORIENTATION; |
public static final String EXTRA_SOURCE = "org.chromium.chrome.browser.webapp_source"; |
+ // This value is equal to kInvalidOrMissingThemeColor in the C++ Manifest struct. |
mlamouri (slow - plz ping)
2015/07/20 13:03:30
nit: content::Manifest
Lalit Maganti
2015/07/20 13:15:19
Done.
|
+ public static final long THEME_COLOR_INVALID_OR_MISSING = -1; |
+ |
// This value is equal to SOURCE_UNKNOWN in the C++ ShortcutInfo struct. |
public static final int SOURCE_UNKNOWN = 0; |
@@ -47,6 +51,7 @@ public class ShortcutHelper { |
void onIconAvailable(Bitmap icon); |
} |
+ /** Delegate utilized for testing purposes */ |
public static class Delegate { |
/** |
* Broadcasts an intent to all interested BroadcastReceivers. |
@@ -154,7 +159,7 @@ public class ShortcutHelper { |
@SuppressWarnings("unused") |
@CalledByNative |
private static void addShortcut(Context context, String url, String title, Bitmap icon, |
- boolean isWebappCapable, int orientation, int source) { |
+ boolean isWebappCapable, long themeColor, int orientation, int source) { |
Intent shortcutIntent; |
if (isWebappCapable) { |
// Encode the icon as a base64 string (Launcher drops Bitmaps in the Intent). |
@@ -175,6 +180,7 @@ public class ShortcutHelper { |
shortcutIntent.putExtra(EXTRA_URL, url); |
shortcutIntent.putExtra(EXTRA_ORIENTATION, orientation); |
shortcutIntent.putExtra(EXTRA_MAC, getEncodedMac(context, url)); |
+ shortcutIntent.putExtra(EXTRA_THEME_COLOR, themeColor); |
} else { |
// Add the shortcut as a launcher icon to open in the browser Activity. |
shortcutIntent = BookmarkUtils.createShortcutIntent(url); |