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 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
103 // This method may generate an entirely new icon; if this is the case, | 103 // This method may generate an entirely new icon; if this is the case, |
104 // |is_generated| will be set to |true|. | 104 // |is_generated| will be set to |true|. |
105 static SkBitmap FinalizeLauncherIcon(const SkBitmap& icon, | 105 static SkBitmap FinalizeLauncherIcon(const SkBitmap& icon, |
106 const GURL& url, | 106 const GURL& url, |
107 bool* is_generated); | 107 bool* is_generated); |
108 | 108 |
109 // Returns true if WebAPKs are enabled and there is a WebAPK installed which | 109 // Returns true if WebAPKs are enabled and there is a WebAPK installed which |
110 // can handle |url|. | 110 // can handle |url|. |
111 static bool IsWebApkInstalled(const GURL& url); | 111 static bool IsWebApkInstalled(const GURL& url); |
112 | 112 |
| 113 // Generates a scope URL based on the passed in |url|. It should be used |
| 114 // when the Web Manifest does not specify a scope URL. |
| 115 static GURL GetScopeFromURL(const GURL& url); |
| 116 |
113 private: | 117 private: |
114 ShortcutHelper() = delete; | 118 ShortcutHelper() = delete; |
115 ~ShortcutHelper() = delete; | 119 ~ShortcutHelper() = delete; |
116 | 120 |
117 DISALLOW_COPY_AND_ASSIGN(ShortcutHelper); | 121 DISALLOW_COPY_AND_ASSIGN(ShortcutHelper); |
118 }; | 122 }; |
119 | 123 |
120 #endif // CHROME_BROWSER_ANDROID_SHORTCUT_HELPER_H_ | 124 #endif // CHROME_BROWSER_ANDROID_SHORTCUT_HELPER_H_ |
OLD | NEW |