| 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 "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/files/scoped_temp_dir.h" |
| 8 #include "base/metrics/stats_counters.h" | 9 #include "base/metrics/stats_counters.h" |
| 9 #include "base/path_service.h" | 10 #include "base/path_service.h" |
| 10 #include "base/scoped_temp_dir.h" | |
| 11 #include "base/string_util.h" | 11 #include "base/string_util.h" |
| 12 #include "base/utf_string_conversions.h" | 12 #include "base/utf_string_conversions.h" |
| 13 #include "media/base/media.h" | 13 #include "media/base/media.h" |
| 14 #include "net/cookies/cookie_monster.h" | 14 #include "net/cookies/cookie_monster.h" |
| 15 #include "net/http/http_cache.h" | 15 #include "net/http/http_cache.h" |
| 16 #include "net/test/test_server.h" | 16 #include "net/test/test_server.h" |
| 17 #include "third_party/hyphen/hyphen.h" | 17 #include "third_party/hyphen/hyphen.h" |
| 18 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebAudioDevi
ce.h" | 18 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebAudioDevi
ce.h" |
| 19 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebData.h" | 19 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebData.h" |
| 20 #include "third_party/WebKit/Source/WebKit/chromium/public/WebDatabase.h" | |
| 21 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebFileSyste
m.h" | 20 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebFileSyste
m.h" |
| 22 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebGamepads.
h" | 21 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebGamepads.
h" |
| 22 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebString.h" |
| 23 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebURL.h" |
| 24 #include "third_party/WebKit/Source/WebKit/chromium/public/WebDatabase.h" |
| 23 #include "third_party/WebKit/Source/WebKit/chromium/public/WebIDBFactory.h" | 25 #include "third_party/WebKit/Source/WebKit/chromium/public/WebIDBFactory.h" |
| 24 #include "third_party/WebKit/Source/WebKit/chromium/public/WebKit.h" | 26 #include "third_party/WebKit/Source/WebKit/chromium/public/WebKit.h" |
| 25 #include "third_party/WebKit/Source/WebKit/chromium/public/WebRuntimeFeatures.h" | 27 #include "third_party/WebKit/Source/WebKit/chromium/public/WebRuntimeFeatures.h" |
| 26 #include "third_party/WebKit/Source/WebKit/chromium/public/WebScriptController.h
" | 28 #include "third_party/WebKit/Source/WebKit/chromium/public/WebScriptController.h
" |
| 27 #include "third_party/WebKit/Source/WebKit/chromium/public/WebSecurityPolicy.h" | 29 #include "third_party/WebKit/Source/WebKit/chromium/public/WebSecurityPolicy.h" |
| 28 #include "third_party/WebKit/Source/WebKit/chromium/public/WebStorageArea.h" | 30 #include "third_party/WebKit/Source/WebKit/chromium/public/WebStorageArea.h" |
| 29 #include "third_party/WebKit/Source/WebKit/chromium/public/WebStorageEventDispat
cher.h" | 31 #include "third_party/WebKit/Source/WebKit/chromium/public/WebStorageEventDispat
cher.h" |
| 30 #include "third_party/WebKit/Source/WebKit/chromium/public/WebStorageNamespace.h
" | 32 #include "third_party/WebKit/Source/WebKit/chromium/public/WebStorageNamespace.h
" |
| 31 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebString.h" | |
| 32 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebURL.h" | |
| 33 #include "v8/include/v8.h" | 33 #include "v8/include/v8.h" |
| 34 #include "webkit/appcache/web_application_cache_host_impl.h" | 34 #include "webkit/appcache/web_application_cache_host_impl.h" |
| 35 #include "webkit/database/vfs_backend.h" | 35 #include "webkit/database/vfs_backend.h" |
| 36 #include "webkit/glue/simple_webmimeregistry_impl.h" | 36 #include "webkit/glue/simple_webmimeregistry_impl.h" |
| 37 #include "webkit/glue/webclipboard_impl.h" | 37 #include "webkit/glue/webclipboard_impl.h" |
| 38 #include "webkit/glue/webkit_glue.h" | 38 #include "webkit/glue/webkit_glue.h" |
| 39 #include "webkit/glue/webkitplatformsupport_impl.h" | 39 #include "webkit/glue/webkitplatformsupport_impl.h" |
| 40 #include "webkit/gpu/webgraphicscontext3d_in_process_command_buffer_impl.h" | 40 #include "webkit/gpu/webgraphicscontext3d_in_process_command_buffer_impl.h" |
| 41 #include "webkit/gpu/webgraphicscontext3d_in_process_impl.h" | 41 #include "webkit/gpu/webgraphicscontext3d_in_process_impl.h" |
| 42 #include "webkit/plugins/npapi/plugin_list.h" | 42 #include "webkit/plugins/npapi/plugin_list.h" |
| 43 #include "webkit/support/gc_extension.h" |
| 43 #include "webkit/support/simple_database_system.h" | 44 #include "webkit/support/simple_database_system.h" |
| 44 #include "webkit/support/gc_extension.h" | |
| 45 #include "webkit/support/test_webmessageportchannel.h" | 45 #include "webkit/support/test_webmessageportchannel.h" |
| 46 #include "webkit/support/web_audio_device_mock.h" |
| 47 #include "webkit/support/web_gesture_curve_mock.h" |
| 46 #include "webkit/support/webkit_support.h" | 48 #include "webkit/support/webkit_support.h" |
| 47 #include "webkit/support/weburl_loader_mock_factory.h" | 49 #include "webkit/support/weburl_loader_mock_factory.h" |
| 48 #include "webkit/support/web_audio_device_mock.h" | |
| 49 #include "webkit/support/web_gesture_curve_mock.h" | |
| 50 #include "webkit/tools/test_shell/mock_webclipboard_impl.h" | 50 #include "webkit/tools/test_shell/mock_webclipboard_impl.h" |
| 51 #include "webkit/tools/test_shell/simple_appcache_system.h" | 51 #include "webkit/tools/test_shell/simple_appcache_system.h" |
| 52 #include "webkit/tools/test_shell/simple_file_system.h" | 52 #include "webkit/tools/test_shell/simple_file_system.h" |
| 53 #include "webkit/tools/test_shell/simple_resource_loader_bridge.h" |
| 53 #include "webkit/tools/test_shell/simple_socket_stream_bridge.h" | 54 #include "webkit/tools/test_shell/simple_socket_stream_bridge.h" |
| 54 #include "webkit/tools/test_shell/simple_resource_loader_bridge.h" | |
| 55 #include "webkit/tools/test_shell/simple_webcookiejar_impl.h" | 55 #include "webkit/tools/test_shell/simple_webcookiejar_impl.h" |
| 56 #include "webkit/tools/test_shell/test_shell_request_context.h" | 56 #include "webkit/tools/test_shell/test_shell_request_context.h" |
| 57 #include "webkit/tools/test_shell/test_shell_webblobregistry_impl.h" | 57 #include "webkit/tools/test_shell/test_shell_webblobregistry_impl.h" |
| 58 | 58 |
| 59 #if defined(OS_WIN) | 59 #if defined(OS_WIN) |
| 60 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/win/WebTheme
Engine.h" | 60 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/win/WebTheme
Engine.h" |
| 61 #include "webkit/tools/test_shell/test_shell_webthemeengine.h" | 61 #include "webkit/tools/test_shell/test_shell_webthemeengine.h" |
| 62 #elif defined(OS_MACOSX) | 62 #elif defined(OS_MACOSX) |
| 63 #include "base/mac/mac_util.h" | 63 #include "base/mac/mac_util.h" |
| 64 #elif defined(OS_POSIX) && !defined(OS_ANDROID) | 64 #elif defined(OS_POSIX) && !defined(OS_ANDROID) |
| (...skipping 319 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 384 virtual void deleteDatabase(const WebString& name, | 384 virtual void deleteDatabase(const WebString& name, |
| 385 WebKit::WebIDBCallbacks* callbacks, | 385 WebKit::WebIDBCallbacks* callbacks, |
| 386 const WebKit::WebSecurityOrigin& origin, | 386 const WebKit::WebSecurityOrigin& origin, |
| 387 WebKit::WebFrame* frame, | 387 WebKit::WebFrame* frame, |
| 388 const WebString& dataDir) { | 388 const WebString& dataDir) { |
| 389 factory_->deleteDatabase(name, callbacks, origin, frame, | 389 factory_->deleteDatabase(name, callbacks, origin, frame, |
| 390 dataDir.isEmpty() ? data_dir_ : dataDir); | 390 dataDir.isEmpty() ? data_dir_ : dataDir); |
| 391 } | 391 } |
| 392 private: | 392 private: |
| 393 scoped_ptr<WebIDBFactory> factory_; | 393 scoped_ptr<WebIDBFactory> factory_; |
| 394 ScopedTempDir indexed_db_dir_; | 394 base::ScopedTempDir indexed_db_dir_; |
| 395 WebString data_dir_; | 395 WebString data_dir_; |
| 396 }; | 396 }; |
| 397 | 397 |
| 398 WebKit::WebIDBFactory* TestWebKitPlatformSupport::idbFactory() { | 398 WebKit::WebIDBFactory* TestWebKitPlatformSupport::idbFactory() { |
| 399 return new TestWebIDBFactory(); | 399 return new TestWebIDBFactory(); |
| 400 } | 400 } |
| 401 | 401 |
| 402 #if defined(OS_WIN) || defined(OS_MACOSX) | 402 #if defined(OS_WIN) || defined(OS_MACOSX) |
| 403 void TestWebKitPlatformSupport::SetThemeEngine(WebKit::WebThemeEngine* engine) { | 403 void TestWebKitPlatformSupport::SetThemeEngine(WebKit::WebThemeEngine* engine) { |
| 404 active_theme_engine_ = engine ? | 404 active_theme_engine_ = engine ? |
| (...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 596 return 0; | 596 return 0; |
| 597 } | 597 } |
| 598 | 598 |
| 599 WebKit::WebGestureCurve* TestWebKitPlatformSupport::createFlingAnimationCurve( | 599 WebKit::WebGestureCurve* TestWebKitPlatformSupport::createFlingAnimationCurve( |
| 600 int device_source, | 600 int device_source, |
| 601 const WebKit::WebFloatPoint& velocity, | 601 const WebKit::WebFloatPoint& velocity, |
| 602 const WebKit::WebSize& cumulative_scroll) { | 602 const WebKit::WebSize& cumulative_scroll) { |
| 603 // Caller will retain and release. | 603 // Caller will retain and release. |
| 604 return new WebGestureCurveMock(velocity, cumulative_scroll); | 604 return new WebGestureCurveMock(velocity, cumulative_scroll); |
| 605 } | 605 } |
| OLD | NEW |