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

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

Issue 1569893003: Add "Request app banner" context menu in DevTools (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: incorporated pfeldman's comment 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
« no previous file with comments | « chrome/browser/banners/app_banner_debug_log.cc ('k') | chrome/browser/banners/app_banner_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/banners/app_banner_manager.h
diff --git a/chrome/browser/banners/app_banner_manager.h b/chrome/browser/banners/app_banner_manager.h
index c11b4cb121197f0d7ab9d69e51142e5c318522aa..efcf332d9233d52e778f932397bd9ec4b6067541 100644
--- a/chrome/browser/banners/app_banner_manager.h
+++ b/chrome/browser/banners/app_banner_manager.h
@@ -39,6 +39,12 @@ class AppBannerManager : public content::WebContentsObserver,
// Returns whether or not the URLs match for everything except for the ref.
static bool URLsAreForTheSamePage(const GURL& first, const GURL& second);
+ // Requests an app banner. Set |is_debug_mode| when it is triggered by the
+ // developer's action in DevTools.
+ void RequestAppBanner(content::RenderFrameHost* render_frame_host,
+ const GURL& validated_url,
+ bool is_debug_mode);
+
AppBannerManager();
~AppBannerManager() override;
@@ -49,7 +55,8 @@ class AppBannerManager : public content::WebContentsObserver,
// Creates an AppBannerDataFetcher, which constructs an app banner.
virtual AppBannerDataFetcher* CreateAppBannerDataFetcher(
- base::WeakPtr<AppBannerDataFetcher::Delegate> weak_delegate) = 0;
+ base::WeakPtr<AppBannerDataFetcher::Delegate> weak_delegate,
+ bool is_debug_mode) = 0;
// Return whether the AppBannerDataFetcher is active.
bool IsFetcherActive();
@@ -68,7 +75,8 @@ class AppBannerManager : public content::WebContentsObserver,
// AppBannerDataFetcher::Delegate overrides.
bool HandleNonWebApp(const std::string& platform,
const GURL& url,
- const std::string& id) override;
+ const std::string& id,
+ bool is_debug_mode) override;
// Cancels an active DataFetcher, stopping its banners from appearing.
void CancelActiveFetcher();
« no previous file with comments | « chrome/browser/banners/app_banner_debug_log.cc ('k') | chrome/browser/banners/app_banner_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698