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 "base/android/jni_android.h" | 8 #include "base/android/jni_android.h" |
9 #include "base/android/jni_weak_ref.h" | 9 #include "base/android/jni_weak_ref.h" |
10 #include "base/callback_forward.h" | 10 #include "base/callback_forward.h" |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
61 const ShortcutInfo& info, | 61 const ShortcutInfo& info, |
62 const SkBitmap& icon_bitmap); | 62 const SkBitmap& icon_bitmap); |
63 | 63 |
64 // Called after either: | 64 // Called after either: |
65 // - A request to install the WebAPK has been sent. | 65 // - A request to install the WebAPK has been sent. |
66 // OR | 66 // OR |
67 // - WebAPK creation process fails. | 67 // - WebAPK creation process fails. |
68 // |success| indicates whether the request was issued to the server. A "true" | 68 // |success| indicates whether the request was issued to the server. A "true" |
69 // value of |success| does not guarantee that the WebAPK will be successfully | 69 // value of |success| does not guarantee that the WebAPK will be successfully |
70 // installed. | 70 // installed. |
71 static void OnBuiltWebApk(bool success); | 71 static void OnBuiltWebApk(bool success, const std::string& webapk_package); |
72 | 72 |
73 // Returns the ideal size for an icon representing a web app. | 73 // Returns the ideal size for an icon representing a web app. |
74 static int GetIdealHomescreenIconSizeInDp(); | 74 static int GetIdealHomescreenIconSizeInDp(); |
75 | 75 |
76 // Returns the minimum size for an icon representing a web app. | 76 // Returns the minimum size for an icon representing a web app. |
77 static int GetMinimumHomescreenIconSizeInDp(); | 77 static int GetMinimumHomescreenIconSizeInDp(); |
78 | 78 |
79 // Returns the ideal size for an image displayed on a web app's splash | 79 // Returns the ideal size for an image displayed on a web app's splash |
80 // screen. | 80 // screen. |
81 static int GetIdealSplashImageSizeInDp(); | 81 static int GetIdealSplashImageSizeInDp(); |
(...skipping 29 matching lines...) Expand all Loading... |
111 static bool IsWebApkInstalled(const GURL& url); | 111 static bool IsWebApkInstalled(const GURL& url); |
112 | 112 |
113 private: | 113 private: |
114 ShortcutHelper() = delete; | 114 ShortcutHelper() = delete; |
115 ~ShortcutHelper() = delete; | 115 ~ShortcutHelper() = delete; |
116 | 116 |
117 DISALLOW_COPY_AND_ASSIGN(ShortcutHelper); | 117 DISALLOW_COPY_AND_ASSIGN(ShortcutHelper); |
118 }; | 118 }; |
119 | 119 |
120 #endif // CHROME_BROWSER_ANDROID_SHORTCUT_HELPER_H_ | 120 #endif // CHROME_BROWSER_ANDROID_SHORTCUT_HELPER_H_ |
OLD | NEW |