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

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

Issue 601433002: Use Manifest.icons instead of favicon in ShortcutHelper when possible. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@manifest_icons_sizes
Patch Set: Created 6 years, 3 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/browser/android/shortcut_helper.h » ('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 28217788be5dbb6ccd081e65b58bd5c480f9cc42..f953e8ffc85fb78e3684de30c422470852f7dde0 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/ShortcutHelper.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/ShortcutHelper.java
@@ -122,17 +122,17 @@ public class ShortcutHelper {
*/
@SuppressWarnings("unused")
@CalledByNative
- private static void addShortcut(Context context, String url, String title, Bitmap favicon,
+ private static void addShortcut(Context context, String url, String title, Bitmap icon,
int red, int green, int blue, boolean isWebappCapable, int orientation) {
assert sFullScreenAction != null;
Intent shortcutIntent;
if (isWebappCapable) {
- // Encode the favicon as a base64 string (Launcher drops Bitmaps in the Intent).
+ // Encode the icon as a base64 string (Launcher drops Bitmaps in the Intent).
String encodedIcon = "";
- if (favicon != null) {
+ if (icon != null) {
ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
- favicon.compress(Bitmap.CompressFormat.PNG, 100, byteArrayOutputStream);
+ icon.compress(Bitmap.CompressFormat.PNG, 100, byteArrayOutputStream);
byte[] byteArray = byteArrayOutputStream.toByteArray();
encodedIcon = Base64.encodeToString(byteArray, Base64.DEFAULT);
}
@@ -159,7 +159,7 @@ public class ShortcutHelper {
shortcutIntent.setPackage(context.getPackageName());
context.sendBroadcast(BookmarkUtils.createAddToHomeIntent(context, shortcutIntent, title,
- favicon, red, green, blue));
+ icon, red, green, blue));
// User is sent to the homescreen as soon as the shortcut is created.
Intent homeIntent = new Intent(Intent.ACTION_MAIN);
« no previous file with comments | « no previous file | chrome/browser/android/shortcut_helper.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698