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

Side by Side Diff: chrome/browser/android/webapps/add_to_homescreen_data_fetcher.h

Issue 2773353002: Make minimum PWA icon size the same accross all device densities
Patch Set: Merge branch 'master' into min_size Created 3 years, 8 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 unified diff | Download patch
OLDNEW
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/macros.h" 8 #include "base/macros.h"
9 #include "base/memory/ref_counted.h" 9 #include "base/memory/ref_counted.h"
10 #include "base/task/cancelable_task_tracker.h" 10 #include "base/task/cancelable_task_tracker.h"
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 67
68 protected: 68 protected:
69 virtual ~Observer() {} 69 virtual ~Observer() {}
70 }; 70 };
71 71
72 // Initialize the fetcher by requesting the information about the page from 72 // Initialize the fetcher by requesting the information about the page from
73 // the renderer process. The initialization is asynchronous and 73 // the renderer process. The initialization is asynchronous and
74 // OnDidGetWebApplicationInfo is expected to be called when finished. 74 // OnDidGetWebApplicationInfo is expected to be called when finished.
75 AddToHomescreenDataFetcher(content::WebContents* web_contents, 75 AddToHomescreenDataFetcher(content::WebContents* web_contents,
76 int ideal_icon_size_in_px, 76 int ideal_icon_size_in_px,
77 int minimum_icon_size_in_px,
78 int ideal_splash_image_size_in_px, 77 int ideal_splash_image_size_in_px,
79 int minimum_splash_image_size_in_px,
80 int badge_size_in_px, 78 int badge_size_in_px,
81 bool check_webapk_compatible, 79 bool check_webapk_compatible,
82 Observer* observer); 80 Observer* observer);
83 81
84 // IPC message received when the initialization is finished. 82 // IPC message received when the initialization is finished.
85 void OnDidGetWebApplicationInfo(const WebApplicationInfo& web_app_info); 83 void OnDidGetWebApplicationInfo(const WebApplicationInfo& web_app_info);
86 84
87 // Accessors, etc. 85 // Accessors, etc.
88 void set_weak_observer(Observer* observer) { weak_observer_ = observer; } 86 void set_weak_observer(Observer* observer) { weak_observer_ = observer; }
89 bool is_ready() const { return is_ready_; } 87 bool is_ready() const { return is_ready_; }
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 127
130 // The icons must only be set on the UI thread for thread safety. 128 // The icons must only be set on the UI thread for thread safety.
131 SkBitmap badge_icon_; 129 SkBitmap badge_icon_;
132 SkBitmap primary_icon_; 130 SkBitmap primary_icon_;
133 ShortcutInfo shortcut_info_; 131 ShortcutInfo shortcut_info_;
134 132
135 base::CancelableTaskTracker favicon_task_tracker_; 133 base::CancelableTaskTracker favicon_task_tracker_;
136 base::OneShotTimer data_timeout_timer_; 134 base::OneShotTimer data_timeout_timer_;
137 135
138 const int ideal_icon_size_in_px_; 136 const int ideal_icon_size_in_px_;
139 const int minimum_icon_size_in_px_;
140 const int ideal_splash_image_size_in_px_; 137 const int ideal_splash_image_size_in_px_;
141 const int minimum_splash_image_size_in_px_;
142 const int badge_size_in_px_; 138 const int badge_size_in_px_;
143 139
144 // Indicates whether to check WebAPK compatibility. 140 // Indicates whether to check WebAPK compatibility.
145 bool check_webapk_compatibility_; 141 bool check_webapk_compatibility_;
146 bool is_waiting_for_web_application_info_; 142 bool is_waiting_for_web_application_info_;
147 bool is_installable_check_complete_; 143 bool is_installable_check_complete_;
148 bool is_icon_saved_; 144 bool is_icon_saved_;
149 bool is_ready_; 145 bool is_ready_;
150 146
151 DISALLOW_COPY_AND_ASSIGN(AddToHomescreenDataFetcher); 147 DISALLOW_COPY_AND_ASSIGN(AddToHomescreenDataFetcher);
152 }; 148 };
153 149
154 #endif // CHROME_BROWSER_ANDROID_WEBAPPS_ADD_TO_HOMESCREEN_DATA_FETCHER_H_ 150 #endif // CHROME_BROWSER_ANDROID_WEBAPPS_ADD_TO_HOMESCREEN_DATA_FETCHER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698