| 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 #ifndef WEBKIT_SUPPORT_TEST_WEBKIT_PLATFORM_SUPPORT_H_ | 5 #ifndef WEBKIT_SUPPORT_TEST_WEBKIT_PLATFORM_SUPPORT_H_ |
| 6 #define WEBKIT_SUPPORT_TEST_WEBKIT_PLATFORM_SUPPORT_H_ | 6 #define WEBKIT_SUPPORT_TEST_WEBKIT_PLATFORM_SUPPORT_H_ |
| 7 | 7 |
| 8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
| 9 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebGamepads.
h" | 9 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebGamepads.
h" |
| 10 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebGraphicsC
ontext3D.h" | 10 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebGraphicsC
ontext3D.h" |
| 11 #include "webkit/glue/webfileutilities_impl.h" | 11 #include "webkit/glue/webfileutilities_impl.h" |
| 12 #include "webkit/glue/webkitplatformsupport_impl.h" | 12 #include "webkit/glue/webkitplatformsupport_impl.h" |
| 13 #include "webkit/support/simple_database_system.h" | 13 #include "webkit/support/simple_database_system.h" |
| 14 #include "webkit/support/weburl_loader_mock_factory.h" | 14 #include "webkit/support/weburl_loader_mock_factory.h" |
| 15 #include "webkit/tools/test_shell/mock_webclipboard_impl.h" | 15 #include "webkit/tools/test_shell/mock_webclipboard_impl.h" |
| 16 #include "webkit/tools/test_shell/simple_appcache_system.h" | 16 #include "webkit/tools/test_shell/simple_appcache_system.h" |
| 17 #include "webkit/tools/test_shell/simple_dom_storage_system.h" | 17 #include "webkit/tools/test_shell/simple_dom_storage_system.h" |
| 18 #include "webkit/tools/test_shell/simple_file_system.h" | 18 #include "webkit/tools/test_shell/simple_file_system.h" |
| 19 #include "webkit/tools/test_shell/simple_webcookiejar_impl.h" | 19 #include "webkit/tools/test_shell/simple_webcookiejar_impl.h" |
| 20 #include "webkit/tools/test_shell/test_shell_webmimeregistry_impl.h" | 20 #include "webkit/tools/test_shell/test_shell_webmimeregistry_impl.h" |
| 21 | 21 |
| 22 class TestShellWebBlobRegistryImpl; | 22 class TestShellWebBlobRegistryImpl; |
| 23 | 23 |
| 24 namespace WebKit { | 24 namespace WebKit { |
| 25 class WebAudioDevice; | 25 class WebAudioDevice; |
| 26 } | 26 } |
| 27 | 27 |
| 28 typedef struct _HyphenDict HyphenDict; |
| 29 |
| 28 // An implementation of WebKitPlatformSupport for tests. | 30 // An implementation of WebKitPlatformSupport for tests. |
| 29 class TestWebKitPlatformSupport : | 31 class TestWebKitPlatformSupport : |
| 30 public webkit_glue::WebKitPlatformSupportImpl { | 32 public webkit_glue::WebKitPlatformSupportImpl { |
| 31 public: | 33 public: |
| 32 TestWebKitPlatformSupport(bool unit_test_mode, | 34 TestWebKitPlatformSupport(bool unit_test_mode, |
| 33 WebKit::Platform* shadow_platform_delegate); | 35 WebKit::Platform* shadow_platform_delegate); |
| 34 virtual ~TestWebKitPlatformSupport(); | 36 virtual ~TestWebKitPlatformSupport(); |
| 35 | 37 |
| 36 virtual WebKit::WebMimeRegistry* mimeRegistry() OVERRIDE; | 38 virtual WebKit::WebMimeRegistry* mimeRegistry() OVERRIDE; |
| 37 virtual WebKit::WebClipboard* clipboard() OVERRIDE; | 39 virtual WebKit::WebClipboard* clipboard() OVERRIDE; |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 113 const webkit_glue::ResourceLoaderBridge::RequestInfo& request_info) | 115 const webkit_glue::ResourceLoaderBridge::RequestInfo& request_info) |
| 114 OVERRIDE; | 116 OVERRIDE; |
| 115 virtual webkit_glue::WebSocketStreamHandleBridge* CreateWebSocketBridge( | 117 virtual webkit_glue::WebSocketStreamHandleBridge* CreateWebSocketBridge( |
| 116 WebKit::WebSocketStreamHandle* handle, | 118 WebKit::WebSocketStreamHandle* handle, |
| 117 webkit_glue::WebSocketStreamHandleDelegate* delegate) OVERRIDE; | 119 webkit_glue::WebSocketStreamHandleDelegate* delegate) OVERRIDE; |
| 118 | 120 |
| 119 virtual WebKit::WebMediaStreamCenter* createMediaStreamCenter( | 121 virtual WebKit::WebMediaStreamCenter* createMediaStreamCenter( |
| 120 WebKit::WebMediaStreamCenterClient* client) OVERRIDE; | 122 WebKit::WebMediaStreamCenterClient* client) OVERRIDE; |
| 121 virtual WebKit::WebRTCPeerConnectionHandler* createRTCPeerConnectionHandler( | 123 virtual WebKit::WebRTCPeerConnectionHandler* createRTCPeerConnectionHandler( |
| 122 WebKit::WebRTCPeerConnectionHandlerClient* client) OVERRIDE; | 124 WebKit::WebRTCPeerConnectionHandlerClient* client) OVERRIDE; |
| 125 virtual bool canHyphenate(const WebKit::WebString& locale) OVERRIDE; |
| 126 virtual size_t computeLastHyphenLocation( |
| 127 const char16* characters, |
| 128 size_t length, |
| 129 size_t before_index, |
| 130 const WebKit::WebString& locale) OVERRIDE; |
| 123 | 131 |
| 124 private: | 132 private: |
| 125 TestShellWebMimeRegistryImpl mime_registry_; | 133 TestShellWebMimeRegistryImpl mime_registry_; |
| 126 MockWebClipboardImpl mock_clipboard_; | 134 MockWebClipboardImpl mock_clipboard_; |
| 127 webkit_glue::WebFileUtilitiesImpl file_utilities_; | 135 webkit_glue::WebFileUtilitiesImpl file_utilities_; |
| 128 ScopedTempDir appcache_dir_; | 136 ScopedTempDir appcache_dir_; |
| 129 SimpleAppCacheSystem appcache_system_; | 137 SimpleAppCacheSystem appcache_system_; |
| 130 SimpleDatabaseSystem database_system_; | 138 SimpleDatabaseSystem database_system_; |
| 131 SimpleDomStorageSystem dom_storage_system_; | 139 SimpleDomStorageSystem dom_storage_system_; |
| 132 SimpleWebCookieJarImpl cookie_jar_; | 140 SimpleWebCookieJarImpl cookie_jar_; |
| 133 scoped_refptr<TestShellWebBlobRegistryImpl> blob_registry_; | 141 scoped_refptr<TestShellWebBlobRegistryImpl> blob_registry_; |
| 134 SimpleFileSystem file_system_; | 142 SimpleFileSystem file_system_; |
| 135 ScopedTempDir file_system_root_; | 143 ScopedTempDir file_system_root_; |
| 136 WebURLLoaderMockFactory url_loader_factory_; | 144 WebURLLoaderMockFactory url_loader_factory_; |
| 137 bool unit_test_mode_; | 145 bool unit_test_mode_; |
| 138 WebKit::WebGamepads gamepad_data_; | 146 WebKit::WebGamepads gamepad_data_; |
| 139 WebKit::Platform* shadow_platform_delegate_; | 147 WebKit::Platform* shadow_platform_delegate_; |
| 148 HyphenDict* hyphen_dictionary_; |
| 140 | 149 |
| 141 #if defined(OS_WIN) || defined(OS_MACOSX) | 150 #if defined(OS_WIN) || defined(OS_MACOSX) |
| 142 WebKit::WebThemeEngine* active_theme_engine_; | 151 WebKit::WebThemeEngine* active_theme_engine_; |
| 143 #endif | 152 #endif |
| 144 DISALLOW_COPY_AND_ASSIGN(TestWebKitPlatformSupport); | 153 DISALLOW_COPY_AND_ASSIGN(TestWebKitPlatformSupport); |
| 145 }; | 154 }; |
| 146 | 155 |
| 147 #endif // WEBKIT_SUPPORT_TEST_WEBKIT_PLATFORM_SUPPORT_H_ | 156 #endif // WEBKIT_SUPPORT_TEST_WEBKIT_PLATFORM_SUPPORT_H_ |
| OLD | NEW |