Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(5321)

Unified Diff: chrome/browser/android/webapps/add_to_homescreen_data_fetcher.h

Issue 1310223002: webapps: initial addition of splash screen icon downloading (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@webapps-database-exp
Patch Set: Fix compile Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/android/webapps/add_to_homescreen_data_fetcher.h
diff --git a/chrome/browser/android/webapps/add_to_homescreen_data_fetcher.h b/chrome/browser/android/webapps/add_to_homescreen_data_fetcher.h
index 18a41733c506c08bb216c30d5ebe40e3b21234b9..3b40f042a17006ae1d795cd777caebee452772fa 100644
--- a/chrome/browser/android/webapps/add_to_homescreen_data_fetcher.h
+++ b/chrome/browser/android/webapps/add_to_homescreen_data_fetcher.h
@@ -53,8 +53,14 @@ class AddToHomescreenDataFetcher
// renderer process. The initialization is asynchronous and
// OnDidGetWebApplicationInfo is expected to be called when finished.
AddToHomescreenDataFetcher(content::WebContents* web_contents,
+ int ideal_splash_image_size_in_dp,
+ int ideal_icon_size_in_dp,
Observer* observer);
+ // Called to fetch the splash screen image to be stored for the webapp with
+ // the specified |id|.
+ void FetchSplashScreenImage(const std::string& id);
+
// IPC message received when the initialization is finished.
void OnDidGetWebApplicationInfo(const WebApplicationInfo& web_app_info);
@@ -96,13 +102,14 @@ class AddToHomescreenDataFetcher
bool is_ready_;
base::Timer icon_timeout_timer_;
ShortcutInfo shortcut_info_;
+ GURL splash_screen_url_;
// The icon must only be set on the UI thread for thread safety.
SkBitmap shortcut_icon_;
base::CancelableTaskTracker favicon_task_tracker_;
- const int preferred_icon_size_in_px_;
- static const int kPreferredIconSizeInDp;
+ const int ideal_splash_image_size_in_dp_;
+ const int ideal_icon_size_in_dp_;
friend class base::RefCounted<AddToHomescreenDataFetcher>;
DISALLOW_COPY_AND_ASSIGN(AddToHomescreenDataFetcher);
« no previous file with comments | « chrome/browser/android/shortcut_helper.cc ('k') | chrome/browser/android/webapps/add_to_homescreen_data_fetcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698