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

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

Issue 2566573002: DevTools: Open Elements panel sooner on Inspect Element (Closed)
Patch Set: 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 return value;
einbinder 2016/12/09 00:28:56 Should I have a white list of panel names here?
dgozman 2016/12/09 22:19:31 Yes.
einbinder 2016/12/12 22:04:27 Done.
146
144 if (key == "remoteBase") 147 if (key == "remoteBase")
145 return SanitizeRemoteBase(value); 148 return SanitizeRemoteBase(value);
146 149
147 if (key == "remoteFrontendUrl") 150 if (key == "remoteFrontendUrl")
148 return SanitizeRemoteFrontendURL(value); 151 return SanitizeRemoteFrontendURL(value);
149 152
150 return std::string(); 153 return std::string();
151 } 154 }
152 155
153 GURL SanitizeFrontendURL( 156 GURL SanitizeFrontendURL(
(...skipping 283 matching lines...) Expand 10 before | Expand all | Expand 10 after
437 profile, 440 profile,
438 new DevToolsDataSource(profile->GetRequestContext())); 441 new DevToolsDataSource(profile->GetRequestContext()));
439 442
440 GURL url = web_ui->GetWebContents()->GetVisibleURL(); 443 GURL url = web_ui->GetWebContents()->GetVisibleURL();
441 if (url.spec() == SanitizeFrontendURL(url).spec()) 444 if (url.spec() == SanitizeFrontendURL(url).spec())
442 bindings_.reset(new DevToolsUIBindings(web_ui->GetWebContents())); 445 bindings_.reset(new DevToolsUIBindings(web_ui->GetWebContents()));
443 } 446 }
444 447
445 DevToolsUI::~DevToolsUI() { 448 DevToolsUI::~DevToolsUI() {
446 } 449 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698