Chromium Code Reviews| 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 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 95 const std::string& webapp_id); | 95 const std::string& webapp_id); |
| 96 | 96 |
| 97 // Stores the webapp splash screen in the WebappDataStorage associated with | 97 // Stores the webapp splash screen in the WebappDataStorage associated with |
| 98 // |webapp_id|. | 98 // |webapp_id|. |
| 99 static void StoreWebappSplashImage(const std::string& webapp_id, | 99 static void StoreWebappSplashImage(const std::string& webapp_id, |
| 100 const SkBitmap& splash_image); | 100 const SkBitmap& splash_image); |
| 101 | 101 |
| 102 // Returns the given icon, modified to match the launcher requirements. | 102 // Returns the given icon, modified to match the launcher requirements. |
| 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 // Must not be called on the UI thread. |
|
dominickn
2016/08/08 03:13:41
Nit: "Must be called on a background worker thread
| |
| 106 const GURL& url, | 106 static SkBitmap FinalizeLauncherIconInBackground(const SkBitmap& icon, |
| 107 bool* is_generated); | 107 const GURL& url, |
| 108 bool* is_generated); | |
| 108 | 109 |
| 109 // Returns true if WebAPKs are enabled and there is a WebAPK installed which | 110 // Returns true if WebAPKs are enabled and there is a WebAPK installed which |
| 110 // can handle |url|. | 111 // can handle |url|. |
| 111 static bool IsWebApkInstalled(const GURL& url); | 112 static bool IsWebApkInstalled(const GURL& url); |
| 112 | 113 |
| 113 private: | 114 private: |
| 114 ShortcutHelper() = delete; | 115 ShortcutHelper() = delete; |
| 115 ~ShortcutHelper() = delete; | 116 ~ShortcutHelper() = delete; |
| 116 | 117 |
| 117 DISALLOW_COPY_AND_ASSIGN(ShortcutHelper); | 118 DISALLOW_COPY_AND_ASSIGN(ShortcutHelper); |
| 118 }; | 119 }; |
| 119 | 120 |
| 120 #endif // CHROME_BROWSER_ANDROID_SHORTCUT_HELPER_H_ | 121 #endif // CHROME_BROWSER_ANDROID_SHORTCUT_HELPER_H_ |
| OLD | NEW |