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

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

Issue 17476002: delete webkit/support/simple_xxx's (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
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 #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/public/platform/WebGamepads.h" 9 #include "third_party/WebKit/public/platform/WebGamepads.h"
10 #include "third_party/WebKit/public/platform/WebGraphicsContext3D.h" 10 #include "third_party/WebKit/public/platform/WebGraphicsContext3D.h"
11 #include "third_party/WebKit/public/platform/WebUnitTestSupport.h" 11 #include "third_party/WebKit/public/platform/WebUnitTestSupport.h"
12 #include "webkit/child/webkitplatformsupport_child_impl.h" 12 #include "webkit/child/webkitplatformsupport_child_impl.h"
13 #include "webkit/glue/webfileutilities_impl.h" 13 #include "webkit/glue/webfileutilities_impl.h"
14 #include "webkit/mocks/mock_webhyphenator.h" 14 #include "webkit/mocks/mock_webhyphenator.h"
15 #include "webkit/renderer/compositor_bindings/web_compositor_support_impl.h" 15 #include "webkit/renderer/compositor_bindings/web_compositor_support_impl.h"
16 #include "webkit/support/mock_webclipboard_impl.h" 16 #include "webkit/support/mock_webclipboard_impl.h"
17 #include "webkit/support/simple_appcache_system.h"
18 #include "webkit/support/simple_database_system.h" 17 #include "webkit/support/simple_database_system.h"
19 #include "webkit/support/simple_dom_storage_system.h" 18 #include "webkit/support/simple_dom_storage_system.h"
20 #include "webkit/support/simple_file_system.h"
21 #include "webkit/support/simple_webcookiejar_impl.h"
22 #include "webkit/support/test_shell_webmimeregistry_impl.h" 19 #include "webkit/support/test_shell_webmimeregistry_impl.h"
23 #include "webkit/support/weburl_loader_mock_factory.h" 20 #include "webkit/support/weburl_loader_mock_factory.h"
24 21
25 class TestShellWebBlobRegistryImpl; 22 class TestShellWebBlobRegistryImpl;
26 23
27 namespace cc { 24 namespace cc {
28 class ContextProvider; 25 class ContextProvider;
29 } 26 }
30 27
31 namespace WebKit { 28 namespace WebKit {
32 class WebAudioDevice; 29 class WebAudioDevice;
33 class WebGraphicsContext3DProvider; 30 class WebGraphicsContext3DProvider;
34 class WebLayerTreeView; 31 class WebLayerTreeView;
35 } 32 }
36 33
37 // An implementation of WebKitPlatformSupport for tests. 34 // An implementation of WebKitPlatformSupport for tests.
38 class TestWebKitPlatformSupport : 35 class TestWebKitPlatformSupport :
39 public WebKit::WebUnitTestSupport, 36 public WebKit::WebUnitTestSupport,
40 public webkit_glue::WebKitPlatformSupportChildImpl { 37 public webkit_glue::WebKitPlatformSupportChildImpl {
41 public: 38 public:
42 TestWebKitPlatformSupport(bool unit_test_mode, 39 TestWebKitPlatformSupport(bool unit_test_mode,
43 WebKit::Platform* shadow_platform_delegate); 40 WebKit::Platform* shadow_platform_delegate);
44 virtual ~TestWebKitPlatformSupport(); 41 virtual ~TestWebKitPlatformSupport();
45 42
46 virtual WebKit::WebMimeRegistry* mimeRegistry(); 43 virtual WebKit::WebMimeRegistry* mimeRegistry();
47 virtual WebKit::WebClipboard* clipboard(); 44 virtual WebKit::WebClipboard* clipboard();
48 virtual WebKit::WebFileUtilities* fileUtilities(); 45 virtual WebKit::WebFileUtilities* fileUtilities();
49 virtual WebKit::WebSandboxSupport* sandboxSupport(); 46 virtual WebKit::WebSandboxSupport* sandboxSupport();
50 virtual WebKit::WebCookieJar* cookieJar();
51 virtual WebKit::WebBlobRegistry* blobRegistry(); 47 virtual WebKit::WebBlobRegistry* blobRegistry();
52 virtual WebKit::WebFileSystem* fileSystem();
53 virtual WebKit::WebHyphenator* hyphenator(); 48 virtual WebKit::WebHyphenator* hyphenator();
54 virtual WebKit::WebIDBFactory* idbFactory(); 49 virtual WebKit::WebIDBFactory* idbFactory();
55 50
56 virtual bool sandboxEnabled(); 51 virtual bool sandboxEnabled();
57 virtual WebKit::Platform::FileHandle databaseOpenFile( 52 virtual WebKit::Platform::FileHandle databaseOpenFile(
58 const WebKit::WebString& vfs_file_name, int desired_flags); 53 const WebKit::WebString& vfs_file_name, int desired_flags);
59 virtual int databaseDeleteFile(const WebKit::WebString& vfs_file_name, 54 virtual int databaseDeleteFile(const WebKit::WebString& vfs_file_name,
60 bool sync_dir); 55 bool sync_dir);
61 virtual long databaseGetFileAttributes( 56 virtual long databaseGetFileAttributes(
62 const WebKit::WebString& vfs_file_name); 57 const WebKit::WebString& vfs_file_name);
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
165 160
166 void set_threaded_compositing_enabled(bool enabled) { 161 void set_threaded_compositing_enabled(bool enabled) {
167 threaded_compositing_enabled_ = enabled; 162 threaded_compositing_enabled_ = enabled;
168 } 163 }
169 164
170 private: 165 private:
171 TestShellWebMimeRegistryImpl mime_registry_; 166 TestShellWebMimeRegistryImpl mime_registry_;
172 MockWebClipboardImpl mock_clipboard_; 167 MockWebClipboardImpl mock_clipboard_;
173 webkit_glue::WebFileUtilitiesImpl file_utilities_; 168 webkit_glue::WebFileUtilitiesImpl file_utilities_;
174 base::ScopedTempDir appcache_dir_; 169 base::ScopedTempDir appcache_dir_;
175 SimpleAppCacheSystem appcache_system_;
176 SimpleDatabaseSystem database_system_; 170 SimpleDatabaseSystem database_system_;
177 SimpleDomStorageSystem dom_storage_system_; 171 SimpleDomStorageSystem dom_storage_system_;
178 SimpleWebCookieJarImpl cookie_jar_;
179 scoped_refptr<TestShellWebBlobRegistryImpl> blob_registry_; 172 scoped_refptr<TestShellWebBlobRegistryImpl> blob_registry_;
180 SimpleFileSystem file_system_;
181 base::ScopedTempDir file_system_root_; 173 base::ScopedTempDir file_system_root_;
182 webkit_glue::MockWebHyphenator hyphenator_; 174 webkit_glue::MockWebHyphenator hyphenator_;
183 WebURLLoaderMockFactory url_loader_factory_; 175 WebURLLoaderMockFactory url_loader_factory_;
184 bool unit_test_mode_; 176 bool unit_test_mode_;
185 WebKit::WebGamepads gamepad_data_; 177 WebKit::WebGamepads gamepad_data_;
186 WebKit::Platform* shadow_platform_delegate_; 178 WebKit::Platform* shadow_platform_delegate_;
187 bool threaded_compositing_enabled_; 179 bool threaded_compositing_enabled_;
188 webkit::WebCompositorSupportImpl compositor_support_; 180 webkit::WebCompositorSupportImpl compositor_support_;
189 181
190 scoped_refptr<cc::ContextProvider> main_thread_contexts_; 182 scoped_refptr<cc::ContextProvider> main_thread_contexts_;
191 183
192 #if defined(OS_WIN) || defined(OS_MACOSX) 184 #if defined(OS_WIN) || defined(OS_MACOSX)
193 WebKit::WebThemeEngine* active_theme_engine_; 185 WebKit::WebThemeEngine* active_theme_engine_;
194 #endif 186 #endif
195 DISALLOW_COPY_AND_ASSIGN(TestWebKitPlatformSupport); 187 DISALLOW_COPY_AND_ASSIGN(TestWebKitPlatformSupport);
196 }; 188 };
197 189
198 #endif // WEBKIT_SUPPORT_TEST_WEBKIT_PLATFORM_SUPPORT_H_ 190 #endif // WEBKIT_SUPPORT_TEST_WEBKIT_PLATFORM_SUPPORT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698