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 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
66 static int GetMinimumHomescreenIconSizeInDp(); | 66 static int GetMinimumHomescreenIconSizeInDp(); |
67 | 67 |
68 // Returns the ideal size for an image displayed on a web app's splash | 68 // Returns the ideal size for an image displayed on a web app's splash |
69 // screen. | 69 // screen. |
70 static int GetIdealSplashImageSizeInDp(); | 70 static int GetIdealSplashImageSizeInDp(); |
71 | 71 |
72 // Returns the minimum size for an image displayed on a web app's splash | 72 // Returns the minimum size for an image displayed on a web app's splash |
73 // screen. | 73 // screen. |
74 static int GetMinimumSplashImageSizeInDp(); | 74 static int GetMinimumSplashImageSizeInDp(); |
75 | 75 |
76 // Called when the homescreen image fetch initiated in FetchHomescreenImage() | |
77 // completes. | |
78 static void OnFetchedHomescreenImage( | |
79 const base::android::ScopedJavaGlobalRef<jobject> j_callback, | |
Xi Han
2016/08/10 15:49:19
java_callback?
pkotwicz
2016/08/10 19:03:47
Done.
| |
80 const SkBitmap& image); | |
81 | |
76 // Fetches the splash screen image and stores it inside the WebappDataStorage | 82 // Fetches the splash screen image and stores it inside the WebappDataStorage |
77 // of the webapp. The WebappDataStorage object *must* have been previously | 83 // of the webapp. The WebappDataStorage object *must* have been previously |
78 // created by |AddShortcutInBackgroundWithSkBitmap|; this method should be | 84 // created by |AddShortcutInBackgroundWithSkBitmap|; this method should be |
79 // passed as a closure to that method. | 85 // passed as a closure to that method. |
80 static void FetchSplashScreenImage(content::WebContents* web_contents, | 86 static void FetchSplashScreenImage(content::WebContents* web_contents, |
81 const GURL& image_url, | 87 const GURL& image_url, |
82 const int ideal_splash_image_size_in_dp, | 88 const int ideal_splash_image_size_in_dp, |
83 const int minimum_splash_image_size_in_dp, | 89 const int minimum_splash_image_size_in_dp, |
84 const std::string& webapp_id); | 90 const std::string& webapp_id); |
85 | 91 |
(...skipping 14 matching lines...) Expand all Loading... | |
100 static bool IsWebApkInstalled(const GURL& url); | 106 static bool IsWebApkInstalled(const GURL& url); |
101 | 107 |
102 private: | 108 private: |
103 ShortcutHelper() = delete; | 109 ShortcutHelper() = delete; |
104 ~ShortcutHelper() = delete; | 110 ~ShortcutHelper() = delete; |
105 | 111 |
106 DISALLOW_COPY_AND_ASSIGN(ShortcutHelper); | 112 DISALLOW_COPY_AND_ASSIGN(ShortcutHelper); |
107 }; | 113 }; |
108 | 114 |
109 #endif // CHROME_BROWSER_ANDROID_SHORTCUT_HELPER_H_ | 115 #endif // CHROME_BROWSER_ANDROID_SHORTCUT_HELPER_H_ |
OLD | NEW |