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" |
(...skipping 11 matching lines...) Expand all Loading... |
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 // An implementation of WebKitPlatformSupport for tests. | 28 // An implementation of WebKitPlatformSupport for tests. |
29 class TestWebKitPlatformSupport : | 29 class TestWebKitPlatformSupport : |
30 public webkit_glue::WebKitPlatformSupportImpl { | 30 public webkit_glue::WebKitPlatformSupportImpl { |
31 public: | 31 public: |
32 explicit TestWebKitPlatformSupport(bool unit_test_mode); | 32 TestWebKitPlatformSupport(bool unit_test_mode, |
| 33 WebKit::Platform* shadow_platform_delegate); |
33 virtual ~TestWebKitPlatformSupport(); | 34 virtual ~TestWebKitPlatformSupport(); |
34 | 35 |
35 virtual WebKit::WebMimeRegistry* mimeRegistry() OVERRIDE; | 36 virtual WebKit::WebMimeRegistry* mimeRegistry() OVERRIDE; |
36 virtual WebKit::WebClipboard* clipboard() OVERRIDE; | 37 virtual WebKit::WebClipboard* clipboard() OVERRIDE; |
37 virtual WebKit::WebFileUtilities* fileUtilities() OVERRIDE; | 38 virtual WebKit::WebFileUtilities* fileUtilities() OVERRIDE; |
38 virtual WebKit::WebSandboxSupport* sandboxSupport() OVERRIDE; | 39 virtual WebKit::WebSandboxSupport* sandboxSupport() OVERRIDE; |
39 virtual WebKit::WebCookieJar* cookieJar() OVERRIDE; | 40 virtual WebKit::WebCookieJar* cookieJar() OVERRIDE; |
40 virtual WebKit::WebBlobRegistry* blobRegistry() OVERRIDE; | 41 virtual WebKit::WebBlobRegistry* blobRegistry() OVERRIDE; |
41 virtual WebKit::WebFileSystem* fileSystem() OVERRIDE; | 42 virtual WebKit::WebFileSystem* fileSystem() OVERRIDE; |
42 | 43 |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
116 ui::ScaleFactor scale_factor) OVERRIDE; | 117 ui::ScaleFactor scale_factor) OVERRIDE; |
117 virtual void GetPlugins(bool refresh, | 118 virtual void GetPlugins(bool refresh, |
118 std::vector<webkit::WebPluginInfo>* plugins) OVERRIDE; | 119 std::vector<webkit::WebPluginInfo>* plugins) OVERRIDE; |
119 virtual webkit_glue::ResourceLoaderBridge* CreateResourceLoader( | 120 virtual webkit_glue::ResourceLoaderBridge* CreateResourceLoader( |
120 const webkit_glue::ResourceLoaderBridge::RequestInfo& request_info) | 121 const webkit_glue::ResourceLoaderBridge::RequestInfo& request_info) |
121 OVERRIDE; | 122 OVERRIDE; |
122 virtual webkit_glue::WebSocketStreamHandleBridge* CreateWebSocketBridge( | 123 virtual webkit_glue::WebSocketStreamHandleBridge* CreateWebSocketBridge( |
123 WebKit::WebSocketStreamHandle* handle, | 124 WebKit::WebSocketStreamHandle* handle, |
124 webkit_glue::WebSocketStreamHandleDelegate* delegate) OVERRIDE; | 125 webkit_glue::WebSocketStreamHandleDelegate* delegate) OVERRIDE; |
125 | 126 |
| 127 virtual WebKit::WebMediaStreamCenter* createMediaStreamCenter( |
| 128 WebKit::WebMediaStreamCenterClient* client) OVERRIDE; |
| 129 |
126 private: | 130 private: |
127 TestShellWebMimeRegistryImpl mime_registry_; | 131 TestShellWebMimeRegistryImpl mime_registry_; |
128 MockWebClipboardImpl mock_clipboard_; | 132 MockWebClipboardImpl mock_clipboard_; |
129 webkit_glue::WebFileUtilitiesImpl file_utilities_; | 133 webkit_glue::WebFileUtilitiesImpl file_utilities_; |
130 ScopedTempDir appcache_dir_; | 134 ScopedTempDir appcache_dir_; |
131 SimpleAppCacheSystem appcache_system_; | 135 SimpleAppCacheSystem appcache_system_; |
132 SimpleDatabaseSystem database_system_; | 136 SimpleDatabaseSystem database_system_; |
133 SimpleDomStorageSystem dom_storage_system_; | 137 SimpleDomStorageSystem dom_storage_system_; |
134 SimpleWebCookieJarImpl cookie_jar_; | 138 SimpleWebCookieJarImpl cookie_jar_; |
135 scoped_refptr<TestShellWebBlobRegistryImpl> blob_registry_; | 139 scoped_refptr<TestShellWebBlobRegistryImpl> blob_registry_; |
136 SimpleFileSystem file_system_; | 140 SimpleFileSystem file_system_; |
137 ScopedTempDir file_system_root_; | 141 ScopedTempDir file_system_root_; |
138 WebURLLoaderMockFactory url_loader_factory_; | 142 WebURLLoaderMockFactory url_loader_factory_; |
139 bool unit_test_mode_; | 143 bool unit_test_mode_; |
140 WebKit::WebGamepads gamepad_data_; | 144 WebKit::WebGamepads gamepad_data_; |
| 145 WebKit::Platform* shadow_platform_delegate_; |
141 | 146 |
142 #if defined(OS_WIN) || defined(OS_MACOSX) | 147 #if defined(OS_WIN) || defined(OS_MACOSX) |
143 WebKit::WebThemeEngine* active_theme_engine_; | 148 WebKit::WebThemeEngine* active_theme_engine_; |
144 #endif | 149 #endif |
145 DISALLOW_COPY_AND_ASSIGN(TestWebKitPlatformSupport); | 150 DISALLOW_COPY_AND_ASSIGN(TestWebKitPlatformSupport); |
146 }; | 151 }; |
147 | 152 |
148 #endif // WEBKIT_SUPPORT_TEST_WEBKIT_PLATFORM_SUPPORT_H_ | 153 #endif // WEBKIT_SUPPORT_TEST_WEBKIT_PLATFORM_SUPPORT_H_ |
OLD | NEW |