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

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

Issue 1569893003: Add "Request app banner" context menu in DevTools (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Android support Created 4 years, 11 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 fe943f25037d3fc81edcc32d82ee6ee3cb50839a..5d270f861614e457a16c81887ad40f0ca8b88e1a 100644
--- a/chrome/browser/banners/app_banner_data_fetcher.h
+++ b/chrome/browser/banners/app_banner_data_fetcher.h
@@ -49,7 +49,8 @@ class AppBannerDataFetcher : public base::RefCountedThreadSafe<
// handled, and the fetcher needs to remain active and wait for a callback.
virtual bool HandleNonWebApp(const std::string& platform,
const GURL& url,
- const std::string& id) = 0;
+ const std::string& id,
+ bool is_debug_mode) = 0;
};
// Returns the current time.
@@ -61,7 +62,8 @@ class AppBannerDataFetcher : public base::RefCountedThreadSafe<
AppBannerDataFetcher(content::WebContents* web_contents,
base::WeakPtr<Delegate> weak_delegate,
int ideal_icon_size_in_dp,
- int minimum_icon_size_in_dp);
+ int minimum_icon_size_in_dp,
+ bool is_debug_mode);
// Begins creating a banner for the URL being displayed by the Delegate's
// WebContents.
@@ -95,6 +97,9 @@ class AppBannerDataFetcher : public base::RefCountedThreadSafe<
// Returns the URL that kicked off the banner data retrieval.
const GURL& validated_url() { return validated_url_; }
+ // Returns whether it was created by the user action in DevTools.
+ bool is_debug_mode() const { return is_debug_mode_; }
dominickn 2016/01/17 23:20:18 Nit: after reordering, please place this following
horo 2016/01/18 06:28:56 Done.
+
// WebContentsObserver overrides.
void WebContentsDestroyed() override;
void DidNavigateMainFrame(
@@ -172,7 +177,8 @@ class AppBannerDataFetcher : public base::RefCountedThreadSafe<
// 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);
+ content::WebContents* web_contents,
+ bool is_debug_mode);
const base::WeakPtr<Delegate> weak_delegate_;
const int ideal_icon_size_in_dp_;
@@ -189,6 +195,7 @@ class AppBannerDataFetcher : public base::RefCountedThreadSafe<
GURL validated_url_;
base::string16 app_title_;
content::Manifest web_app_data_;
+ const bool is_debug_mode_;
dominickn 2016/01/17 23:20:18 Nit: please put this below page_requested_prompt s
horo 2016/01/18 06:28:56 Done.
friend struct content::BrowserThread::DeleteOnThread<
content::BrowserThread::UI>;

Powered by Google App Engine
This is Rietveld 408576698