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

Unified Diff: chrome/browser/banners/app_banner_data_fetcher.h

Issue 2050933002: Upstream: Add additional checks before creating a WebAPK after clicking "Add to Homescreen" (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/banners/app_banner_data_fetcher.h
diff --git a/chrome/browser/banners/app_banner_data_fetcher.h b/chrome/browser/banners/app_banner_data_fetcher.h
index e07d839c480019efb53c7902820a3fd0d6b219e8..d2e09467646ad43f5e2c4b384928b82a52370e6a 100644
--- a/chrome/browser/banners/app_banner_data_fetcher.h
+++ b/chrome/browser/banners/app_banner_data_fetcher.h
@@ -12,6 +12,7 @@
#include "base/memory/weak_ptr.h"
#include "base/observer_list.h"
#include "base/time/time.h"
+#include "chrome/browser/banners/app_banner_debug_log.h"
#include "chrome/common/web_application_info.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/web_contents.h"
@@ -130,6 +131,11 @@ class AppBannerDataFetcher : public base::RefCountedThreadSafe<
void OnRequestShowAppBanner(content::RenderFrameHost* render_frame_host,
int request_id);
+ // Returns whether the given Manifest meets the requirements to show a web app
+ // banner. If not, sets |code| to the reason why.
+ virtual bool CheckManifest(const content::Manifest& manifest,
+ OutputDeveloperMessageCode* code);
+
content::WebContents* GetWebContents();
virtual std::string GetAppIdentifier();
const content::Manifest& web_app_data() { return web_app_data_; }
@@ -176,12 +182,6 @@ class AppBannerDataFetcher : public base::RefCountedThreadSafe<
// closed.
bool CheckFetcherIsStillAlive(content::WebContents* web_contents);
- // Returns whether the given Manifest is following the requirements to show
- // a web app banner.
- static bool IsManifestValidForWebApp(const content::Manifest& manifest,
- content::WebContents* web_contents,
- bool is_debug_mode);
-
const base::WeakPtr<Delegate> weak_delegate_;
const int ideal_icon_size_in_dp_;
const int minimum_icon_size_in_dp_;

Powered by Google App Engine
This is Rietveld 408576698