diff options
Diffstat (limited to 'content')
4 files changed, 16 insertions, 0 deletions
diff --git a/content/browser/devtools/protocol/page_handler.cc b/content/browser/devtools/protocol/page_handler.cc index 7e79a72..e717572 100644 --- a/content/browser/devtools/protocol/page_handler.cc +++ b/content/browser/devtools/protocol/page_handler.cc @@ -357,6 +357,14 @@ Response PageHandler::SetColorPickerEnabled(bool enabled) { return Response::OK(); } +Response PageHandler::RequestAppBanner(bool* result) { + WebContentsImpl* web_contents = GetWebContents(); + if (!web_contents) + return Response::InternalError("Could not connect to view"); + *result = web_contents->GetDelegate()->RequestAppBanner(web_contents); + return Response::OK(); +} + WebContentsImpl* PageHandler::GetWebContents() { return host_ ? static_cast<WebContentsImpl*>(WebContents::FromRenderFrameHost(host_)) : diff --git a/content/browser/devtools/protocol/page_handler.h b/content/browser/devtools/protocol/page_handler.h index 02b685a..d45e581 100644 --- a/content/browser/devtools/protocol/page_handler.h +++ b/content/browser/devtools/protocol/page_handler.h @@ -77,6 +77,7 @@ class PageHandler : public NotificationObserver { const std::string& security_origin); Response SetColorPickerEnabled(bool enabled); + Response RequestAppBanner(bool* result); private: WebContentsImpl* GetWebContents(); diff --git a/content/public/browser/web_contents_delegate.cc b/content/public/browser/web_contents_delegate.cc index 0a1d3f1..165488f 100644 --- a/content/public/browser/web_contents_delegate.cc +++ b/content/public/browser/web_contents_delegate.cc @@ -259,4 +259,8 @@ void WebContentsDelegate::ShowCertificateViewerInDevTools( int cert_id) { } +bool WebContentsDelegate::RequestAppBanner(content::WebContents* web_contents) { + return false; +} + } // namespace content diff --git a/content/public/browser/web_contents_delegate.h b/content/public/browser/web_contents_delegate.h index ed46e43..4145d4a 100644 --- a/content/public/browser/web_contents_delegate.h +++ b/content/public/browser/web_contents_delegate.h @@ -523,6 +523,9 @@ class CONTENT_EXPORT WebContentsDelegate { // compositor proto. This is used in Blimp mode. virtual void ForwardCompositorProto(const std::vector<uint8_t>& proto) {} + // Requests the app banner. This method is called from the DevTools. + virtual bool RequestAppBanner(content::WebContents* web_contents); + protected: virtual ~WebContentsDelegate(); |
