OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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_CLIENT_H_ | 5 #ifndef WEBKIT_SUPPORT_TEST_WEBKIT_CLIENT_H_ |
6 #define WEBKIT_SUPPORT_TEST_WEBKIT_CLIENT_H_ | 6 #define WEBKIT_SUPPORT_TEST_WEBKIT_CLIENT_H_ |
7 | 7 |
8 #include "webkit/glue/webfileutilities_impl.h" | 8 #include "webkit/glue/webfileutilities_impl.h" |
9 #include "webkit/glue/webkitclient_impl.h" | 9 #include "webkit/glue/webkitclient_impl.h" |
10 #include "webkit/support/weburl_loader_mock_factory.h" | 10 #include "webkit/support/weburl_loader_mock_factory.h" |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
61 void dispatchStorageEvent(const WebKit::WebString& key, | 61 void dispatchStorageEvent(const WebKit::WebString& key, |
62 const WebKit::WebString& old_value, const WebKit::WebString& new_value, | 62 const WebKit::WebString& old_value, const WebKit::WebString& new_value, |
63 const WebKit::WebString& origin, const WebKit::WebURL& url, | 63 const WebKit::WebString& origin, const WebKit::WebURL& url, |
64 bool is_local_storage); | 64 bool is_local_storage); |
65 virtual WebKit::WebIDBFactory* idbFactory(); | 65 virtual WebKit::WebIDBFactory* idbFactory(); |
66 virtual void createIDBKeysFromSerializedValuesAndKeyPath( | 66 virtual void createIDBKeysFromSerializedValuesAndKeyPath( |
67 const WebKit::WebVector<WebKit::WebSerializedScriptValue>& values, | 67 const WebKit::WebVector<WebKit::WebSerializedScriptValue>& values, |
68 const WebKit::WebString& keyPath, | 68 const WebKit::WebString& keyPath, |
69 WebKit::WebVector<WebKit::WebIDBKey>& keys_out); | 69 WebKit::WebVector<WebKit::WebIDBKey>& keys_out); |
70 | 70 |
71 #if defined(OS_WIN) | 71 #if defined(OS_WIN) || defined(OS_MACOSX) |
72 void SetThemeEngine(WebKit::WebThemeEngine* engine); | 72 void SetThemeEngine(WebKit::WebThemeEngine* engine); |
73 virtual WebKit::WebThemeEngine *themeEngine(); | 73 virtual WebKit::WebThemeEngine *themeEngine(); |
74 #endif | 74 #endif |
75 | 75 |
76 virtual WebKit::WebSharedWorkerRepository* sharedWorkerRepository(); | 76 virtual WebKit::WebSharedWorkerRepository* sharedWorkerRepository(); |
77 virtual WebKit::WebGraphicsContext3D* createGraphicsContext3D(); | 77 virtual WebKit::WebGraphicsContext3D* createGraphicsContext3D(); |
78 | 78 |
79 WebURLLoaderMockFactory* url_loader_factory() { | 79 WebURLLoaderMockFactory* url_loader_factory() { |
80 return &url_loader_factory_; | 80 return &url_loader_factory_; |
81 } | 81 } |
82 | 82 |
83 const FilePath& file_system_root() const { | 83 const FilePath& file_system_root() const { |
84 return file_system_root_.path(); | 84 return file_system_root_.path(); |
85 } | 85 } |
86 | 86 |
87 private: | 87 private: |
88 TestShellWebMimeRegistryImpl mime_registry_; | 88 TestShellWebMimeRegistryImpl mime_registry_; |
89 MockWebClipboardImpl mock_clipboard_; | 89 MockWebClipboardImpl mock_clipboard_; |
90 webkit_glue::WebFileUtilitiesImpl file_utilities_; | 90 webkit_glue::WebFileUtilitiesImpl file_utilities_; |
91 ScopedTempDir appcache_dir_; | 91 ScopedTempDir appcache_dir_; |
92 SimpleAppCacheSystem appcache_system_; | 92 SimpleAppCacheSystem appcache_system_; |
93 SimpleDatabaseSystem database_system_; | 93 SimpleDatabaseSystem database_system_; |
94 SimpleWebCookieJarImpl cookie_jar_; | 94 SimpleWebCookieJarImpl cookie_jar_; |
95 scoped_refptr<TestShellWebBlobRegistryImpl> blob_registry_; | 95 scoped_refptr<TestShellWebBlobRegistryImpl> blob_registry_; |
96 SimpleFileSystem file_system_; | 96 SimpleFileSystem file_system_; |
97 ScopedTempDir file_system_root_; | 97 ScopedTempDir file_system_root_; |
98 WebURLLoaderMockFactory url_loader_factory_; | 98 WebURLLoaderMockFactory url_loader_factory_; |
99 bool unit_test_mode_; | 99 bool unit_test_mode_; |
100 | 100 |
101 #if defined(OS_WIN) | 101 #if defined(OS_WIN) || defined(OS_MACOSX) |
102 WebKit::WebThemeEngine* active_theme_engine_; | 102 WebKit::WebThemeEngine* active_theme_engine_; |
103 #endif | 103 #endif |
104 DISALLOW_COPY_AND_ASSIGN(TestWebKitClient); | 104 DISALLOW_COPY_AND_ASSIGN(TestWebKitClient); |
105 }; | 105 }; |
106 | 106 |
107 #endif // WEBKIT_SUPPORT_TEST_WEBKIT_CLIENT_H_ | 107 #endif // WEBKIT_SUPPORT_TEST_WEBKIT_CLIENT_H_ |
OLD | NEW |