Chromium Code Reviews| Index: chrome/browser/banners/app_banner_manager.cc |
| diff --git a/chrome/browser/banners/app_banner_manager.cc b/chrome/browser/banners/app_banner_manager.cc |
| index fdbf80b17677caf4fe6eeca51a5d479730fdffaf..95c4a82c1460102b2fdb81bac2dd8e33658f7c44 100644 |
| --- a/chrome/browser/banners/app_banner_manager.cc |
| +++ b/chrome/browser/banners/app_banner_manager.cc |
| @@ -18,8 +18,14 @@ |
| namespace { |
| bool gDisableSecureCheckForTesting = false; |
| + |
| +// Used for non-mobile platforms. |
| +int kMinimumIconSize = 144; |
|
benwells
2015/06/02 05:53:35
Can we use the extension icon constant? At some po
dominickn (DO NOT USE)
2015/06/02 06:51:32
The extensions code isn't compiled on Android, so
|
| + |
| } // anonymous namespace |
| +DEFINE_WEB_CONTENTS_USER_DATA_KEY(banners::AppBannerManager); |
| + |
| namespace banners { |
| bool AppBannerManager::URLsAreForTheSamePage(const GURL& first, |
| @@ -34,6 +40,13 @@ AppBannerManager::AppBannerManager(int icon_size) |
| weak_factory_(this) { |
| } |
| +AppBannerManager::AppBannerManager(content::WebContents* web_contents) |
| + : content::WebContentsObserver(web_contents), |
| + ideal_icon_size_(kMinimumIconSize), |
| + data_fetcher_(nullptr), |
| + weak_factory_(this) { |
| +} |
| + |
| AppBannerManager::~AppBannerManager() { |
| CancelActiveFetcher(); |
| } |
| @@ -63,7 +76,6 @@ void AppBannerManager::DidFinishLoad( |
| data_fetcher_->Start(validated_url); |
| } |
| - |
| bool AppBannerManager::HandleNonWebApp(const std::string& platform, |
| const GURL& url, |
| const std::string& id) { |