Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(294)

Side by Side Diff: content/shell/shell_main_delegate.cc

Issue 12314032: [content shell] enable touch events for layout tests (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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"
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 "net/cookies/cookie_monster.h" 19 #include "net/cookies/cookie_monster.h"
20 #include "ui/base/resource/resource_bundle.h" 20 #include "ui/base/resource/resource_bundle.h"
21 #include "ui/base/ui_base_paths.h" 21 #include "ui/base/ui_base_paths.h"
22 #include "ui/base/ui_base_switches.h"
22 #include "ui/gl/gl_switches.h" 23 #include "ui/gl/gl_switches.h"
23 24
24 #include "ipc/ipc_message.h" // For IPC_MESSAGE_LOG_ENABLED. 25 #include "ipc/ipc_message.h" // For IPC_MESSAGE_LOG_ENABLED.
25 26
26 #if defined(IPC_MESSAGE_LOG_ENABLED) 27 #if defined(IPC_MESSAGE_LOG_ENABLED)
27 #define IPC_MESSAGE_MACROS_LOG_ENABLED 28 #define IPC_MESSAGE_MACROS_LOG_ENABLED
28 #include "content/public/common/content_ipc_logging.h" 29 #include "content/public/common/content_ipc_logging.h"
29 #define IPC_LOG_TABLE_ADD_ENTRY(msg_id, logger) \ 30 #define IPC_LOG_TABLE_ADD_ENTRY(msg_id, logger) \
30 content::RegisterIPCLogger(msg_id, logger) 31 content::RegisterIPCLogger(msg_id, logger)
31 #include "content/shell/shell_messages.h" 32 #include "content/shell/shell_messages.h"
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 96
96 InitLogging(); 97 InitLogging();
97 CommandLine& command_line = *CommandLine::ForCurrentProcess(); 98 CommandLine& command_line = *CommandLine::ForCurrentProcess();
98 if (command_line.HasSwitch(switches::kDumpRenderTree)) { 99 if (command_line.HasSwitch(switches::kDumpRenderTree)) {
99 command_line.AppendSwitch(switches::kAllowFileAccessFromFiles); 100 command_line.AppendSwitch(switches::kAllowFileAccessFromFiles);
100 command_line.AppendSwitchASCII( 101 command_line.AppendSwitchASCII(
101 switches::kUseGL, gfx::kGLImplementationOSMesaName); 102 switches::kUseGL, gfx::kGLImplementationOSMesaName);
102 command_line.AppendSwitch(switches::kIgnoreGpuBlacklist); 103 command_line.AppendSwitch(switches::kIgnoreGpuBlacklist);
103 command_line.AppendSwitch(switches::kEnableExperimentalWebKitFeatures); 104 command_line.AppendSwitch(switches::kEnableExperimentalWebKitFeatures);
104 command_line.AppendSwitch(switches::kEnableCssShaders); 105 command_line.AppendSwitch(switches::kEnableCssShaders);
106 command_line.AppendSwitchASCII(switches::kTouchEvents,
107 switches::kTouchEventsEnabled);
105 if (command_line.HasSwitch(switches::kEnableSoftwareCompositing)) 108 if (command_line.HasSwitch(switches::kEnableSoftwareCompositing))
106 command_line.AppendSwitch(switches::kEnableSoftwareCompositingGLAdapter); 109 command_line.AppendSwitch(switches::kEnableSoftwareCompositingGLAdapter);
107 110
108 net::CookieMonster::EnableFileScheme(); 111 net::CookieMonster::EnableFileScheme();
109 if (!WebKitTestPlatformInitialize()) { 112 if (!WebKitTestPlatformInitialize()) {
110 if (exit_code) 113 if (exit_code)
111 *exit_code = 1; 114 *exit_code = 1;
112 return true; 115 return true;
113 } 116 }
114 } 117 }
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
181 browser_client_.reset(new ShellContentBrowserClient); 184 browser_client_.reset(new ShellContentBrowserClient);
182 return browser_client_.get(); 185 return browser_client_.get();
183 } 186 }
184 187
185 ContentRendererClient* ShellMainDelegate::CreateContentRendererClient() { 188 ContentRendererClient* ShellMainDelegate::CreateContentRendererClient() {
186 renderer_client_.reset(new ShellContentRendererClient); 189 renderer_client_.reset(new ShellContentRendererClient);
187 return renderer_client_.get(); 190 return renderer_client_.get();
188 } 191 }
189 192
190 } // namespace content 193 } // namespace content
OLDNEW
« no previous file with comments | « content/public/common/common_param_traits_macros.h ('k') | content/shell/webkit_test_helpers.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698