| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CHROME_BROWSER_ANDROID_SHORTCUT_HELPER_H_ | 5 #ifndef CHROME_BROWSER_ANDROID_SHORTCUT_HELPER_H_ |
| 6 #define CHROME_BROWSER_ANDROID_SHORTCUT_HELPER_H_ | 6 #define CHROME_BROWSER_ANDROID_SHORTCUT_HELPER_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 55 // completed. This is necessary as Java will asynchronously create and | 55 // completed. This is necessary as Java will asynchronously create and |
| 56 // populate a WebappDataStorage object for standalone-capable sites. This must | 56 // populate a WebappDataStorage object for standalone-capable sites. This must |
| 57 // exist before the splash image can be stored. | 57 // exist before the splash image can be stored. |
| 58 static void AddWebappWithSkBitmap( | 58 static void AddWebappWithSkBitmap( |
| 59 const ShortcutInfo& info, | 59 const ShortcutInfo& info, |
| 60 const std::string& webapp_id, | 60 const std::string& webapp_id, |
| 61 const SkBitmap& icon_bitmap, | 61 const SkBitmap& icon_bitmap, |
| 62 const base::Closure& splash_image_callback); | 62 const base::Closure& splash_image_callback); |
| 63 | 63 |
| 64 // Adds a shortcut which opens in a browser tab to the launcher. | 64 // Adds a shortcut which opens in a browser tab to the launcher. |
| 65 static void AddShortcutWithSkBitmap( | 65 static void AddShortcutWithSkBitmap(const ShortcutInfo& info, |
| 66 const ShortcutInfo& info, | 66 const std::string& id, |
| 67 const SkBitmap& icon_bitmap); | 67 const SkBitmap& icon_bitmap); |
| 68 | 68 |
| 69 // Shows toast notifying user that a WebAPK install is already in progress | 69 // Shows toast notifying user that a WebAPK install is already in progress |
| 70 // when user tries to queue a new install for the same WebAPK. | 70 // when user tries to queue a new install for the same WebAPK. |
| 71 static void ShowWebApkInstallInProgressToast(); | 71 static void ShowWebApkInstallInProgressToast(); |
| 72 | 72 |
| 73 // Returns the ideal size for an icon representing a web app or a WebAPK. | 73 // Returns the ideal size for an icon representing a web app or a WebAPK. |
| 74 static int GetIdealHomescreenIconSizeInPx(); | 74 static int GetIdealHomescreenIconSizeInPx(); |
| 75 | 75 |
| 76 // Returns the minimum size for an icon representing a web app or a WebAPK. | 76 // Returns the minimum size for an icon representing a web app or a WebAPK. |
| 77 static int GetMinimumHomescreenIconSizeInPx(); | 77 static int GetMinimumHomescreenIconSizeInPx(); |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 129 static void RetrieveWebApks(const WebApkInfoCallback& callback); | 129 static void RetrieveWebApks(const WebApkInfoCallback& callback); |
| 130 | 130 |
| 131 private: | 131 private: |
| 132 ShortcutHelper() = delete; | 132 ShortcutHelper() = delete; |
| 133 ~ShortcutHelper() = delete; | 133 ~ShortcutHelper() = delete; |
| 134 | 134 |
| 135 DISALLOW_COPY_AND_ASSIGN(ShortcutHelper); | 135 DISALLOW_COPY_AND_ASSIGN(ShortcutHelper); |
| 136 }; | 136 }; |
| 137 | 137 |
| 138 #endif // CHROME_BROWSER_ANDROID_SHORTCUT_HELPER_H_ | 138 #endif // CHROME_BROWSER_ANDROID_SHORTCUT_HELPER_H_ |
| OLD | NEW |