OLD | NEW |
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 "content/shell/shell_main_delegate.h" | 5 #include "content/shell/shell_main_delegate.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/file_path.h" | 8 #include "base/file_path.h" |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/path_service.h" | 10 #include "base/path_service.h" |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
81 | 81 |
82 bool ShellMainDelegate::BasicStartupComplete(int* exit_code) { | 82 bool ShellMainDelegate::BasicStartupComplete(int* exit_code) { |
83 #if defined(OS_WIN) | 83 #if defined(OS_WIN) |
84 // Enable trace control and transport through event tracing for Windows. | 84 // Enable trace control and transport through event tracing for Windows. |
85 logging::LogEventProvider::Initialize(kContentShellProviderName); | 85 logging::LogEventProvider::Initialize(kContentShellProviderName); |
86 #endif | 86 #endif |
87 | 87 |
88 InitLogging(); | 88 InitLogging(); |
89 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kDumpRenderTree)) { | 89 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kDumpRenderTree)) { |
90 CommandLine::ForCurrentProcess()->AppendSwitch( | 90 CommandLine::ForCurrentProcess()->AppendSwitch( |
91 switches::kAllowUniversalAccessFromFiles); | |
92 CommandLine::ForCurrentProcess()->AppendSwitch( | |
93 switches::kAllowFileAccessFromFiles); | 91 switches::kAllowFileAccessFromFiles); |
94 CommandLine::ForCurrentProcess()->AppendSwitch( | 92 CommandLine::ForCurrentProcess()->AppendSwitch( |
95 switches::kForceCompositingMode); | 93 switches::kForceCompositingMode); |
96 net::CookieMonster::EnableFileScheme(); | 94 net::CookieMonster::EnableFileScheme(); |
97 if (!WebKitTestPlatformInitialize()) { | 95 if (!WebKitTestPlatformInitialize()) { |
98 if (exit_code) | 96 if (exit_code) |
99 *exit_code = 1; | 97 *exit_code = 1; |
100 return true; | 98 return true; |
101 } | 99 } |
102 } | 100 } |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
169 browser_client_.reset(new ShellContentBrowserClient); | 167 browser_client_.reset(new ShellContentBrowserClient); |
170 return browser_client_.get(); | 168 return browser_client_.get(); |
171 } | 169 } |
172 | 170 |
173 ContentRendererClient* ShellMainDelegate::CreateContentRendererClient() { | 171 ContentRendererClient* ShellMainDelegate::CreateContentRendererClient() { |
174 renderer_client_.reset(new ShellContentRendererClient); | 172 renderer_client_.reset(new ShellContentRendererClient); |
175 return renderer_client_.get(); | 173 return renderer_client_.get(); |
176 } | 174 } |
177 | 175 |
178 } // namespace content | 176 } // namespace content |
OLD | NEW |