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/app/shell_main_delegate.h" | 5 #include "content/shell/app/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 "cc/base/switches.h" | 11 #include "cc/base/switches.h" |
12 #include "content/public/browser/browser_main_runner.h" | 12 #include "content/public/browser/browser_main_runner.h" |
13 #include "content/public/common/content_switches.h" | 13 #include "content/public/common/content_switches.h" |
14 #include "content/public/common/url_constants.h" | 14 #include "content/public/common/url_constants.h" |
15 #include "content/public/test/layouttest_support.h" | 15 #include "content/public/test/layouttest_support.h" |
16 #include "content/shell/app/webkit_test_platform_support.h" | 16 #include "content/shell/app/webkit_test_platform_support.h" |
17 #include "content/shell/common/shell_switches.h" | 17 #include "content/shell/common/shell_switches.h" |
18 #include "content/shell/renderer/shell_content_renderer_client.h" | 18 #include "content/shell/renderer/shell_content_renderer_client.h" |
19 #include "content/shell/shell_browser_main.h" | 19 #include "content/shell/shell_browser_main.h" |
20 #include "content/shell/shell_content_browser_client.h" | 20 #include "content/shell/shell_content_browser_client.h" |
| 21 #include "gpu/command_buffer/service/gpu_switches.h" |
21 #include "net/cookies/cookie_monster.h" | 22 #include "net/cookies/cookie_monster.h" |
22 #include "ui/base/resource/resource_bundle.h" | 23 #include "ui/base/resource/resource_bundle.h" |
23 #include "ui/base/ui_base_paths.h" | 24 #include "ui/base/ui_base_paths.h" |
24 #include "ui/base/ui_base_switches.h" | 25 #include "ui/base/ui_base_switches.h" |
25 #include "ui/gl/gl_switches.h" | 26 #include "ui/gl/gl_switches.h" |
26 | 27 |
27 #include "ipc/ipc_message.h" // For IPC_MESSAGE_LOG_ENABLED. | 28 #include "ipc/ipc_message.h" // For IPC_MESSAGE_LOG_ENABLED. |
28 | 29 |
29 #if defined(IPC_MESSAGE_LOG_ENABLED) | 30 #if defined(IPC_MESSAGE_LOG_ENABLED) |
30 #define IPC_MESSAGE_MACROS_LOG_ENABLED | 31 #define IPC_MESSAGE_MACROS_LOG_ENABLED |
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
116 EnableBrowserLayoutTestMode(); | 117 EnableBrowserLayoutTestMode(); |
117 | 118 |
118 command_line.AppendSwitch(switches::kProcessPerTab); | 119 command_line.AppendSwitch(switches::kProcessPerTab); |
119 command_line.AppendSwitch(switches::kEnableLogging); | 120 command_line.AppendSwitch(switches::kEnableLogging); |
120 command_line.AppendSwitch(switches::kAllowFileAccessFromFiles); | 121 command_line.AppendSwitch(switches::kAllowFileAccessFromFiles); |
121 #if !defined(OS_ANDROID) | 122 #if !defined(OS_ANDROID) |
122 // OSMesa is not yet available for Android. http://crbug.com/248925 | 123 // OSMesa is not yet available for Android. http://crbug.com/248925 |
123 command_line.AppendSwitchASCII( | 124 command_line.AppendSwitchASCII( |
124 switches::kUseGL, gfx::kGLImplementationOSMesaName); | 125 switches::kUseGL, gfx::kGLImplementationOSMesaName); |
125 #endif | 126 #endif |
126 command_line.AppendSwitch(switches::kSkipGpuDataLoading); | 127 command_line.AppendSwitch(switches::kIgnoreGpuBlacklist); |
| 128 command_line.AppendSwitch(switches::kDisableGpuDriverBugWorkarounds); |
127 command_line.AppendSwitch(switches::kDisableGpuVsync); | 129 command_line.AppendSwitch(switches::kDisableGpuVsync); |
128 command_line.AppendSwitch(switches::kEnableExperimentalWebPlatformFeatures); | 130 command_line.AppendSwitch(switches::kEnableExperimentalWebPlatformFeatures); |
129 command_line.AppendSwitch(switches::kEnableCssShaders); | 131 command_line.AppendSwitch(switches::kEnableCssShaders); |
130 command_line.AppendSwitchASCII(switches::kTouchEvents, | 132 command_line.AppendSwitchASCII(switches::kTouchEvents, |
131 switches::kTouchEventsEnabled); | 133 switches::kTouchEventsEnabled); |
132 command_line.AppendSwitch(switches::kEnableGestureTapHighlight); | 134 command_line.AppendSwitch(switches::kEnableGestureTapHighlight); |
133 command_line.AppendSwitchASCII(switches::kForceDeviceScaleFactor, "1.0"); | 135 command_line.AppendSwitchASCII(switches::kForceDeviceScaleFactor, "1.0"); |
134 #if defined(OS_ANDROID) | 136 #if defined(OS_ANDROID) |
135 command_line.AppendSwitch( | 137 command_line.AppendSwitch( |
136 switches::kDisableGestureRequirementForMediaPlayback); | 138 switches::kDisableGestureRequirementForMediaPlayback); |
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
221 browser_client_.reset(new ShellContentBrowserClient); | 223 browser_client_.reset(new ShellContentBrowserClient); |
222 return browser_client_.get(); | 224 return browser_client_.get(); |
223 } | 225 } |
224 | 226 |
225 ContentRendererClient* ShellMainDelegate::CreateContentRendererClient() { | 227 ContentRendererClient* ShellMainDelegate::CreateContentRendererClient() { |
226 renderer_client_.reset(new ShellContentRendererClient); | 228 renderer_client_.reset(new ShellContentRendererClient); |
227 return renderer_client_.get(); | 229 return renderer_client_.get(); |
228 } | 230 } |
229 | 231 |
230 } // namespace content | 232 } // namespace content |
OLD | NEW |