| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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_WEBAPPS_ADD_TO_HOMESCREEN_DATA_FETCHER_H_ | 5 #ifndef CHROME_BROWSER_ANDROID_WEBAPPS_ADD_TO_HOMESCREEN_DATA_FETCHER_H_ |
| 6 #define CHROME_BROWSER_ANDROID_WEBAPPS_ADD_TO_HOMESCREEN_DATA_FETCHER_H_ | 6 #define CHROME_BROWSER_ANDROID_WEBAPPS_ADD_TO_HOMESCREEN_DATA_FETCHER_H_ |
| 7 | 7 |
| 8 #include "base/callback_forward.h" | 8 #include "base/callback_forward.h" |
| 9 #include "base/macros.h" | 9 #include "base/macros.h" |
| 10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 69 // Initialize the fetcher by requesting the information about the page from | 69 // Initialize the fetcher by requesting the information about the page from |
| 70 // the renderer process. The initialization is asynchronous and | 70 // the renderer process. The initialization is asynchronous and |
| 71 // OnDidGetWebApplicationInfo is expected to be called when finished. | 71 // OnDidGetWebApplicationInfo is expected to be called when finished. |
| 72 AddToHomescreenDataFetcher(content::WebContents* web_contents, | 72 AddToHomescreenDataFetcher(content::WebContents* web_contents, |
| 73 int ideal_icon_size_in_px, | 73 int ideal_icon_size_in_px, |
| 74 int minimum_icon_size_in_px, | 74 int minimum_icon_size_in_px, |
| 75 int ideal_splash_image_size_in_px, | 75 int ideal_splash_image_size_in_px, |
| 76 int minimum_splash_image_size_in_px, | 76 int minimum_splash_image_size_in_px, |
| 77 int badge_size_in_px, | 77 int badge_size_in_px, |
| 78 bool check_webapk_compatible, | 78 bool check_webapk_compatible, |
| 79 bool can_use_webapk_install_flow, |
| 79 Observer* observer); | 80 Observer* observer); |
| 80 | 81 |
| 81 // Returns a callback which fetches the splash screen image to be stored for | 82 // Returns a callback which fetches the splash screen image to be stored for |
| 82 // the webapp with the specified |id|. | 83 // the webapp with the specified |id|. |
| 83 base::Closure FetchSplashScreenImageCallback(const std::string& id); | 84 base::Closure FetchSplashScreenImageCallback(const std::string& id); |
| 84 | 85 |
| 85 // IPC message received when the initialization is finished. | 86 // IPC message received when the initialization is finished. |
| 86 void OnDidGetWebApplicationInfo(const WebApplicationInfo& web_app_info); | 87 void OnDidGetWebApplicationInfo(const WebApplicationInfo& web_app_info); |
| 87 | 88 |
| 88 // Accessors, etc. | 89 // Accessors, etc. |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 140 const int ideal_splash_image_size_in_px_; | 141 const int ideal_splash_image_size_in_px_; |
| 141 const int minimum_splash_image_size_in_px_; | 142 const int minimum_splash_image_size_in_px_; |
| 142 const int badge_size_in_px_; | 143 const int badge_size_in_px_; |
| 143 | 144 |
| 144 // Indicates whether to check WebAPK compatibility. | 145 // Indicates whether to check WebAPK compatibility. |
| 145 bool check_webapk_compatibility_; | 146 bool check_webapk_compatibility_; |
| 146 bool is_waiting_for_web_application_info_; | 147 bool is_waiting_for_web_application_info_; |
| 147 bool is_installable_check_complete_; | 148 bool is_installable_check_complete_; |
| 148 bool is_icon_saved_; | 149 bool is_icon_saved_; |
| 149 bool is_ready_; | 150 bool is_ready_; |
| 151 bool can_use_webapk_install_flow_; |
| 150 | 152 |
| 151 DISALLOW_COPY_AND_ASSIGN(AddToHomescreenDataFetcher); | 153 DISALLOW_COPY_AND_ASSIGN(AddToHomescreenDataFetcher); |
| 152 }; | 154 }; |
| 153 | 155 |
| 154 #endif // CHROME_BROWSER_ANDROID_WEBAPPS_ADD_TO_HOMESCREEN_DATA_FETCHER_H_ | 156 #endif // CHROME_BROWSER_ANDROID_WEBAPPS_ADD_TO_HOMESCREEN_DATA_FETCHER_H_ |
| OLD | NEW |