Index: content/shell/shell_browser_main.cc |
diff --git a/content/shell/shell_browser_main.cc b/content/shell/shell_browser_main.cc |
index 311b6a0d813df1cab64e86fbd7d4611809fd8484..8357915c6a1001bcb8f5c8f0b8895e4b65efee81 100644 |
--- a/content/shell/shell_browser_main.cc |
+++ b/content/shell/shell_browser_main.cc |
@@ -13,9 +13,11 @@ |
#include "content/browser/download/download_file_manager.h" |
#include "content/browser/download/save_file_manager.h" |
#include "content/browser/plugin_service_impl.h" |
+#include "content/public/common/main_function_params.h" |
#include "content/shell/shell.h" |
#include "content/shell/shell_browser_context.h" |
#include "content/shell/shell_content_browser_client.h" |
+#include "content/shell/shell_switches.h" |
#include "net/base/net_module.h" |
#include "ui/base/clipboard/clipboard.h" |
@@ -32,7 +34,8 @@ static GURL GetStartupURL() { |
ShellBrowserMainParts::ShellBrowserMainParts( |
const content::MainFunctionParams& parameters) |
- : BrowserMainParts() { |
+ : BrowserMainParts(), |
+ dump_as_text_(parameters.command_line.HasSwitch(switches::kTree)) { |
ShellContentBrowserClient* shell_browser_client = |
static_cast<ShellContentBrowserClient*>( |
content::GetContentClient()->browser()); |
@@ -48,11 +51,12 @@ void ShellBrowserMainParts::PreMainMessageLoopRun() { |
Shell::PlatformInitialize(); |
net::NetModule::SetResourceProvider(Shell::PlatformResourceProvider); |
- Shell::CreateNewWindow(browser_context_.get(), |
- GetStartupURL(), |
- NULL, |
- MSG_ROUTING_NONE, |
- NULL); |
+ Shell* shell = Shell::CreateNewWindow(browser_context_.get(), |
+ GetStartupURL(), |
+ NULL, |
+ MSG_ROUTING_NONE, |
+ NULL); |
+ shell->SetDumpAsText(dump_as_text_); |
} |
void ShellBrowserMainParts::PostMainMessageLoopRun() { |