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/files/file_path.h" | 8 #include "base/files/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" |
11 #include "content/public/browser/browser_main_runner.h" | 11 #include "content/public/browser/browser_main_runner.h" |
12 #include "content/public/common/content_switches.h" | 12 #include "content/public/common/content_switches.h" |
13 #include "content/public/common/url_constants.h" | 13 #include "content/public/common/url_constants.h" |
14 #include "content/shell/shell_browser_main.h" | 14 #include "content/shell/shell_browser_main.h" |
15 #include "content/shell/shell_content_browser_client.h" | 15 #include "content/shell/shell_content_browser_client.h" |
16 #include "content/shell/shell_content_renderer_client.h" | 16 #include "content/shell/shell_content_renderer_client.h" |
17 #include "content/shell/shell_switches.h" | 17 #include "content/shell/shell_switches.h" |
18 #include "content/shell/webkit_test_platform_support.h" | 18 #include "content/shell/webkit_test_platform_support.h" |
19 #include "content/public/test/layouttest_support.h" | |
19 #include "net/cookies/cookie_monster.h" | 20 #include "net/cookies/cookie_monster.h" |
20 #include "ui/base/resource/resource_bundle.h" | 21 #include "ui/base/resource/resource_bundle.h" |
21 #include "ui/base/ui_base_paths.h" | 22 #include "ui/base/ui_base_paths.h" |
22 #include "ui/base/ui_base_switches.h" | 23 #include "ui/base/ui_base_switches.h" |
23 #include "ui/gl/gl_switches.h" | 24 #include "ui/gl/gl_switches.h" |
24 | 25 |
25 #include "ipc/ipc_message.h" // For IPC_MESSAGE_LOG_ENABLED. | 26 #include "ipc/ipc_message.h" // For IPC_MESSAGE_LOG_ENABLED. |
26 | 27 |
27 #if defined(IPC_MESSAGE_LOG_ENABLED) | 28 #if defined(IPC_MESSAGE_LOG_ENABLED) |
28 #define IPC_MESSAGE_MACROS_LOG_ENABLED | 29 #define IPC_MESSAGE_MACROS_LOG_ENABLED |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
93 // Enable trace control and transport through event tracing for Windows. | 94 // Enable trace control and transport through event tracing for Windows. |
94 logging::LogEventProvider::Initialize(kContentShellProviderName); | 95 logging::LogEventProvider::Initialize(kContentShellProviderName); |
95 #endif | 96 #endif |
96 | 97 |
97 InitLogging(); | 98 InitLogging(); |
98 CommandLine& command_line = *CommandLine::ForCurrentProcess(); | 99 CommandLine& command_line = *CommandLine::ForCurrentProcess(); |
99 if (command_line.HasSwitch(switches::kDumpRenderTree)) { | 100 if (command_line.HasSwitch(switches::kDumpRenderTree)) { |
100 command_line.AppendSwitch(switches::kAllowFileAccessFromFiles); | 101 command_line.AppendSwitch(switches::kAllowFileAccessFromFiles); |
101 command_line.AppendSwitchASCII( | 102 command_line.AppendSwitchASCII( |
102 switches::kUseGL, gfx::kGLImplementationOSMesaName); | 103 switches::kUseGL, gfx::kGLImplementationOSMesaName); |
104 SetAllowOSMesaImageTransportForTesting(); | |
jochen (gone - plz use gerrit)
2013/02/26 14:35:18
this code only runs in the browser process. Is thi
Nico
2013/02/26 14:37:25
Apparently :-P
I think the gpu <-> browser io sur
| |
103 command_line.AppendSwitch(switches::kIgnoreGpuBlacklist); | 105 command_line.AppendSwitch(switches::kIgnoreGpuBlacklist); |
104 command_line.AppendSwitch(switches::kEnableExperimentalWebKitFeatures); | 106 command_line.AppendSwitch(switches::kEnableExperimentalWebKitFeatures); |
105 command_line.AppendSwitch(switches::kEnableCssShaders); | 107 command_line.AppendSwitch(switches::kEnableCssShaders); |
106 command_line.AppendSwitchASCII(switches::kTouchEvents, | 108 command_line.AppendSwitchASCII(switches::kTouchEvents, |
107 switches::kTouchEventsEnabled); | 109 switches::kTouchEventsEnabled); |
108 if (command_line.HasSwitch(switches::kEnableSoftwareCompositing)) | 110 if (command_line.HasSwitch(switches::kEnableSoftwareCompositing)) |
109 command_line.AppendSwitch(switches::kEnableSoftwareCompositingGLAdapter); | 111 command_line.AppendSwitch(switches::kEnableSoftwareCompositingGLAdapter); |
110 | 112 |
111 net::CookieMonster::EnableFileScheme(); | 113 net::CookieMonster::EnableFileScheme(); |
112 if (!WebKitTestPlatformInitialize()) { | 114 if (!WebKitTestPlatformInitialize()) { |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
184 browser_client_.reset(new ShellContentBrowserClient); | 186 browser_client_.reset(new ShellContentBrowserClient); |
185 return browser_client_.get(); | 187 return browser_client_.get(); |
186 } | 188 } |
187 | 189 |
188 ContentRendererClient* ShellMainDelegate::CreateContentRendererClient() { | 190 ContentRendererClient* ShellMainDelegate::CreateContentRendererClient() { |
189 renderer_client_.reset(new ShellContentRendererClient); | 191 renderer_client_.reset(new ShellContentRendererClient); |
190 return renderer_client_.get(); | 192 return renderer_client_.get(); |
191 } | 193 } |
192 | 194 |
193 } // namespace content | 195 } // namespace content |
OLD | NEW |