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

Unified Diff: content/browser/devtools/protocol/page_handler.cc

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 | « content/browser/devtools/protocol/page_handler.h ('k') | content/public/browser/web_contents_delegate.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/devtools/protocol/page_handler.cc
diff --git a/content/browser/devtools/protocol/page_handler.cc b/content/browser/devtools/protocol/page_handler.cc
index 7e79a7200cf851c936c9d6f9b077337cb5b6faf3..e717572cbf14b1c9deca3ae15d49065ff39f54e8 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_)) :
« no previous file with comments | « content/browser/devtools/protocol/page_handler.h ('k') | content/public/browser/web_contents_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698