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_content_browser_client.h" | 5 #include "content/shell/shell_content_browser_client.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/file_util.h" | 8 #include "base/file_util.h" |
9 #include "base/path_service.h" | 9 #include "base/path_service.h" |
10 #include "content/public/browser/notification_service.h" | 10 #include "content/public/browser/notification_service.h" |
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
135 if (url.scheme() == kProtocolList[i]) | 135 if (url.scheme() == kProtocolList[i]) |
136 return true; | 136 return true; |
137 } | 137 } |
138 return false; | 138 return false; |
139 } | 139 } |
140 | 140 |
141 void ShellContentBrowserClient::AppendExtraCommandLineSwitches( | 141 void ShellContentBrowserClient::AppendExtraCommandLineSwitches( |
142 CommandLine* command_line, int child_process_id) { | 142 CommandLine* command_line, int child_process_id) { |
143 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kDumpRenderTree)) | 143 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kDumpRenderTree)) |
144 command_line->AppendSwitch(switches::kDumpRenderTree); | 144 command_line->AppendSwitch(switches::kDumpRenderTree); |
| 145 if (CommandLine::ForCurrentProcess()-> |
| 146 HasSwitch(switches::kEnableStrictImeProcessing)) |
| 147 command_line->AppendSwitch(switches::kEnableStrictImeProcessing); |
145 } | 148 } |
146 | 149 |
147 void ShellContentBrowserClient::OverrideWebkitPrefs( | 150 void ShellContentBrowserClient::OverrideWebkitPrefs( |
148 RenderViewHost* render_view_host, | 151 RenderViewHost* render_view_host, |
149 const GURL& url, | 152 const GURL& url, |
150 WebPreferences* prefs) { | 153 WebPreferences* prefs) { |
151 if (!CommandLine::ForCurrentProcess()->HasSwitch(switches::kDumpRenderTree)) | 154 if (!CommandLine::ForCurrentProcess()->HasSwitch(switches::kDumpRenderTree)) |
152 return; | 155 return; |
153 WebKitTestController::Get()->OverrideWebkitPrefs(prefs); | 156 WebKitTestController::Get()->OverrideWebkitPrefs(prefs); |
154 } | 157 } |
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
263 ShellBrowserContext* | 266 ShellBrowserContext* |
264 ShellContentBrowserClient::ShellBrowserContextForBrowserContext( | 267 ShellContentBrowserClient::ShellBrowserContextForBrowserContext( |
265 BrowserContext* content_browser_context) { | 268 BrowserContext* content_browser_context) { |
266 if (content_browser_context == browser_context()) | 269 if (content_browser_context == browser_context()) |
267 return browser_context(); | 270 return browser_context(); |
268 DCHECK_EQ(content_browser_context, off_the_record_browser_context()); | 271 DCHECK_EQ(content_browser_context, off_the_record_browser_context()); |
269 return off_the_record_browser_context(); | 272 return off_the_record_browser_context(); |
270 } | 273 } |
271 | 274 |
272 } // namespace content | 275 } // namespace content |
OLD | NEW |