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

Side by Side Diff: webkit/support/webkit_support.cc

Issue 17029016: Remove DRT-specific resource loading logic (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 6 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
« no previous file with comments | « webkit/support/test_webkit_platform_support.cc ('k') | webkit/support/webkit_support.gypi » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "webkit/support/webkit_support.h" 5 #include "webkit/support/webkit_support.h"
6 6
7 #include "base/base64.h" 7 #include "base/base64.h"
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/bind_helpers.h" 9 #include "base/bind_helpers.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 #include "webkit/common/user_agent/user_agent_util.h" 54 #include "webkit/common/user_agent/user_agent_util.h"
55 #include "webkit/glue/webkit_glue.h" 55 #include "webkit/glue/webkit_glue.h"
56 #include "webkit/glue/webkitplatformsupport_impl.h" 56 #include "webkit/glue/webkitplatformsupport_impl.h"
57 #include "webkit/glue/weburlrequest_extradata_impl.h" 57 #include "webkit/glue/weburlrequest_extradata_impl.h"
58 #include "webkit/plugins/npapi/plugin_list.h" 58 #include "webkit/plugins/npapi/plugin_list.h"
59 #include "webkit/plugins/npapi/webplugin_impl.h" 59 #include "webkit/plugins/npapi/webplugin_impl.h"
60 #include "webkit/plugins/npapi/webplugin_page_delegate.h" 60 #include "webkit/plugins/npapi/webplugin_page_delegate.h"
61 #include "webkit/plugins/webplugininfo.h" 61 #include "webkit/plugins/webplugininfo.h"
62 #include "webkit/renderer/appcache/web_application_cache_host_impl.h" 62 #include "webkit/renderer/appcache/web_application_cache_host_impl.h"
63 #include "webkit/renderer/compositor_bindings/web_compositor_support_impl.h" 63 #include "webkit/renderer/compositor_bindings/web_compositor_support_impl.h"
64 #include "webkit/support/platform_support.h"
65 #include "webkit/support/simple_appcache_system.h" 64 #include "webkit/support/simple_appcache_system.h"
66 #include "webkit/support/simple_database_system.h" 65 #include "webkit/support/simple_database_system.h"
67 #include "webkit/support/simple_dom_storage_system.h" 66 #include "webkit/support/simple_dom_storage_system.h"
68 #include "webkit/support/simple_file_system.h" 67 #include "webkit/support/simple_file_system.h"
69 #include "webkit/support/simple_resource_loader_bridge.h" 68 #include "webkit/support/simple_resource_loader_bridge.h"
70 #include "webkit/support/test_webkit_platform_support.h" 69 #include "webkit/support/test_webkit_platform_support.h"
71 #include "webkit/support/test_webplugin_page_delegate.h" 70 #include "webkit/support/test_webplugin_page_delegate.h"
72 #include "webkit/support/web_layer_tree_view_impl_for_testing.h" 71 #include "webkit/support/web_layer_tree_view_impl_for_testing.h"
73 72
74 #if defined(OS_ANDROID) 73 #if defined(OS_ANDROID)
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after
277 // webkit/glue/plugin/plugin_list_posix.cc checks --debug-plugin-loading. 276 // webkit/glue/plugin/plugin_list_posix.cc checks --debug-plugin-loading.
278 // webkit/glue/plugin/plugin_list_win.cc checks --old-wmp. 277 // webkit/glue/plugin/plugin_list_win.cc checks --old-wmp.
279 // If DRT needs these flags, specify them in the following kFixedArguments. 278 // If DRT needs these flags, specify them in the following kFixedArguments.
280 const char* kFixedArguments[] = {"DumpRenderTree"}; 279 const char* kFixedArguments[] = {"DumpRenderTree"};
281 CommandLine::Init(arraysize(kFixedArguments), kFixedArguments); 280 CommandLine::Init(arraysize(kFixedArguments), kFixedArguments);
282 281
283 // Explicitly initialize the GURL library before spawning any threads. 282 // Explicitly initialize the GURL library before spawning any threads.
284 // Otherwise crash may happend when different threads try to create a GURL 283 // Otherwise crash may happend when different threads try to create a GURL
285 // at same time. 284 // at same time.
286 url_util::Initialize(); 285 url_util::Initialize();
287 webkit_support::BeforeInitialize();
288 test_environment = new TestEnvironment; 286 test_environment = new TestEnvironment;
289 webkit_support::AfterInitialize();
290 webkit_glue::SetUserAgent(webkit_glue::BuildUserAgentFromProduct( 287 webkit_glue::SetUserAgent(webkit_glue::BuildUserAgentFromProduct(
291 "DumpRenderTree/0.0.0.0"), false); 288 "DumpRenderTree/0.0.0.0"), false);
292 } 289 }
293 290
294 void TearDownTestEnvironment() { 291 void TearDownTestEnvironment() {
295 // Flush any remaining messages before we kill ourselves. 292 // Flush any remaining messages before we kill ourselves.
296 // http://code.google.com/p/chromium/issues/detail?id=9500 293 // http://code.google.com/p/chromium/issues/detail?id=9500
297 base::RunLoop().RunUntilIdle(); 294 base::RunLoop().RunUntilIdle();
298 295
299 BeforeShutdown();
300 if (RunningOnValgrind()) 296 if (RunningOnValgrind())
301 WebKit::WebCache::clear(); 297 WebKit::WebCache::clear();
302 WebKit::shutdown(); 298 WebKit::shutdown();
303 delete test_environment; 299 delete test_environment;
304 test_environment = NULL; 300 test_environment = NULL;
305 AfterShutdown();
306 logging::CloseLogFile(); 301 logging::CloseLogFile();
307 } 302 }
308 303
309 WebKit::Platform* GetWebKitPlatformSupport() { 304 WebKit::Platform* GetWebKitPlatformSupport() {
310 DCHECK(test_environment); 305 DCHECK(test_environment);
311 return test_environment->webkit_platform_support(); 306 return test_environment->webkit_platform_support();
312 } 307 }
313 308
314 WebPlugin* CreateWebPlugin(WebFrame* frame, 309 WebPlugin* CreateWebPlugin(WebFrame* frame,
315 const WebPluginParams& params) { 310 const WebPluginParams& params) {
(...skipping 424 matching lines...) Expand 10 before | Expand all | Expand 10 after
740 // Logging 735 // Logging
741 void EnableWebCoreLogChannels(const std::string& channels) { 736 void EnableWebCoreLogChannels(const std::string& channels) {
742 webkit_glue::EnableWebCoreLogChannels(channels); 737 webkit_glue::EnableWebCoreLogChannels(channels);
743 } 738 }
744 739
745 void SetGamepadData(const WebKit::WebGamepads& pads) { 740 void SetGamepadData(const WebKit::WebGamepads& pads) {
746 test_environment->webkit_platform_support()->setGamepadData(pads); 741 test_environment->webkit_platform_support()->setGamepadData(pads);
747 } 742 }
748 743
749 } // namespace webkit_support 744 } // namespace webkit_support
OLDNEW
« no previous file with comments | « webkit/support/test_webkit_platform_support.cc ('k') | webkit/support/webkit_support.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698