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( |
91 switches::kAllowFileAccessFromFiles); | 93 switches::kAllowFileAccessFromFiles); |
92 CommandLine::ForCurrentProcess()->AppendSwitch( | 94 CommandLine::ForCurrentProcess()->AppendSwitch( |
93 switches::kForceCompositingMode); | 95 switches::kForceCompositingMode); |
94 net::CookieMonster::EnableFileScheme(); | 96 net::CookieMonster::EnableFileScheme(); |
95 if (!WebKitTestPlatformInitialize()) { | 97 if (!WebKitTestPlatformInitialize()) { |
96 if (exit_code) | 98 if (exit_code) |
97 *exit_code = 1; | 99 *exit_code = 1; |
98 return true; | 100 return true; |
99 } | 101 } |
100 } | 102 } |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
167 browser_client_.reset(new ShellContentBrowserClient); | 169 browser_client_.reset(new ShellContentBrowserClient); |
168 return browser_client_.get(); | 170 return browser_client_.get(); |
169 } | 171 } |
170 | 172 |
171 ContentRendererClient* ShellMainDelegate::CreateContentRendererClient() { | 173 ContentRendererClient* ShellMainDelegate::CreateContentRendererClient() { |
172 renderer_client_.reset(new ShellContentRendererClient); | 174 renderer_client_.reset(new ShellContentRendererClient); |
173 return renderer_client_.get(); | 175 return renderer_client_.get(); |
174 } | 176 } |
175 | 177 |
176 } // namespace content | 178 } // namespace content |
OLD | NEW |