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

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/ShortcutHelper.java

Issue 1234653004: webapps: utilize manifest theme colors (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix missing include 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
« no previous file with comments | « no previous file | chrome/android/java/src/org/chromium/chrome/browser/webapps/FullScreenActivityTab.java » ('j') | 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/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 9202c7cab038993e9a379658730d17ee0735fb77..128138290de6f34fdc95594345517f268ce4af3d 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/ShortcutHelper.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/ShortcutHelper.java
@@ -38,6 +38,10 @@ public class ShortcutHelper {
public static final String EXTRA_URL = "org.chromium.chrome.browser.webapp_url";
public static final String EXTRA_ORIENTATION = ScreenOrientationConstants.EXTRA_ORIENTATION;
public static final String EXTRA_SOURCE = "org.chromium.chrome.browser.webapp_source";
+ public static final String EXTRA_THEME_COLOR = "org.chromium.chrome.browser.theme_color";
+
+ // This value is equal to kInvalidOrMissingThemeColor in the C++ content::Manifest struct.
+ public static final long THEME_COLOR_INVALID_OR_MISSING = ((long) Integer.MAX_VALUE) + 1;
/** Observes the data fetching pipeline. */
public interface ShortcutHelperObserver {
@@ -156,7 +160,8 @@ public class ShortcutHelper {
@SuppressWarnings("unused")
@CalledByNative
private static void addShortcut(Context context, String url, String userTitle, String name,
- String shortName, Bitmap icon, boolean isWebappCapable, int orientation, int source) {
+ String shortName, Bitmap icon, boolean isWebappCapable, int orientation, int source,
+ long themeColor) {
Intent shortcutIntent;
if (isWebappCapable) {
// Encode the icon as a base64 string (Launcher drops Bitmaps in the Intent).
@@ -178,6 +183,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);
« no previous file with comments | « no previous file | chrome/android/java/src/org/chromium/chrome/browser/webapps/FullScreenActivityTab.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698