| OLD | NEW |
| (Empty) |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef CHROME_WORKER_WORKER_WEBKITCLIENT_IMPL_H_ | |
| 6 #define CHROME_WORKER_WORKER_WEBKITCLIENT_IMPL_H_ | |
| 7 #pragma once | |
| 8 | |
| 9 #include "base/scoped_ptr.h" | |
| 10 #include "third_party/WebKit/Source/WebKit/chromium/public/WebMimeRegistry.h" | |
| 11 #include "webkit/glue/webkitclient_impl.h" | |
| 12 | |
| 13 class WebFileSystemImpl; | |
| 14 | |
| 15 namespace WebKit { | |
| 16 class WebFileUtilities; | |
| 17 } | |
| 18 | |
| 19 class WorkerWebKitClientImpl : public webkit_glue::WebKitClientImpl, | |
| 20 public WebKit::WebMimeRegistry { | |
| 21 public: | |
| 22 WorkerWebKitClientImpl(); | |
| 23 virtual ~WorkerWebKitClientImpl(); | |
| 24 | |
| 25 // WebKitClient methods: | |
| 26 virtual WebKit::WebClipboard* clipboard(); | |
| 27 virtual WebKit::WebMimeRegistry* mimeRegistry(); | |
| 28 virtual WebKit::WebFileSystem* fileSystem(); | |
| 29 virtual WebKit::WebFileUtilities* fileUtilities(); | |
| 30 virtual WebKit::WebSandboxSupport* sandboxSupport(); | |
| 31 virtual bool sandboxEnabled(); | |
| 32 virtual unsigned long long visitedLinkHash(const char* canonicalURL, | |
| 33 size_t length); | |
| 34 virtual bool isLinkVisited(unsigned long long linkHash); | |
| 35 virtual WebKit::WebMessagePortChannel* createMessagePortChannel(); | |
| 36 virtual void setCookies(const WebKit::WebURL& url, | |
| 37 const WebKit::WebURL& first_party_for_cookies, | |
| 38 const WebKit::WebString& value); | |
| 39 virtual WebKit::WebString cookies( | |
| 40 const WebKit::WebURL& url, | |
| 41 const WebKit::WebURL& first_party_for_cookies); | |
| 42 virtual void prefetchHostName(const WebKit::WebString&); | |
| 43 virtual WebKit::WebString defaultLocale(); | |
| 44 virtual WebKit::WebStorageNamespace* createLocalStorageNamespace( | |
| 45 const WebKit::WebString& path, unsigned quota); | |
| 46 virtual void dispatchStorageEvent( | |
| 47 const WebKit::WebString& key, const WebKit::WebString& old_value, | |
| 48 const WebKit::WebString& new_value, const WebKit::WebString& origin, | |
| 49 const WebKit::WebURL& url, bool is_local_storage); | |
| 50 virtual WebKit::WebSharedWorkerRepository* sharedWorkerRepository(); | |
| 51 | |
| 52 virtual WebKit::WebKitClient::FileHandle databaseOpenFile( | |
| 53 const WebKit::WebString& vfs_file_name, int desired_flags); | |
| 54 virtual int databaseDeleteFile(const WebKit::WebString& vfs_file_name, | |
| 55 bool sync_dir); | |
| 56 virtual long databaseGetFileAttributes( | |
| 57 const WebKit::WebString& vfs_file_name); | |
| 58 virtual long long databaseGetFileSize( | |
| 59 const WebKit::WebString& vfs_file_name); | |
| 60 | |
| 61 virtual WebKit::WebBlobRegistry* blobRegistry(); | |
| 62 | |
| 63 // WebMimeRegistry methods: | |
| 64 virtual WebKit::WebMimeRegistry::SupportsType supportsMIMEType( | |
| 65 const WebKit::WebString&); | |
| 66 virtual WebKit::WebMimeRegistry::SupportsType supportsImageMIMEType( | |
| 67 const WebKit::WebString&); | |
| 68 virtual WebKit::WebMimeRegistry::SupportsType supportsJavaScriptMIMEType( | |
| 69 const WebKit::WebString&); | |
| 70 virtual WebKit::WebMimeRegistry::SupportsType supportsMediaMIMEType( | |
| 71 const WebKit::WebString&, const WebKit::WebString&); | |
| 72 virtual WebKit::WebMimeRegistry::SupportsType supportsNonImageMIMEType( | |
| 73 const WebKit::WebString&); | |
| 74 virtual WebKit::WebString mimeTypeForExtension(const WebKit::WebString&); | |
| 75 virtual WebKit::WebString mimeTypeFromFile(const WebKit::WebString&); | |
| 76 virtual WebKit::WebString preferredExtensionForMIMEType( | |
| 77 const WebKit::WebString&); | |
| 78 | |
| 79 private: | |
| 80 | |
| 81 class FileUtilities; | |
| 82 scoped_ptr<FileUtilities> file_utilities_; | |
| 83 | |
| 84 scoped_ptr<WebKit::WebBlobRegistry> blob_registry_; | |
| 85 | |
| 86 scoped_ptr<WebFileSystemImpl> web_file_system_; | |
| 87 }; | |
| 88 | |
| 89 #endif // CHROME_WORKER_WORKER_WEBKITCLIENT_IMPL_H_ | |
| OLD | NEW |