Chromium Code Reviews| 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 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 90 bool ShellMainDelegate::BasicStartupComplete(int* exit_code) { | 90 bool ShellMainDelegate::BasicStartupComplete(int* exit_code) { |
| 91 #if defined(OS_WIN) | 91 #if defined(OS_WIN) |
| 92 // Enable trace control and transport through event tracing for Windows. | 92 // Enable trace control and transport through event tracing for Windows. |
| 93 logging::LogEventProvider::Initialize(kContentShellProviderName); | 93 logging::LogEventProvider::Initialize(kContentShellProviderName); |
| 94 #endif | 94 #endif |
| 95 | 95 |
| 96 InitLogging(); | 96 InitLogging(); |
| 97 CommandLine& command_line = *CommandLine::ForCurrentProcess(); | 97 CommandLine& command_line = *CommandLine::ForCurrentProcess(); |
| 98 if (command_line.HasSwitch(switches::kDumpRenderTree)) { | 98 if (command_line.HasSwitch(switches::kDumpRenderTree)) { |
| 99 command_line.AppendSwitch(switches::kAllowFileAccessFromFiles); | 99 command_line.AppendSwitch(switches::kAllowFileAccessFromFiles); |
| 100 #if !defined(OS_MACOSX) | |
| 100 command_line.AppendSwitchASCII( | 101 command_line.AppendSwitchASCII( |
| 101 switches::kUseGL, gfx::kGLImplementationOSMesaName); | 102 switches::kUseGL, gfx::kGLImplementationOSMesaName); |
|
Nico
2013/02/20 16:05:52
If you remember why you added this, I can add a co
zmo
2013/02/26 20:35:18
OSMesa support on Mac is incomplete, that's why we
| |
| 103 #endif | |
| 102 command_line.AppendSwitch(switches::kIgnoreGpuBlacklist); | 104 command_line.AppendSwitch(switches::kIgnoreGpuBlacklist); |
| 103 command_line.AppendSwitch(switches::kEnableExperimentalWebKitFeatures); | 105 command_line.AppendSwitch(switches::kEnableExperimentalWebKitFeatures); |
| 104 command_line.AppendSwitch(switches::kEnableCssShaders); | 106 command_line.AppendSwitch(switches::kEnableCssShaders); |
| 105 if (command_line.HasSwitch(switches::kEnableSoftwareCompositing)) | 107 if (command_line.HasSwitch(switches::kEnableSoftwareCompositing)) |
| 106 command_line.AppendSwitch(switches::kEnableSoftwareCompositingGLAdapter); | 108 command_line.AppendSwitch(switches::kEnableSoftwareCompositingGLAdapter); |
| 107 | 109 |
| 108 net::CookieMonster::EnableFileScheme(); | 110 net::CookieMonster::EnableFileScheme(); |
| 109 if (!WebKitTestPlatformInitialize()) { | 111 if (!WebKitTestPlatformInitialize()) { |
| 110 if (exit_code) | 112 if (exit_code) |
| 111 *exit_code = 1; | 113 *exit_code = 1; |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 181 browser_client_.reset(new ShellContentBrowserClient); | 183 browser_client_.reset(new ShellContentBrowserClient); |
| 182 return browser_client_.get(); | 184 return browser_client_.get(); |
| 183 } | 185 } |
| 184 | 186 |
| 185 ContentRendererClient* ShellMainDelegate::CreateContentRendererClient() { | 187 ContentRendererClient* ShellMainDelegate::CreateContentRendererClient() { |
| 186 renderer_client_.reset(new ShellContentRendererClient); | 188 renderer_client_.reset(new ShellContentRendererClient); |
| 187 return renderer_client_.get(); | 189 return renderer_client_.get(); |
| 188 } | 190 } |
| 189 | 191 |
| 190 } // namespace content | 192 } // namespace content |
| OLD | NEW |