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

Unified Diff: chrome/browser/devtools/devtools_window.cc

Issue 1433953002: Implement a ShowSecurityPanel() call in the browser. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Make sure the DevTools stays open if ShowSecurityPanel() is called when DevTools is already open. Created 5 years, 1 month 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/devtools/devtools_window.cc
diff --git a/chrome/browser/devtools/devtools_window.cc b/chrome/browser/devtools/devtools_window.cc
index 41863af5b69883153a826134e32132da0dd64d0c..1105d6af7ca2fd4dd34c79a607c8a5201f2df3c9 100644
--- a/chrome/browser/devtools/devtools_window.cc
+++ b/chrome/browser/devtools/devtools_window.cc
@@ -455,10 +455,10 @@ void DevToolsWindow::ToggleDevToolsWindow(
return;
}
- ToggleDevToolsWindow(
- browser->tab_strip_model()->GetActiveWebContents(),
- action.type() == DevToolsToggleAction::kInspect,
- action, "");
+ bool force_open = action.type() == DevToolsToggleAction::kInspect ||
+ action.type() == DevToolsToggleAction::kShowSecurityPanel;
pfeldman 2015/11/12 18:58:02 This way it is unclear why Console behaves differe
lgarron 2015/11/13 00:03:38 So, we may or may not need one. The call from //c/
+ ToggleDevToolsWindow(browser->tab_strip_model()->GetActiveWebContents(),
lgarron 2015/11/11 11:01:50 External code can't call this private ToggleDevToo
+ force_open, action, "");
}
// static
@@ -1201,6 +1201,11 @@ void DevToolsWindow::DoAction(const DevToolsToggleAction& action) {
"DevToolsAPI.showConsole", NULL, NULL, NULL);
break;
+ case DevToolsToggleAction::kShowSecurityPanel:
+ bindings_->CallClientFunction("DevToolsAPI.showSecurityPanel", NULL, NULL,
pfeldman 2015/11/12 18:58:02 Lets generalize to "showPanel", "security"
+ NULL);
+ break;
+
case DevToolsToggleAction::kInspect:
bindings_->CallClientFunction(
"DevToolsAPI.enterInspectElementMode", NULL, NULL, NULL);

Powered by Google App Engine
This is Rietveld 408576698