diff options
author | pfeldman@chromium.org <pfeldman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-05-13 13:03:14 +0000 |
---|---|---|
committer | pfeldman@chromium.org <pfeldman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-05-13 13:03:14 +0000 |
commit | 2ef9c45408a75573f5e5325ac0cb17798964b67a (patch) | |
tree | 0454baaeff88824419c7cdeff9e3b0c827102646 | |
parent | 9f2f0170ed6e33f5d65780f90dd34ce1fcaf7d84 (diff) | |
download | chromium_src-2ef9c45408a75573f5e5325ac0cb17798964b67a.zip chromium_src-2ef9c45408a75573f5e5325ac0cb17798964b67a.tar.gz chromium_src-2ef9c45408a75573f5e5325ac0cb17798964b67a.tar.bz2 |
DevTools: enable out of process dev tools by default. Take 2.
Review URL: http://codereview.chromium.org/115292
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@15947 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | chrome/browser/browser.cc | 6 | ||||
-rw-r--r-- | chrome/browser/debugger/debugger_wrapper.cc | 4 | ||||
-rw-r--r-- | chrome/browser/renderer_host/browser_render_process_host.cc | 2 | ||||
-rw-r--r-- | chrome/browser/renderer_host/render_view_host.cc | 8 | ||||
-rw-r--r-- | chrome/common/chrome_switches.cc | 6 | ||||
-rw-r--r-- | chrome/common/chrome_switches.h | 2 | ||||
-rw-r--r-- | chrome/renderer/devtools_agent_filter.cc | 4 | ||||
-rw-r--r-- | chrome/renderer/render_process.cc | 5 | ||||
-rw-r--r-- | chrome/renderer/render_view.cc | 4 |
9 files changed, 23 insertions, 18 deletions
diff --git a/chrome/browser/browser.cc b/chrome/browser/browser.cc index 9f0d027..5edfafc 100644 --- a/chrome/browser/browser.cc +++ b/chrome/browser/browser.cc @@ -2117,11 +2117,11 @@ void Browser::InitCommandState() { command_updater_.UpdateCommandEnabled(IDC_CREATE_SHORTCUTS, false); #if defined(OS_WIN) // Command line debugger conflicts with the new oop one. - bool oop_devtools = CommandLine::ForCurrentProcess()->HasSwitch( - switches::kEnableOutOfProcessDevTools); + bool in_proc_devtools = CommandLine::ForCurrentProcess()->HasSwitch( + switches::kDisableOutOfProcessDevTools); command_updater_.UpdateCommandEnabled(IDC_DEBUGGER, // The debugger doesn't work in single process mode. - !oop_devtools && !RenderProcessHost::run_renderer_in_process()); + in_proc_devtools && !RenderProcessHost::run_renderer_in_process()); #endif command_updater_.UpdateCommandEnabled(IDC_TASK_MANAGER, true); command_updater_.UpdateCommandEnabled(IDC_SELECT_PROFILE, true); diff --git a/chrome/browser/debugger/debugger_wrapper.cc b/chrome/browser/debugger/debugger_wrapper.cc index 8033a83..5f01b9d 100644 --- a/chrome/browser/debugger/debugger_wrapper.cc +++ b/chrome/browser/debugger/debugger_wrapper.cc @@ -17,8 +17,8 @@ DebuggerWrapper::DebuggerWrapper(int port) { #ifndef CHROME_DEBUGGER_DISABLED if (port > 0) { - if (!CommandLine::ForCurrentProcess()->HasSwitch( - switches::kEnableOutOfProcessDevTools)) { + if (CommandLine::ForCurrentProcess()->HasSwitch( + switches::kDisableOutOfProcessDevTools)) { DebuggerInputOutputSocket *io = new DebuggerInputOutputSocket(port); debugger_ = new DebuggerShell(io); debugger_->Start(); diff --git a/chrome/browser/renderer_host/browser_render_process_host.cc b/chrome/browser/renderer_host/browser_render_process_host.cc index fce7128..f960a1e 100644 --- a/chrome/browser/renderer_host/browser_render_process_host.cc +++ b/chrome/browser/renderer_host/browser_render_process_host.cc @@ -263,7 +263,7 @@ bool BrowserRenderProcessHost::Init() { switches::kEnableWebWorkers, switches::kEnableStatsTable, switches::kEnableExtensions, - switches::kEnableOutOfProcessDevTools, + switches::kDisableOutOfProcessDevTools, switches::kAutoSpellCorrect, switches::kDisableAudio, switches::kSimpleDataSource, diff --git a/chrome/browser/renderer_host/render_view_host.cc b/chrome/browser/renderer_host/render_view_host.cc index 3519497..0083ad9 100644 --- a/chrome/browser/renderer_host/render_view_host.cc +++ b/chrome/browser/renderer_host/render_view_host.cc @@ -560,8 +560,8 @@ void RenderViewHost::CopyImageAt(int x, int y) { } void RenderViewHost::InspectElementAt(int x, int y) { - if (CommandLine::ForCurrentProcess()->HasSwitch( - switches::kEnableOutOfProcessDevTools)) { + if (!CommandLine::ForCurrentProcess()->HasSwitch( + switches::kDisableOutOfProcessDevTools)) { DevToolsManager* manager = g_browser_process->devtools_manager(); manager->InspectElement(this, x, y); } else { @@ -572,8 +572,8 @@ void RenderViewHost::InspectElementAt(int x, int y) { } void RenderViewHost::ShowJavaScriptConsole() { - if (CommandLine::ForCurrentProcess()->HasSwitch( - switches::kEnableOutOfProcessDevTools)) { + if (!CommandLine::ForCurrentProcess()->HasSwitch( + switches::kDisableOutOfProcessDevTools)) { DevToolsManager* manager = g_browser_process->devtools_manager(); manager->OpenDevToolsWindow(this); } else { diff --git a/chrome/common/chrome_switches.cc b/chrome/common/chrome_switches.cc index 45e4e97..680e479 100644 --- a/chrome/common/chrome_switches.cc +++ b/chrome/common/chrome_switches.cc @@ -411,9 +411,9 @@ const wchar_t kNewFtp[] = L"new-ftp"; // can connect to a channel, provided it knows its name. For debugging purposes. const wchar_t kIPCUseFIFO[] = L"ipc-use-fifo"; -// If this flag is set open out of process developer tools window instead of -// Console Debugger when user clicks "Debug JavaScript". -const wchar_t kEnableOutOfProcessDevTools[] = L"enable-oop-devtools"; +// If this flag is set open old 'in process' WebInspector window instead of +// new 'out of process' dev tool window. +const wchar_t kDisableOutOfProcessDevTools[] = L"disable-oop-devtools"; // Enable HTML5 Worker support const wchar_t kEnableWebWorkers[] = L"enable-web-workers"; diff --git a/chrome/common/chrome_switches.h b/chrome/common/chrome_switches.h index ef3f796..eca5247 100644 --- a/chrome/common/chrome_switches.h +++ b/chrome/common/chrome_switches.h @@ -155,7 +155,7 @@ extern const wchar_t kNewFtp[]; extern const wchar_t kIPCUseFIFO[]; -extern const wchar_t kEnableOutOfProcessDevTools[]; +extern const wchar_t kDisableOutOfProcessDevTools[]; extern const wchar_t kEnableWebWorkers[]; extern const wchar_t kWebWorkerProcessPerCore[]; diff --git a/chrome/renderer/devtools_agent_filter.cc b/chrome/renderer/devtools_agent_filter.cc index 13b76f4..859c69f 100644 --- a/chrome/renderer/devtools_agent_filter.cc +++ b/chrome/renderer/devtools_agent_filter.cc @@ -25,8 +25,8 @@ void DevToolsAgentFilter::DispatchMessageLoop() { DevToolsAgentFilter::DevToolsAgentFilter() : current_routing_id_(0) { const CommandLine& command_line = *CommandLine::ForCurrentProcess(); - devtools_enabled_ = command_line.HasSwitch( - switches::kEnableOutOfProcessDevTools); + devtools_enabled_ = !command_line.HasSwitch( + switches::kDisableOutOfProcessDevTools); if (devtools_enabled_) { WebDevToolsAgent::SetMessageLoopDispatchHandler( &DevToolsAgentFilter::DispatchMessageLoop); diff --git a/chrome/renderer/render_process.cc b/chrome/renderer/render_process.cc index c6ac565..94d353e 100644 --- a/chrome/renderer/render_process.cc +++ b/chrome/renderer/render_process.cc @@ -98,6 +98,11 @@ void RenderProcess::Init() { command_line.GetSwitchValue(switches::kJavaScriptFlags)); } + if (!command_line.HasSwitch(switches::kDisableOutOfProcessDevTools)) { + // Out of process dev tools rely upon auto break behavior. + webkit_glue::SetJavaScriptFlags(L"--debugger-auto-break"); + } + if (command_line.HasSwitch(switches::kEnableWatchdog)) { // TODO(JAR): Need to implement renderer IO msgloop watchdog. } diff --git a/chrome/renderer/render_view.cc b/chrome/renderer/render_view.cc index 979f74f..e4669ca 100644 --- a/chrome/renderer/render_view.cc +++ b/chrome/renderer/render_view.cc @@ -298,8 +298,8 @@ void RenderView::Init(gfx::NativeViewId parent_hwnd, const CommandLine& command_line = *CommandLine::ForCurrentProcess(); - bool dev_tools_enabled = command_line.HasSwitch( - switches::kEnableOutOfProcessDevTools); + bool dev_tools_enabled = !command_line.HasSwitch( + switches::kDisableOutOfProcessDevTools); if (dev_tools_enabled) devtools_agent_.reset(new DevToolsAgent(routing_id, this)); |