| 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 <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 70 | 70 |
| 71 // Returns the ideal size for a badge icon of a WebAPK. | 71 // Returns the ideal size for a badge icon of a WebAPK. |
| 72 static int GetIdealBadgeIconSizeInPx(); | 72 static int GetIdealBadgeIconSizeInPx(); |
| 73 | 73 |
| 74 // Fetches the splash screen image and stores it inside the WebappDataStorage | 74 // Fetches the splash screen image and stores it inside the WebappDataStorage |
| 75 // of the webapp. The WebappDataStorage object *must* have been previously | 75 // of the webapp. The WebappDataStorage object *must* have been previously |
| 76 // created by |AddShortcutInBackgroundWithSkBitmap|; this method should be | 76 // created by |AddShortcutInBackgroundWithSkBitmap|; this method should be |
| 77 // passed as a closure to that method. | 77 // passed as a closure to that method. |
| 78 static void FetchSplashScreenImage(content::WebContents* web_contents, | 78 static void FetchSplashScreenImage(content::WebContents* web_contents, |
| 79 const GURL& image_url, | 79 const GURL& image_url, |
| 80 const int ideal_splash_image_size_in_dp, | 80 const int ideal_splash_image_size_in_px, |
| 81 const int minimum_splash_image_size_in_dp, | 81 const int minimum_splash_image_size_in_px, |
| 82 const std::string& webapp_id); | 82 const std::string& webapp_id); |
| 83 | 83 |
| 84 // Stores the webapp splash screen in the WebappDataStorage associated with | 84 // Stores the webapp splash screen in the WebappDataStorage associated with |
| 85 // |webapp_id|. | 85 // |webapp_id|. |
| 86 static void StoreWebappSplashImage(const std::string& webapp_id, | 86 static void StoreWebappSplashImage(const std::string& webapp_id, |
| 87 const SkBitmap& splash_image); | 87 const SkBitmap& splash_image); |
| 88 | 88 |
| 89 // Returns the given icon, modified to match the launcher requirements. | 89 // Returns the given icon, modified to match the launcher requirements. |
| 90 // This method may generate an entirely new icon; if this is the case, | 90 // This method may generate an entirely new icon; if this is the case, |
| 91 // |is_generated| will be set to |true|. | 91 // |is_generated| will be set to |true|. |
| (...skipping 18 matching lines...) Expand all Loading... |
| 110 | 110 |
| 111 // Fetches information on all the WebAPKs installed on the device and returns | 111 // Fetches information on all the WebAPKs installed on the device and returns |
| 112 // the info to the |callback|. | 112 // the info to the |callback|. |
| 113 static void RetrieveWebApks(const WebApkInfoCallback& callback); | 113 static void RetrieveWebApks(const WebApkInfoCallback& callback); |
| 114 | 114 |
| 115 private: | 115 private: |
| 116 DISALLOW_IMPLICIT_CONSTRUCTORS(ShortcutHelper); | 116 DISALLOW_IMPLICIT_CONSTRUCTORS(ShortcutHelper); |
| 117 }; | 117 }; |
| 118 | 118 |
| 119 #endif // CHROME_BROWSER_ANDROID_SHORTCUT_HELPER_H_ | 119 #endif // CHROME_BROWSER_ANDROID_SHORTCUT_HELPER_H_ |
| OLD | NEW |