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

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

Issue 2124703003: Do not show "Add to Home Screen" info bar if WebAPK is installed (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Merge branch 'master' into webapk_app_banner_already_installed Created 4 years, 5 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
« no previous file with comments | « chrome/browser/android/shortcut_helper.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_DATA_FETCHER_H_ 5 #ifndef CHROME_BROWSER_BANNERS_APP_BANNER_DATA_FETCHER_H_
6 #define CHROME_BROWSER_BANNERS_APP_BANNER_DATA_FETCHER_H_ 6 #define CHROME_BROWSER_BANNERS_APP_BANNER_DATA_FETCHER_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
151 void OnDidGetManifest(const GURL& manifest_url, 151 void OnDidGetManifest(const GURL& manifest_url,
152 const content::Manifest& manifest); 152 const content::Manifest& manifest);
153 void OnDidCheckHasServiceWorker(bool has_service_worker); 153 void OnDidCheckHasServiceWorker(bool has_service_worker);
154 void OnAppIconFetched(const SkBitmap& bitmap); 154 void OnAppIconFetched(const SkBitmap& bitmap);
155 155
156 // Called when it is determined that the webapp has fulfilled the initial 156 // Called when it is determined that the webapp has fulfilled the initial
157 // criteria of having a manifest and a service worker. 157 // criteria of having a manifest and a service worker.
158 void OnHasServiceWorker(content::WebContents* web_contents); 158 void OnHasServiceWorker(content::WebContents* web_contents);
159 159
160 // Returns whether the given web app has already been installed. 160 // Returns whether the given web app has already been installed.
161 // Implemented on desktop platforms only.
162 virtual bool IsWebAppInstalled(content::BrowserContext* browser_context, 161 virtual bool IsWebAppInstalled(content::BrowserContext* browser_context,
163 const GURL& start_url); 162 const GURL& start_url);
164 163
165 // Record that the banner could be shown at this point, if the triggering 164 // Record that the banner could be shown at this point, if the triggering
166 // heuristic allowed. 165 // heuristic allowed.
167 void RecordCouldShowBanner(); 166 void RecordCouldShowBanner();
168 167
169 // Creates a banner for the app using the given icon. 168 // Creates a banner for the app using the given icon.
170 virtual void ShowBanner(const GURL& icon_url, 169 virtual void ShowBanner(const GURL& icon_url,
171 const SkBitmap* icon, 170 const SkBitmap* icon,
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
211 content::BrowserThread::UI>; 210 content::BrowserThread::UI>;
212 friend class base::DeleteHelper<AppBannerDataFetcher>; 211 friend class base::DeleteHelper<AppBannerDataFetcher>;
213 friend class AppBannerDataFetcherUnitTest; 212 friend class AppBannerDataFetcherUnitTest;
214 friend class base::RefCounted<AppBannerDataFetcher>; 213 friend class base::RefCounted<AppBannerDataFetcher>;
215 DISALLOW_COPY_AND_ASSIGN(AppBannerDataFetcher); 214 DISALLOW_COPY_AND_ASSIGN(AppBannerDataFetcher);
216 }; 215 };
217 216
218 } // namespace banners 217 } // namespace banners
219 218
220 #endif // CHROME_BROWSER_BANNERS_APP_BANNER_DATA_FETCHER_H_ 219 #endif // CHROME_BROWSER_BANNERS_APP_BANNER_DATA_FETCHER_H_
OLDNEW
« no previous file with comments | « chrome/browser/android/shortcut_helper.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698