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 30 matching lines...) Expand all Loading... |
41 // Returns the minimum size for an image displayed on a web app's splash | 41 // Returns the minimum size for an image displayed on a web app's splash |
42 // screen. | 42 // screen. |
43 static int GetMinimumSplashImageSizeInDp(); | 43 static int GetMinimumSplashImageSizeInDp(); |
44 | 44 |
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 const std::string& webapp_scope); |
52 | 53 |
53 // Stores the data of the webapp which is not placed inside the shortcut. | 54 // Stores the data of the webapp which is not placed inside the shortcut. |
54 static void StoreWebappData(const std::string& webapp_id, | 55 static void StoreWebappData(const std::string& webapp_id, |
| 56 const std::string& webapp_url, |
55 const SkBitmap& splash_image); | 57 const SkBitmap& splash_image); |
56 | 58 |
57 // Modify the given icon to matche the launcher requirements, then returns the | 59 // 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, | 60 // new icon. It might generate an entirely new icon, in which case, |
59 // |is_generated| will be set to |true|. | 61 // |is_generated| will be set to |true|. |
60 static SkBitmap FinalizeLauncherIcon(const SkBitmap& icon, | 62 static SkBitmap FinalizeLauncherIcon(const SkBitmap& icon, |
61 const GURL& url, | 63 const GURL& url, |
62 bool* is_generated); | 64 bool* is_generated); |
63 | 65 |
64 private: | 66 private: |
65 ShortcutHelper() = delete; | 67 ShortcutHelper() = delete; |
66 ~ShortcutHelper() = delete; | 68 ~ShortcutHelper() = delete; |
67 | 69 |
68 DISALLOW_COPY_AND_ASSIGN(ShortcutHelper); | 70 DISALLOW_COPY_AND_ASSIGN(ShortcutHelper); |
69 }; | 71 }; |
70 | 72 |
71 #endif // CHROME_BROWSER_ANDROID_SHORTCUT_HELPER_H_ | 73 #endif // CHROME_BROWSER_ANDROID_SHORTCUT_HELPER_H_ |
OLD | NEW |