| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_TOOLS_TEST_SHELL_TEST_SHELL_WEBKIT_INIT_H_ | 5 #ifndef WEBKIT_TOOLS_TEST_SHELL_TEST_SHELL_WEBKIT_INIT_H_ |
| 6 #define WEBKIT_TOOLS_TEST_SHELL_TEST_SHELL_WEBKIT_INIT_H_ | 6 #define WEBKIT_TOOLS_TEST_SHELL_TEST_SHELL_WEBKIT_INIT_H_ |
| 7 | 7 |
| 8 #include "base/compiler_specific.h" |
| 8 #include "base/utf_string_conversions.h" | 9 #include "base/utf_string_conversions.h" |
| 9 #include "third_party/WebKit/Source/WebKit/chromium/public/WebIDBFactory.h" | 10 #include "third_party/WebKit/Source/WebKit/chromium/public/WebIDBFactory.h" |
| 10 #include "third_party/WebKit/Source/WebKit/chromium/public/WebIDBKey.h" | 11 #include "third_party/WebKit/Source/WebKit/chromium/public/WebIDBKey.h" |
| 11 #include "third_party/WebKit/Source/WebKit/chromium/public/WebIDBKeyPath.h" | 12 #include "third_party/WebKit/Source/WebKit/chromium/public/WebIDBKeyPath.h" |
| 12 #include "third_party/WebKit/Source/WebKit/chromium/public/WebSerializedScriptVa
lue.h" | 13 #include "third_party/WebKit/Source/WebKit/chromium/public/WebSerializedScriptVa
lue.h" |
| 13 #include "third_party/WebKit/Source/WebKit/chromium/public/WebStorageNamespace.h
" | 14 #include "third_party/WebKit/Source/WebKit/chromium/public/WebStorageNamespace.h
" |
| 14 #include "webkit/glue/webclipboard_impl.h" | 15 #include "webkit/glue/webclipboard_impl.h" |
| 15 #include "webkit/glue/webfileutilities_impl.h" | 16 #include "webkit/glue/webfileutilities_impl.h" |
| 16 #include "webkit/glue/webkit_glue.h" | 17 #include "webkit/glue/webkit_glue.h" |
| 17 #include "webkit/glue/webkitplatformsupport_impl.h" | 18 #include "webkit/glue/webkitplatformsupport_impl.h" |
| (...skipping 10 matching lines...) Expand all Loading... |
| 28 | 29 |
| 29 #if defined(OS_WIN) | 30 #if defined(OS_WIN) |
| 30 #include "webkit/tools/test_shell/test_shell_webthemeengine.h" | 31 #include "webkit/tools/test_shell/test_shell_webthemeengine.h" |
| 31 #endif | 32 #endif |
| 32 | 33 |
| 33 class TestShellWebKitInit : public webkit_glue::WebKitPlatformSupportImpl { | 34 class TestShellWebKitInit : public webkit_glue::WebKitPlatformSupportImpl { |
| 34 public: | 35 public: |
| 35 explicit TestShellWebKitInit(bool layout_test_mode); | 36 explicit TestShellWebKitInit(bool layout_test_mode); |
| 36 virtual ~TestShellWebKitInit(); | 37 virtual ~TestShellWebKitInit(); |
| 37 | 38 |
| 38 virtual WebKit::WebMimeRegistry* mimeRegistry(); | 39 virtual WebKit::WebMimeRegistry* mimeRegistry() OVERRIDE; |
| 39 virtual WebKit::WebClipboard* clipboard(); | 40 virtual WebKit::WebClipboard* clipboard() OVERRIDE; |
| 40 virtual WebKit::WebFileUtilities* fileUtilities(); | 41 virtual WebKit::WebFileUtilities* fileUtilities() OVERRIDE; |
| 41 virtual WebKit::WebSandboxSupport* sandboxSupport(); | 42 virtual WebKit::WebSandboxSupport* sandboxSupport() OVERRIDE; |
| 42 virtual WebKit::WebCookieJar* cookieJar(); | 43 virtual WebKit::WebCookieJar* cookieJar() OVERRIDE; |
| 43 virtual WebKit::WebBlobRegistry* blobRegistry(); | 44 virtual WebKit::WebBlobRegistry* blobRegistry() OVERRIDE; |
| 44 virtual WebKit::WebFileSystem* fileSystem(); | 45 virtual WebKit::WebFileSystem* fileSystem() OVERRIDE; |
| 45 virtual bool sandboxEnabled(); | 46 virtual bool sandboxEnabled() OVERRIDE; |
| 46 virtual WebKit::WebKitPlatformSupport::FileHandle databaseOpenFile( | 47 virtual WebKit::WebKitPlatformSupport::FileHandle databaseOpenFile( |
| 47 const WebKit::WebString& vfs_file_name, int desired_flags); | 48 const WebKit::WebString& vfs_file_name, int desired_flags) OVERRIDE; |
| 48 virtual int databaseDeleteFile(const WebKit::WebString& vfs_file_name, | 49 virtual int databaseDeleteFile(const WebKit::WebString& vfs_file_name, |
| 49 bool sync_dir); | 50 bool sync_dir) OVERRIDE; |
| 50 virtual long databaseGetFileAttributes( | 51 virtual long databaseGetFileAttributes( |
| 51 const WebKit::WebString& vfs_file_name); | 52 const WebKit::WebString& vfs_file_name) OVERRIDE; |
| 52 virtual long long databaseGetFileSize( | 53 virtual long long databaseGetFileSize( |
| 53 const WebKit::WebString& vfs_file_name); | 54 const WebKit::WebString& vfs_file_name) OVERRIDE; |
| 54 virtual long long databaseGetSpaceAvailableForOrigin( | 55 virtual long long databaseGetSpaceAvailableForOrigin( |
| 55 const WebKit::WebString& origin_identifier); | 56 const WebKit::WebString& origin_identifier) OVERRIDE; |
| 56 virtual unsigned long long visitedLinkHash(const char* canonicalURL, | 57 virtual unsigned long long visitedLinkHash(const char* canonicalURL, |
| 57 size_t length); | 58 size_t length) OVERRIDE; |
| 58 virtual bool isLinkVisited(unsigned long long linkHash); | 59 virtual bool isLinkVisited(unsigned long long linkHash) OVERRIDE; |
| 59 virtual WebKit::WebMessagePortChannel* createMessagePortChannel(); | 60 virtual WebKit::WebMessagePortChannel* createMessagePortChannel() OVERRIDE; |
| 60 virtual void prefetchHostName(const WebKit::WebString&); | 61 virtual void prefetchHostName(const WebKit::WebString&) OVERRIDE; |
| 61 virtual WebKit::WebData loadResource(const char* name); | 62 virtual WebKit::WebData loadResource(const char* name) OVERRIDE; |
| 62 virtual WebKit::WebString queryLocalizedString( | 63 virtual WebKit::WebString queryLocalizedString( |
| 63 WebKit::WebLocalizedString::Name name); | 64 WebKit::WebLocalizedString::Name name) OVERRIDE; |
| 64 virtual WebKit::WebString queryLocalizedString( | |
| 65 WebKit::WebLocalizedString::Name name, const WebKit::WebString& value); | |
| 66 virtual WebKit::WebString queryLocalizedString( | 65 virtual WebKit::WebString queryLocalizedString( |
| 67 WebKit::WebLocalizedString::Name name, | 66 WebKit::WebLocalizedString::Name name, |
| 68 const WebKit::WebString& value1, const WebKit::WebString& value2); | 67 const WebKit::WebString& value) OVERRIDE; |
| 68 virtual WebKit::WebString queryLocalizedString( |
| 69 WebKit::WebLocalizedString::Name name, |
| 70 const WebKit::WebString& value1, |
| 71 const WebKit::WebString& value2) OVERRIDE; |
| 69 | 72 |
| 70 virtual WebKit::WebString defaultLocale(); | 73 virtual WebKit::WebString defaultLocale() OVERRIDE; |
| 71 | 74 |
| 72 virtual WebKit::WebStorageNamespace* createLocalStorageNamespace( | 75 virtual WebKit::WebStorageNamespace* createLocalStorageNamespace( |
| 73 const WebKit::WebString& path, unsigned quota); | 76 const WebKit::WebString& path, unsigned quota) OVERRIDE; |
| 74 | 77 |
| 75 virtual void dispatchStorageEvent(const WebKit::WebString& key, | 78 virtual void dispatchStorageEvent(const WebKit::WebString& key, |
| 76 const WebKit::WebString& old_value, | 79 const WebKit::WebString& old_value, |
| 77 const WebKit::WebString& new_value, | 80 const WebKit::WebString& new_value, |
| 78 const WebKit::WebString& origin, | 81 const WebKit::WebString& origin, |
| 79 const WebKit::WebURL& url, | 82 const WebKit::WebURL& url, |
| 80 bool is_local_storage); | 83 bool is_local_storage) OVERRIDE; |
| 81 virtual WebKit::WebIDBFactory* idbFactory(); | 84 virtual WebKit::WebIDBFactory* idbFactory() OVERRIDE; |
| 82 | 85 |
| 83 virtual void createIDBKeysFromSerializedValuesAndKeyPath( | 86 virtual void createIDBKeysFromSerializedValuesAndKeyPath( |
| 84 const WebKit::WebVector<WebKit::WebSerializedScriptValue>& values, | 87 const WebKit::WebVector<WebKit::WebSerializedScriptValue>& values, |
| 85 const WebKit::WebString& keyPath, | 88 const WebKit::WebString& keyPath, |
| 86 WebKit::WebVector<WebKit::WebIDBKey>& keys_out); | 89 WebKit::WebVector<WebKit::WebIDBKey>& keys_out) OVERRIDE; |
| 87 | 90 |
| 88 virtual WebKit::WebSerializedScriptValue injectIDBKeyIntoSerializedValue( | 91 virtual WebKit::WebSerializedScriptValue injectIDBKeyIntoSerializedValue( |
| 89 const WebKit::WebIDBKey& key, | 92 const WebKit::WebIDBKey& key, |
| 90 const WebKit::WebSerializedScriptValue& value, | 93 const WebKit::WebSerializedScriptValue& value, |
| 91 const WebKit::WebString& keyPath); | 94 const WebKit::WebString& keyPath) OVERRIDE; |
| 92 | 95 |
| 93 | 96 |
| 94 #if defined(OS_WIN) | 97 #if defined(OS_WIN) |
| 95 void SetThemeEngine(WebKit::WebThemeEngine* engine) { | 98 void SetThemeEngine(WebKit::WebThemeEngine* engine) { |
| 96 active_theme_engine_ = engine ? | 99 active_theme_engine_ = engine ? |
| 97 engine : WebKitPlatformSupportImpl::themeEngine(); | 100 engine : WebKitPlatformSupportImpl::themeEngine(); |
| 98 } | 101 } |
| 99 | 102 |
| 100 virtual WebKit::WebThemeEngine *themeEngine() { | 103 virtual WebKit::WebThemeEngine *themeEngine() OVERRIDE { |
| 101 return active_theme_engine_; | 104 return active_theme_engine_; |
| 102 } | 105 } |
| 103 #endif | 106 #endif |
| 104 | 107 |
| 105 virtual WebKit::WebSharedWorkerRepository* sharedWorkerRepository(); | 108 virtual WebKit::WebSharedWorkerRepository* sharedWorkerRepository() OVERRIDE; |
| 106 virtual WebKit::WebGraphicsContext3D* createGraphicsContext3D(); | 109 virtual WebKit::WebGraphicsContext3D* createGraphicsContext3D() OVERRIDE; |
| 110 |
| 111 virtual string16 GetLocalizedString(int message_id) OVERRIDE; |
| 112 virtual base::StringPiece GetDataResource(int resource_id) OVERRIDE; |
| 113 virtual void GetPlugins(bool refresh, |
| 114 std::vector<webkit::WebPluginInfo>* plugins) OVERRIDE; |
| 115 virtual webkit_glue::ResourceLoaderBridge* CreateResourceLoader( |
| 116 const webkit_glue::ResourceLoaderBridge::RequestInfo& request_info) |
| 117 OVERRIDE; |
| 118 virtual webkit_glue::WebSocketStreamHandleBridge* CreateWebSocketBridge( |
| 119 WebKit::WebSocketStreamHandle* handle, |
| 120 webkit_glue::WebSocketStreamHandleDelegate* delegate) OVERRIDE; |
| 107 | 121 |
| 108 private: | 122 private: |
| 109 scoped_ptr<webkit_glue::SimpleWebMimeRegistryImpl> mime_registry_; | 123 scoped_ptr<webkit_glue::SimpleWebMimeRegistryImpl> mime_registry_; |
| 110 MockWebClipboardImpl mock_clipboard_; | 124 MockWebClipboardImpl mock_clipboard_; |
| 111 SimpleClipboardClient clipboard_client_; | 125 SimpleClipboardClient clipboard_client_; |
| 112 webkit_glue::WebClipboardImpl real_clipboard_; | 126 webkit_glue::WebClipboardImpl real_clipboard_; |
| 113 webkit_glue::WebFileUtilitiesImpl file_utilities_; | 127 webkit_glue::WebFileUtilitiesImpl file_utilities_; |
| 114 ScopedTempDir appcache_dir_; | 128 ScopedTempDir appcache_dir_; |
| 115 SimpleAppCacheSystem appcache_system_; | 129 SimpleAppCacheSystem appcache_system_; |
| 116 SimpleDatabaseSystem database_system_; | 130 SimpleDatabaseSystem database_system_; |
| 117 SimpleWebCookieJarImpl cookie_jar_; | 131 SimpleWebCookieJarImpl cookie_jar_; |
| 118 scoped_refptr<TestShellWebBlobRegistryImpl> blob_registry_; | 132 scoped_refptr<TestShellWebBlobRegistryImpl> blob_registry_; |
| 119 SimpleFileSystem file_system_; | 133 SimpleFileSystem file_system_; |
| 120 | 134 |
| 121 #if defined(OS_WIN) | 135 #if defined(OS_WIN) |
| 122 WebKit::WebThemeEngine* active_theme_engine_; | 136 WebKit::WebThemeEngine* active_theme_engine_; |
| 123 #endif | 137 #endif |
| 124 }; | 138 }; |
| 125 | 139 |
| 126 #endif // WEBKIT_TOOLS_TEST_SHELL_TEST_SHELL_WEBKIT_INIT_H_ | 140 #endif // WEBKIT_TOOLS_TEST_SHELL_TEST_SHELL_WEBKIT_INIT_H_ |
| OLD | NEW |