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

Unified Diff: chrome/browser/android/shortcut_helper.h

Issue 2129043002: Split ShortcutHelper#addShortcut() into separate functions for each type of shortcut (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Merge branch 'master' into webapk_builder_impl0 Created 4 years, 5 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/browser/android/shortcut_helper.h
diff --git a/chrome/browser/android/shortcut_helper.h b/chrome/browser/android/shortcut_helper.h
index d2fabef8b72c53ec86ecc108cbb703b369fd727d..0e359fbd5621f086df26115aa70592287dc1f4cc 100644
--- a/chrome/browser/android/shortcut_helper.h
+++ b/chrome/browser/android/shortcut_helper.h
@@ -23,12 +23,7 @@ class ShortcutHelper {
// Registers JNI hooks.
static bool RegisterShortcutHelper(JNIEnv* env);
- // Adds a shortcut to the launcher using a SkBitmap. If the shortcut is for
- // a standalone-capable site, |splash_image_callback| will be invoked once the
- // Java-side operation has completed. This is necessary as Java will
- // asynchronously create and populate a WebappDataStorage object for
- // standalone-capable sites. This must exist before the splash image can be
- // stored.
+ // Adds a shortcut to the launcher using a SkBitmap.
// Must not be called on the UI thread.
static void AddShortcutInBackgroundWithSkBitmap(
const ShortcutInfo& info,
@@ -36,6 +31,31 @@ class ShortcutHelper {
const SkBitmap& icon_bitmap,
const base::Closure& splash_image_callback);
+ // Installs WebAPK and adds shortcut to the launcher.
+ // Must not be called on the UI thread.
+ static bool AddWebApkInBackgroundWithSkBitmap(
+ const ShortcutInfo& info,
+ const std::string& webapp_id,
+ const SkBitmap& icon_bitmap);
+
+ // Adds a shortcut which opens in a fullscreen window to the launcher.
+ // |splash_image_callback| will be invoked once the Java-side operation has
+ // completed. This is necessary as Java will asynchronously create and
+ // populate a WebappDataStorage object for standalone-capable sites. This must
+ // exist before the splash image can be stored.
+ // Must not be called on the UI thread.
+ static void AddWebappInBackgroundWithSkBitmap(
+ const ShortcutInfo& info,
+ const std::string& webapp_id,
+ const SkBitmap& icon_bitmap,
+ const base::Closure& splash_image_callback);
+
+ // Adds a shortcut which opens in a browser tab to the launcher.
+ // Must not be called on the UI thread.
+ static void AddBookmarkShortcutInBackgroundWithSkBitmap(
+ const ShortcutInfo& info,
+ const SkBitmap& icon_bitmap);
+
// Returns the ideal size for an icon representing a web app.
static int GetIdealHomescreenIconSizeInDp();

Powered by Google App Engine
This is Rietveld 408576698