OLD | NEW |
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 Loading... |
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 Loading... |
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_ |
OLD | NEW |