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

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

Issue 2140463002: Remove WebContents::HasManifest. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Explanatory comment for manifest_url_ resetting 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 | « no previous file | chrome/browser/banners/app_banner_data_fetcher.cc » ('j') | 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 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
140 // Fetches the icon at the given URL asynchronously, returning |false| if a 140 // Fetches the icon at the given URL asynchronously, returning |false| if a
141 // load could not be started. 141 // load could not be started.
142 bool FetchAppIcon(content::WebContents* web_contents, const GURL& url); 142 bool FetchAppIcon(content::WebContents* web_contents, const GURL& url);
143 143
144 // Records that a banner was shown. The |event_name| corresponds to the RAPPOR 144 // Records that a banner was shown. The |event_name| corresponds to the RAPPOR
145 // metric being recorded. 145 // metric being recorded.
146 void RecordDidShowBanner(const std::string& event_name); 146 void RecordDidShowBanner(const std::string& event_name);
147 147
148 private: 148 private:
149 // Callbacks for data retrieval. 149 // Callbacks for data retrieval.
150 void OnDidHasManifest(bool has_manifest);
151 void OnDidGetManifest(const GURL& manifest_url, 150 void OnDidGetManifest(const GURL& manifest_url,
152 const content::Manifest& manifest); 151 const content::Manifest& manifest);
153 void OnDidCheckHasServiceWorker(bool has_service_worker); 152 void OnDidCheckHasServiceWorker(bool has_service_worker);
154 void OnAppIconFetched(const SkBitmap& bitmap); 153 void OnAppIconFetched(const SkBitmap& bitmap);
155 154
156 // Called when it is determined that the webapp has fulfilled the initial 155 // Called when it is determined that the webapp has fulfilled the initial
157 // criteria of having a manifest and a service worker. 156 // criteria of having a manifest and a service worker.
158 void OnHasServiceWorker(content::WebContents* web_contents); 157 void OnHasServiceWorker(content::WebContents* web_contents);
159 158
160 // Returns whether the given web app has already been installed. 159 // Returns whether the given web app has already been installed.
(...skipping 50 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 | « no previous file | chrome/browser/banners/app_banner_data_fetcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698