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

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: Merge branch 'create_webapk_requirements_enum_class' into create_webapk_requirements2 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 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 214017ede45d586fd632a276c5c4134c668cf120..f9ad536db2b64877e1b65c4330b2a3180df617d5 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 GURL& manifest_url() { return manifest_url_; }
@@ -179,12 +185,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_;
« no previous file with comments | « chrome/browser/android/webapps/add_to_homescreen_data_fetcher.cc ('k') | chrome/browser/banners/app_banner_data_fetcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698