| 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/macros.h" | 10 #include "base/macros.h" |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 45 // Fetches the splash screen image and stores it inside the WebappDataStorage | 45 // Fetches the splash screen image and stores it inside the WebappDataStorage |
| 46 // of the webapp. | 46 // of the webapp. |
| 47 static void FetchSplashScreenImage(content::WebContents* web_contents, | 47 static void FetchSplashScreenImage(content::WebContents* web_contents, |
| 48 const GURL& image_url, | 48 const GURL& image_url, |
| 49 const int ideal_splash_image_size_in_dp, | 49 const int ideal_splash_image_size_in_dp, |
| 50 const int minimum_splash_image_size_in_dp, | 50 const int minimum_splash_image_size_in_dp, |
| 51 const std::string& webapp_id); | 51 const std::string& webapp_id); |
| 52 | 52 |
| 53 // Stores the data of the webapp which is not placed inside the shortcut. | 53 // Stores the data of the webapp which is not placed inside the shortcut. |
| 54 static void StoreWebappData(const std::string& webapp_id, | 54 static void StoreWebappData(const std::string& webapp_id, |
| 55 const std::string& origin_url, |
| 55 const SkBitmap& splash_image); | 56 const SkBitmap& splash_image); |
| 56 | 57 |
| 57 // Modify the given icon to matche the launcher requirements, then returns the | 58 // Modify the given icon to matche the launcher requirements, then returns the |
| 58 // new icon. It might generate an entirely new icon, in which case, | 59 // new icon. It might generate an entirely new icon, in which case, |
| 59 // |is_generated| will be set to |true|. | 60 // |is_generated| will be set to |true|. |
| 60 static SkBitmap FinalizeLauncherIcon(const SkBitmap& icon, | 61 static SkBitmap FinalizeLauncherIcon(const SkBitmap& icon, |
| 61 const GURL& url, | 62 const GURL& url, |
| 62 bool* is_generated); | 63 bool* is_generated); |
| 63 | 64 |
| 64 private: | 65 private: |
| 65 ShortcutHelper() = delete; | 66 ShortcutHelper() = delete; |
| 66 ~ShortcutHelper() = delete; | 67 ~ShortcutHelper() = delete; |
| 67 | 68 |
| 68 DISALLOW_COPY_AND_ASSIGN(ShortcutHelper); | 69 DISALLOW_COPY_AND_ASSIGN(ShortcutHelper); |
| 69 }; | 70 }; |
| 70 | 71 |
| 71 #endif // CHROME_BROWSER_ANDROID_SHORTCUT_HELPER_H_ | 72 #endif // CHROME_BROWSER_ANDROID_SHORTCUT_HELPER_H_ |
| OLD | NEW |