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

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

Issue 8602002: Move some webkit_glue embedder functions into WebKitPlatformSupport virtual methods (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: copyright year Created 9 years, 1 month 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.h ('k') | webkit/support/webkit_support_glue.cc » ('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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/test_webkit_platform_support.h" 5 #include "webkit/support/test_webkit_platform_support.h"
6 6
7 #include "base/file_util.h" 7 #include "base/file_util.h"
8 #include "base/metrics/stats_counters.h" 8 #include "base/metrics/stats_counters.h"
9 #include "base/path_service.h" 9 #include "base/path_service.h"
10 #include "base/scoped_temp_dir.h" 10 #include "base/scoped_temp_dir.h"
(...skipping 25 matching lines...) Expand all
36 #include "v8/include/v8.h" 36 #include "v8/include/v8.h"
37 #include "webkit/appcache/web_application_cache_host_impl.h" 37 #include "webkit/appcache/web_application_cache_host_impl.h"
38 #include "webkit/database/vfs_backend.h" 38 #include "webkit/database/vfs_backend.h"
39 #include "webkit/extensions/v8/gc_extension.h" 39 #include "webkit/extensions/v8/gc_extension.h"
40 #include "webkit/glue/simple_webmimeregistry_impl.h" 40 #include "webkit/glue/simple_webmimeregistry_impl.h"
41 #include "webkit/glue/webclipboard_impl.h" 41 #include "webkit/glue/webclipboard_impl.h"
42 #include "webkit/glue/webkit_glue.h" 42 #include "webkit/glue/webkit_glue.h"
43 #include "webkit/glue/webkitplatformsupport_impl.h" 43 #include "webkit/glue/webkitplatformsupport_impl.h"
44 #include "webkit/gpu/webgraphicscontext3d_in_process_command_buffer_impl.h" 44 #include "webkit/gpu/webgraphicscontext3d_in_process_command_buffer_impl.h"
45 #include "webkit/gpu/webgraphicscontext3d_in_process_impl.h" 45 #include "webkit/gpu/webgraphicscontext3d_in_process_impl.h"
46 #include "webkit/plugins/npapi/plugin_list.h"
46 #include "webkit/support/simple_database_system.h" 47 #include "webkit/support/simple_database_system.h"
47 #include "webkit/support/test_webmessageportchannel.h" 48 #include "webkit/support/test_webmessageportchannel.h"
48 #include "webkit/support/webkit_support.h" 49 #include "webkit/support/webkit_support.h"
49 #include "webkit/support/weburl_loader_mock_factory.h" 50 #include "webkit/support/weburl_loader_mock_factory.h"
50 #include "webkit/support/web_audio_device_mock.h" 51 #include "webkit/support/web_audio_device_mock.h"
51 #include "webkit/tools/test_shell/mock_webclipboard_impl.h" 52 #include "webkit/tools/test_shell/mock_webclipboard_impl.h"
52 #include "webkit/tools/test_shell/simple_appcache_system.h" 53 #include "webkit/tools/test_shell/simple_appcache_system.h"
53 #include "webkit/tools/test_shell/simple_file_system.h" 54 #include "webkit/tools/test_shell/simple_file_system.h"
55 #include "webkit/tools/test_shell/simple_socket_stream_bridge.h"
54 #include "webkit/tools/test_shell/simple_resource_loader_bridge.h" 56 #include "webkit/tools/test_shell/simple_resource_loader_bridge.h"
55 #include "webkit/tools/test_shell/simple_webcookiejar_impl.h" 57 #include "webkit/tools/test_shell/simple_webcookiejar_impl.h"
56 #include "webkit/tools/test_shell/test_shell_request_context.h" 58 #include "webkit/tools/test_shell/test_shell_request_context.h"
57 #include "webkit/tools/test_shell/test_shell_webblobregistry_impl.h" 59 #include "webkit/tools/test_shell/test_shell_webblobregistry_impl.h"
58 60
59 #if defined(OS_WIN) 61 #if defined(OS_WIN)
60 #include "third_party/WebKit/Source/WebKit/chromium/public/win/WebThemeEngine.h" 62 #include "third_party/WebKit/Source/WebKit/chromium/public/win/WebThemeEngine.h"
61 #include "webkit/tools/test_shell/test_shell_webthemeengine.h" 63 #include "webkit/tools/test_shell/test_shell_webthemeengine.h"
62 #elif defined(OS_MACOSX) 64 #elif defined(OS_MACOSX)
63 #include "base/mac/mac_util.h" 65 #include "base/mac/mac_util.h"
(...skipping 336 matching lines...) Expand 10 before | Expand all | Expand 10 after
400 } 402 }
401 403
402 void TestWebKitPlatformSupport::sampleGamepads(WebKit::WebGamepads& data) { 404 void TestWebKitPlatformSupport::sampleGamepads(WebKit::WebGamepads& data) {
403 data = gamepad_data_; 405 data = gamepad_data_;
404 } 406 }
405 407
406 void TestWebKitPlatformSupport::setGamepadData( 408 void TestWebKitPlatformSupport::setGamepadData(
407 const WebKit::WebGamepads& data) { 409 const WebKit::WebGamepads& data) {
408 gamepad_data_ = data; 410 gamepad_data_ = data;
409 } 411 }
412
413 void TestWebKitPlatformSupport::GetPlugins(
414 bool refresh, std::vector<webkit::WebPluginInfo>* plugins) {
415 if (refresh)
416 webkit::npapi::PluginList::Singleton()->RefreshPlugins();
417 webkit::npapi::PluginList::Singleton()->GetPlugins(plugins);
418 // Don't load the forked npapi_layout_test_plugin in DRT, we only want to
419 // use the upstream version TestNetscapePlugIn.
420 const FilePath::StringType kPluginBlackList[] = {
421 FILE_PATH_LITERAL("npapi_layout_test_plugin.dll"),
422 FILE_PATH_LITERAL("WebKitTestNetscapePlugIn.plugin"),
423 FILE_PATH_LITERAL("libnpapi_layout_test_plugin.so"),
424 };
425 for (int i = plugins->size() - 1; i >= 0; --i) {
426 webkit::WebPluginInfo plugin_info = plugins->at(i);
427 for (size_t j = 0; j < arraysize(kPluginBlackList); ++j) {
428 if (plugin_info.path.BaseName() == FilePath(kPluginBlackList[j])) {
429 plugins->erase(plugins->begin() + i);
430 }
431 }
432 }
433 }
434
435 webkit_glue::ResourceLoaderBridge*
436 TestWebKitPlatformSupport::CreateResourceLoader(
437 const webkit_glue::ResourceLoaderBridge::RequestInfo& request_info) {
438 return SimpleResourceLoaderBridge::Create(request_info);
439 }
440
441 webkit_glue::WebSocketStreamHandleBridge*
442 TestWebKitPlatformSupport::CreateWebSocketBridge(
443 WebKit::WebSocketStreamHandle* handle,
444 webkit_glue::WebSocketStreamHandleDelegate* delegate) {
445 return SimpleSocketStreamBridge::Create(handle, delegate);
446 }
OLDNEW
« no previous file with comments | « webkit/support/test_webkit_platform_support.h ('k') | webkit/support/webkit_support_glue.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698