Chromium Code Reviews| Index: chrome/browser/android/shortcut_helper.h |
| diff --git a/chrome/browser/android/shortcut_helper.h b/chrome/browser/android/shortcut_helper.h |
| index 40a4beea782e63685e8a307c9b0d620a46ee0c43..e552adec6da226fcefda43356de1a554748f8c84 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. |
|
dominickn
2016/07/15 00:19:00
Nit: "The type of shortcut added depends on the pr
|
| // 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 void AddWebApkInBackgroundWithSkBitmap( |
|
dominickn
2016/07/15 00:19:00
Perhaps InstallWebApkInBackgroundWithSkBitmap for
|
| + 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( |
|
dominickn
2016/07/15 00:19:00
"Bookmark shortcut" is a bit misleading here becau
|
| + const ShortcutInfo& info, |
| + const SkBitmap& icon_bitmap); |
| + |
| // Returns the ideal size for an icon representing a web app. |
| static int GetIdealHomescreenIconSizeInDp(); |