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

Unified Diff: content/shell/browser/shell_devtools_frontend.cc

Issue 644723002: Content Shell: Introduce LayoutTestDevToolsFrontend. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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/shell/browser/shell_devtools_frontend.h ('k') | content/shell/browser/webkit_test_controller.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/shell/browser/shell_devtools_frontend.cc
diff --git a/content/shell/browser/shell_devtools_frontend.cc b/content/shell/browser/shell_devtools_frontend.cc
index b4abeef3cdecc07e35c5c9b7a7c7066e516ff8de..3a4a42f396b1cb882781105c1d68b37bf8d3d4e9 100644
--- a/content/shell/browser/shell_devtools_frontend.cc
+++ b/content/shell/browser/shell_devtools_frontend.cc
@@ -26,44 +26,9 @@
namespace content {
-// DevTools frontend path for inspector LayoutTests.
-GURL GetDevToolsPathAsURL(const std::string& settings,
- const std::string& frontend_url) {
- if (!frontend_url.empty())
- return GURL(frontend_url);
- base::FilePath dir_exe;
- if (!PathService::Get(base::DIR_EXE, &dir_exe)) {
- NOTREACHED();
- return GURL();
- }
-#if defined(OS_MACOSX)
- // On Mac, the executable is in
- // out/Release/Content Shell.app/Contents/MacOS/Content Shell.
- // We need to go up 3 directories to get to out/Release.
- dir_exe = dir_exe.AppendASCII("../../..");
-#endif
- base::FilePath dev_tools_path = dir_exe.AppendASCII(
- "resources/inspector/devtools.html");
-
- GURL result = net::FilePathToFileURL(dev_tools_path);
- if (!settings.empty())
- result = GURL(base::StringPrintf("%s?settings=%s&experiments=true",
- result.spec().c_str(),
- settings.c_str()));
- return result;
-}
-
// static
ShellDevToolsFrontend* ShellDevToolsFrontend::Show(
WebContents* inspected_contents) {
- return ShellDevToolsFrontend::Show(inspected_contents, "", "");
-}
-
-// static
-ShellDevToolsFrontend* ShellDevToolsFrontend::Show(
- WebContents* inspected_contents,
- const std::string& settings,
- const std::string& frontend_url) {
scoped_refptr<DevToolsAgentHost> agent(
DevToolsAgentHost::GetOrCreateFor(inspected_contents));
Shell* shell = Shell::CreateNewWindow(inspected_contents->GetBrowserContext(),
@@ -75,12 +40,10 @@ ShellDevToolsFrontend* ShellDevToolsFrontend::Show(
shell,
agent.get());
- ShellDevToolsDelegate* delegate = ShellContentBrowserClient::Get()->
- shell_browser_main_parts()->devtools_delegate();
- if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kDumpRenderTree))
- shell->LoadURL(GetDevToolsPathAsURL(settings, frontend_url));
- else
- shell->LoadURL(delegate->devtools_http_handler()->GetFrontendURL());
+ ShellDevToolsDelegate* delegate = ShellContentBrowserClient::Get()
+ ->shell_browser_main_parts()
+ ->devtools_delegate();
+ shell->LoadURL(delegate->devtools_http_handler()->GetFrontendURL());
return devtools_frontend;
}
« no previous file with comments | « content/shell/browser/shell_devtools_frontend.h ('k') | content/shell/browser/webkit_test_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698