From 9638ad271db786762315556b7c2bc9c0a55c8e76 Mon Sep 17 00:00:00 2001 From: horo Date: Mon, 25 Jan 2016 06:36:45 -0800 Subject: Add "Request app banner" context menu in DevTools BUG=540491 Demo: https://drive.google.com/file/d/0B6skYAFVnosEc1RQRm9KYmxCeXM/view?usp=sharing When the user clicks "Request app banner" context menu, Chrome tries to open "add to homescreen" banner. And if error happens, it will show the detailed information about why the app banner is not opened even if "bypass-app-banner-engagement-checks" flag is not set. RequestAppBanner method from DevTools is handled like this: Android: PageHandler::RequestAppBanner() -> TabWebContentsDelegateAndroid::RequestAppBanner() -> Java TabWebContentsDelegateAndroid.requestAppBanner() -> Java Tab.requestAppBanner() -> Java AppBannerManager.requestAppBanner() -> nativeRequestAppBanner() -> AppBannerManagerAndroid::RequestAppBanner() -> AppBannerManager::TriggerAppBannerFetch() Desktop: PageHandler::RequestAppBanner() -> Browser::RequestAppBanner() -> AppBannerManager::TriggerAppBannerFetch() Review URL: https://codereview.chromium.org/1569893003 Cr-Commit-Position: refs/heads/master@{#371239} --- chrome/browser/banners/app_banner_manager_desktop.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'chrome/browser/banners/app_banner_manager_desktop.h') diff --git a/chrome/browser/banners/app_banner_manager_desktop.h b/chrome/browser/banners/app_banner_manager_desktop.h index fc40997..c45a821 100644 --- a/chrome/browser/banners/app_banner_manager_desktop.h +++ b/chrome/browser/banners/app_banner_manager_desktop.h @@ -21,7 +21,8 @@ class AppBannerManagerDesktop protected: AppBannerDataFetcher* CreateAppBannerDataFetcher( - base::WeakPtr weak_delegate) override; + base::WeakPtr weak_delegate, + bool is_debug_mode) override; private: explicit AppBannerManagerDesktop(content::WebContents* web_contents); -- cgit v1.1