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

Side by Side Diff: chrome/browser/banners/app_banner_manager.h

Issue 2589503002: Use exact pixel sizes instead of dip in webapp/WebAPK installability code (Closed)
Patch Set: Created 4 years 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_BANNERS_APP_BANNER_MANAGER_H_ 5 #ifndef CHROME_BROWSER_BANNERS_APP_BANNER_MANAGER_H_
6 #define CHROME_BROWSER_BANNERS_APP_BANNER_MANAGER_H_ 6 #define CHROME_BROWSER_BANNERS_APP_BANNER_MANAGER_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 104
105 // Return a string describing what type of banner is being created. Used when 105 // Return a string describing what type of banner is being created. Used when
106 // alerting websites that a banner is about to be created. 106 // alerting websites that a banner is about to be created.
107 virtual std::string GetBannerType(); 107 virtual std::string GetBannerType();
108 108
109 // Returns a string parameter for a devtools console message corresponding to 109 // Returns a string parameter for a devtools console message corresponding to
110 // |code|. Returns the empty string if |code| requires no parameter. 110 // |code|. Returns the empty string if |code| requires no parameter.
111 std::string GetStatusParam(InstallableStatusCode code); 111 std::string GetStatusParam(InstallableStatusCode code);
112 112
113 // Returns the ideal and minimum icon sizes required for being installable. 113 // Returns the ideal and minimum icon sizes required for being installable.
114 virtual int GetIdealIconSizeInDp(); 114 virtual int GetIdealIconSizeInPx();
115 virtual int GetMinimumIconSizeInDp(); 115 virtual int GetMinimumIconSizeInPx();
116 116
117 // Returns a WeakPtr to this object. Exposed so subclasses/infobars may 117 // Returns a WeakPtr to this object. Exposed so subclasses/infobars may
118 // may bind callbacks without needing their own WeakPtrFactory. 118 // may bind callbacks without needing their own WeakPtrFactory.
119 base::WeakPtr<AppBannerManager> GetWeakPtr(); 119 base::WeakPtr<AppBannerManager> GetWeakPtr();
120 120
121 // Returns true if |is_debug_mode_| is true or the 121 // Returns true if |is_debug_mode_| is true or the
122 // kBypassAppBannerEngagementChecks flag is set. 122 // kBypassAppBannerEngagementChecks flag is set.
123 virtual bool IsDebugMode() const; 123 virtual bool IsDebugMode() const;
124 124
125 // Returns true if the webapp at |start_url| has already been installed. 125 // Returns true if the webapp at |start_url| has already been installed.
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
269 // scoped to the WebContents which they are observing. This allows us to use 269 // scoped to the WebContents which they are observing. This allows us to use
270 // weak pointers for callbacks. 270 // weak pointers for callbacks.
271 base::WeakPtrFactory<AppBannerManager> weak_factory_; 271 base::WeakPtrFactory<AppBannerManager> weak_factory_;
272 272
273 DISALLOW_COPY_AND_ASSIGN(AppBannerManager); 273 DISALLOW_COPY_AND_ASSIGN(AppBannerManager);
274 }; 274 };
275 275
276 } // namespace banners 276 } // namespace banners
277 277
278 #endif // CHROME_BROWSER_BANNERS_APP_BANNER_MANAGER_H_ 278 #endif // CHROME_BROWSER_BANNERS_APP_BANNER_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698