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/Platform/chromium/public/WebGamepads.h" | 9 #include "third_party/WebKit/Source/Platform/chromium/public/WebGamepads.h" |
10 #include "third_party/WebKit/Source/Platform/chromium/public/WebGraphicsContext3
D.h" | 10 #include "third_party/WebKit/Source/Platform/chromium/public/WebGraphicsContext3
D.h" |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
84 #if defined(OS_WIN) || defined(OS_MACOSX) | 84 #if defined(OS_WIN) || defined(OS_MACOSX) |
85 void SetThemeEngine(WebKit::WebThemeEngine* engine); | 85 void SetThemeEngine(WebKit::WebThemeEngine* engine); |
86 virtual WebKit::WebThemeEngine *themeEngine(); | 86 virtual WebKit::WebThemeEngine *themeEngine(); |
87 #endif | 87 #endif |
88 | 88 |
89 virtual WebKit::WebGraphicsContext3D* createOffscreenGraphicsContext3D( | 89 virtual WebKit::WebGraphicsContext3D* createOffscreenGraphicsContext3D( |
90 const WebKit::WebGraphicsContext3D::Attributes&); | 90 const WebKit::WebGraphicsContext3D::Attributes&); |
91 virtual WebKit::WebGraphicsContext3D* sharedOffscreenGraphicsContext3D(); | 91 virtual WebKit::WebGraphicsContext3D* sharedOffscreenGraphicsContext3D(); |
92 virtual GrContext* sharedOffscreenGrContext(); | 92 virtual GrContext* sharedOffscreenGrContext(); |
93 virtual bool canAccelerate2dCanvas(); | 93 virtual bool canAccelerate2dCanvas(); |
| 94 virtual bool isThreadedCompositingEnabled(); |
94 | 95 |
95 WebURLLoaderMockFactory* url_loader_factory() { | 96 WebURLLoaderMockFactory* url_loader_factory() { |
96 return &url_loader_factory_; | 97 return &url_loader_factory_; |
97 } | 98 } |
98 | 99 |
99 const base::FilePath& file_system_root() const { | 100 const base::FilePath& file_system_root() const { |
100 return file_system_root_.path(); | 101 return file_system_root_.path(); |
101 } | 102 } |
102 | 103 |
103 // Mock out the WebAudioDevice since the real one | 104 // Mock out the WebAudioDevice since the real one |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
157 const WebKit::WebURLResponse& response, | 158 const WebKit::WebURLResponse& response, |
158 const WebKit::WebURLError& error); | 159 const WebKit::WebURLError& error); |
159 virtual void unregisterMockedURL(const WebKit::WebURL& url); | 160 virtual void unregisterMockedURL(const WebKit::WebURL& url); |
160 virtual void unregisterAllMockedURLs(); | 161 virtual void unregisterAllMockedURLs(); |
161 virtual void serveAsynchronousMockedRequests(); | 162 virtual void serveAsynchronousMockedRequests(); |
162 virtual WebKit::WebString webKitRootDir(); | 163 virtual WebKit::WebString webKitRootDir(); |
163 virtual WebKit::WebLayerTreeView* createLayerTreeViewForTesting(); | 164 virtual WebKit::WebLayerTreeView* createLayerTreeViewForTesting(); |
164 virtual WebKit::WebLayerTreeView* createLayerTreeViewForTesting( | 165 virtual WebKit::WebLayerTreeView* createLayerTreeViewForTesting( |
165 TestViewType type); | 166 TestViewType type); |
166 | 167 |
| 168 void set_threaded_compositing_enabled(bool enabled) { |
| 169 threaded_compositing_enabled_ = enabled; |
| 170 } |
| 171 |
167 private: | 172 private: |
168 TestShellWebMimeRegistryImpl mime_registry_; | 173 TestShellWebMimeRegistryImpl mime_registry_; |
169 MockWebClipboardImpl mock_clipboard_; | 174 MockWebClipboardImpl mock_clipboard_; |
170 webkit_glue::WebFileUtilitiesImpl file_utilities_; | 175 webkit_glue::WebFileUtilitiesImpl file_utilities_; |
171 base::ScopedTempDir appcache_dir_; | 176 base::ScopedTempDir appcache_dir_; |
172 SimpleAppCacheSystem appcache_system_; | 177 SimpleAppCacheSystem appcache_system_; |
173 SimpleDatabaseSystem database_system_; | 178 SimpleDatabaseSystem database_system_; |
174 SimpleDomStorageSystem dom_storage_system_; | 179 SimpleDomStorageSystem dom_storage_system_; |
175 SimpleWebCookieJarImpl cookie_jar_; | 180 SimpleWebCookieJarImpl cookie_jar_; |
176 scoped_refptr<TestShellWebBlobRegistryImpl> blob_registry_; | 181 scoped_refptr<TestShellWebBlobRegistryImpl> blob_registry_; |
177 SimpleFileSystem file_system_; | 182 SimpleFileSystem file_system_; |
178 base::ScopedTempDir file_system_root_; | 183 base::ScopedTempDir file_system_root_; |
179 webkit_glue::MockWebHyphenator hyphenator_; | 184 webkit_glue::MockWebHyphenator hyphenator_; |
180 WebURLLoaderMockFactory url_loader_factory_; | 185 WebURLLoaderMockFactory url_loader_factory_; |
181 bool unit_test_mode_; | 186 bool unit_test_mode_; |
182 WebKit::WebGamepads gamepad_data_; | 187 WebKit::WebGamepads gamepad_data_; |
183 WebKit::Platform* shadow_platform_delegate_; | 188 WebKit::Platform* shadow_platform_delegate_; |
| 189 bool threaded_compositing_enabled_; |
184 | 190 |
185 scoped_refptr<cc::ContextProvider> main_thread_contexts_; | 191 scoped_refptr<cc::ContextProvider> main_thread_contexts_; |
186 | 192 |
187 #if defined(OS_WIN) || defined(OS_MACOSX) | 193 #if defined(OS_WIN) || defined(OS_MACOSX) |
188 WebKit::WebThemeEngine* active_theme_engine_; | 194 WebKit::WebThemeEngine* active_theme_engine_; |
189 #endif | 195 #endif |
190 DISALLOW_COPY_AND_ASSIGN(TestWebKitPlatformSupport); | 196 DISALLOW_COPY_AND_ASSIGN(TestWebKitPlatformSupport); |
191 }; | 197 }; |
192 | 198 |
193 #endif // WEBKIT_SUPPORT_TEST_WEBKIT_PLATFORM_SUPPORT_H_ | 199 #endif // WEBKIT_SUPPORT_TEST_WEBKIT_PLATFORM_SUPPORT_H_ |
OLD | NEW |