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

Side by Side Diff: chrome/browser/ui/webui/devtools_ui.cc

Issue 2566573002: DevTools: Open Elements panel sooner on Inspect Element (Closed)
Patch Set: ShowConsolePanel Created 4 years 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/ui/webui/devtools_ui.h" 5 #include "chrome/browser/ui/webui/devtools_ui.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "base/memory/ref_counted_memory.h" 9 #include "base/memory/ref_counted_memory.h"
10 #include "base/strings/string_split.h" 10 #include "base/strings/string_split.h"
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 return "true"; 134 return "true";
135 135
136 // Pass connection endpoints as is. 136 // Pass connection endpoints as is.
137 if (key == "ws" || key == "service-backend") 137 if (key == "ws" || key == "service-backend")
138 return SanitizeEndpoint(value); 138 return SanitizeEndpoint(value);
139 139
140 // Only support undocked for old frontends. 140 // Only support undocked for old frontends.
141 if (key == "dockSide" && value == "undocked") 141 if (key == "dockSide" && value == "undocked")
142 return value; 142 return value;
143 143
144 if (key == "panel" &&
145 (value == "elements" || value == "security" || value == "console"))
146 return value;
147
144 if (key == "remoteBase") 148 if (key == "remoteBase")
145 return SanitizeRemoteBase(value); 149 return SanitizeRemoteBase(value);
146 150
147 if (key == "remoteFrontendUrl") 151 if (key == "remoteFrontendUrl")
148 return SanitizeRemoteFrontendURL(value); 152 return SanitizeRemoteFrontendURL(value);
149 153
150 return std::string(); 154 return std::string();
151 } 155 }
152 156
153 GURL SanitizeFrontendURL( 157 GURL SanitizeFrontendURL(
(...skipping 283 matching lines...) Expand 10 before | Expand all | Expand 10 after
437 profile, 441 profile,
438 new DevToolsDataSource(profile->GetRequestContext())); 442 new DevToolsDataSource(profile->GetRequestContext()));
439 443
440 GURL url = web_ui->GetWebContents()->GetVisibleURL(); 444 GURL url = web_ui->GetWebContents()->GetVisibleURL();
441 if (url.spec() == SanitizeFrontendURL(url).spec()) 445 if (url.spec() == SanitizeFrontendURL(url).spec())
442 bindings_.reset(new DevToolsUIBindings(web_ui->GetWebContents())); 446 bindings_.reset(new DevToolsUIBindings(web_ui->GetWebContents()));
443 } 447 }
444 448
445 DevToolsUI::~DevToolsUI() { 449 DevToolsUI::~DevToolsUI() {
446 } 450 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698