| 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 CONTENT_RENDERER_RENDERER_WEBKITPLATFORMSUPPORT_IMPL_H_ | 5 #ifndef CONTENT_RENDERER_RENDERER_WEBKITPLATFORMSUPPORT_IMPL_H_ |
| 6 #define CONTENT_RENDERER_RENDERER_WEBKITPLATFORMSUPPORT_IMPL_H_ | 6 #define CONTENT_RENDERER_RENDERER_WEBKITPLATFORMSUPPORT_IMPL_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| 11 #include "base/platform_file.h" | 11 #include "base/platform_file.h" |
| 12 #include "content/common/content_export.h" | 12 #include "content/common/content_export.h" |
| 13 #include "webkit/glue/webkitplatformsupport_impl.h" | 13 #include "content/common/content_webkitplatformsupport_impl.h" |
| 14 | 14 |
| 15 class WebSharedWorkerRepositoryImpl; | 15 class WebSharedWorkerRepositoryImpl; |
| 16 class WebFileSystemImpl; | 16 class WebFileSystemImpl; |
| 17 | 17 |
| 18 namespace IPC { | 18 namespace IPC { |
| 19 class SyncMessage; | 19 class SyncMessage; |
| 20 } | 20 } |
| 21 | 21 |
| 22 namespace webkit_glue { | 22 namespace webkit_glue { |
| 23 class WebClipboardImpl; | 23 class WebClipboardImpl; |
| 24 } | 24 } |
| 25 | 25 |
| 26 class CONTENT_EXPORT RendererWebKitPlatformSupportImpl | 26 class CONTENT_EXPORT RendererWebKitPlatformSupportImpl |
| 27 : NON_EXPORTED_BASE(public webkit_glue::WebKitPlatformSupportImpl) { | 27 : public content::WebKitPlatformSupportImpl { |
| 28 public: | 28 public: |
| 29 RendererWebKitPlatformSupportImpl(); | 29 RendererWebKitPlatformSupportImpl(); |
| 30 virtual ~RendererWebKitPlatformSupportImpl(); | 30 virtual ~RendererWebKitPlatformSupportImpl(); |
| 31 | 31 |
| 32 // WebKitPlatformSupport methods: | 32 // WebKitPlatformSupport methods: |
| 33 virtual WebKit::WebClipboard* clipboard(); | 33 virtual WebKit::WebClipboard* clipboard() OVERRIDE; |
| 34 virtual WebKit::WebMimeRegistry* mimeRegistry(); | 34 virtual WebKit::WebMimeRegistry* mimeRegistry() OVERRIDE; |
| 35 virtual WebKit::WebFileUtilities* fileUtilities(); | 35 virtual WebKit::WebFileUtilities* fileUtilities() OVERRIDE; |
| 36 virtual WebKit::WebSandboxSupport* sandboxSupport(); | 36 virtual WebKit::WebSandboxSupport* sandboxSupport() OVERRIDE; |
| 37 virtual WebKit::WebCookieJar* cookieJar(); | 37 virtual WebKit::WebCookieJar* cookieJar() OVERRIDE; |
| 38 virtual bool sandboxEnabled(); | 38 virtual bool sandboxEnabled() OVERRIDE; |
| 39 virtual unsigned long long visitedLinkHash( | 39 virtual unsigned long long visitedLinkHash( |
| 40 const char* canonicalURL, size_t length); | 40 const char* canonicalURL, size_t length) OVERRIDE; |
| 41 virtual bool isLinkVisited(unsigned long long linkHash); | 41 virtual bool isLinkVisited(unsigned long long linkHash) OVERRIDE; |
| 42 virtual WebKit::WebMessagePortChannel* createMessagePortChannel(); | 42 virtual WebKit::WebMessagePortChannel* createMessagePortChannel() OVERRIDE; |
| 43 virtual void prefetchHostName(const WebKit::WebString&); | 43 virtual void prefetchHostName(const WebKit::WebString&) OVERRIDE; |
| 44 virtual void cacheMetadata( | 44 virtual void cacheMetadata( |
| 45 const WebKit::WebURL&, double, const char*, size_t); | 45 const WebKit::WebURL&, double, const char*, size_t) OVERRIDE; |
| 46 virtual WebKit::WebString defaultLocale(); | 46 virtual WebKit::WebString defaultLocale() OVERRIDE; |
| 47 virtual void suddenTerminationChanged(bool enabled); | 47 virtual void suddenTerminationChanged(bool enabled) OVERRIDE; |
| 48 virtual WebKit::WebStorageNamespace* createLocalStorageNamespace( | 48 virtual WebKit::WebStorageNamespace* createLocalStorageNamespace( |
| 49 const WebKit::WebString& path, unsigned quota); | 49 const WebKit::WebString& path, unsigned quota) OVERRIDE; |
| 50 virtual void dispatchStorageEvent( | 50 virtual void dispatchStorageEvent( |
| 51 const WebKit::WebString& key, const WebKit::WebString& old_value, | 51 const WebKit::WebString& key, const WebKit::WebString& old_value, |
| 52 const WebKit::WebString& new_value, const WebKit::WebString& origin, | 52 const WebKit::WebString& new_value, const WebKit::WebString& origin, |
| 53 const WebKit::WebURL& url, bool is_local_storage); | 53 const WebKit::WebURL& url, bool is_local_storage) OVERRIDE; |
| 54 | |
| 55 virtual WebKit::WebKitPlatformSupport::FileHandle databaseOpenFile( | 54 virtual WebKit::WebKitPlatformSupport::FileHandle databaseOpenFile( |
| 56 const WebKit::WebString& vfs_file_name, int desired_flags); | 55 const WebKit::WebString& vfs_file_name, int desired_flags) OVERRIDE; |
| 57 virtual int databaseDeleteFile(const WebKit::WebString& vfs_file_name, | 56 virtual int databaseDeleteFile(const WebKit::WebString& vfs_file_name, |
| 58 bool sync_dir); | 57 bool sync_dir) OVERRIDE; |
| 59 virtual long databaseGetFileAttributes( | 58 virtual long databaseGetFileAttributes( |
| 60 const WebKit::WebString& vfs_file_name); | 59 const WebKit::WebString& vfs_file_name) OVERRIDE; |
| 61 virtual long long databaseGetFileSize( | 60 virtual long long databaseGetFileSize( |
| 62 const WebKit::WebString& vfs_file_name); | 61 const WebKit::WebString& vfs_file_name) OVERRIDE; |
| 63 virtual long long databaseGetSpaceAvailableForOrigin( | 62 virtual long long databaseGetSpaceAvailableForOrigin( |
| 64 const WebKit::WebString& origin_identifier); | 63 const WebKit::WebString& origin_identifier) OVERRIDE; |
| 65 virtual WebKit::WebString signedPublicKeyAndChallengeString( | 64 virtual WebKit::WebString signedPublicKeyAndChallengeString( |
| 66 unsigned key_size_index, | 65 unsigned key_size_index, |
| 67 const WebKit::WebString& challenge, | 66 const WebKit::WebString& challenge, |
| 68 const WebKit::WebURL& url); | 67 const WebKit::WebURL& url) OVERRIDE; |
| 69 virtual WebKit::WebIDBFactory* idbFactory(); | 68 virtual WebKit::WebIDBFactory* idbFactory() OVERRIDE; |
| 70 virtual void createIDBKeysFromSerializedValuesAndKeyPath( | 69 virtual void createIDBKeysFromSerializedValuesAndKeyPath( |
| 71 const WebKit::WebVector<WebKit::WebSerializedScriptValue>& values, | 70 const WebKit::WebVector<WebKit::WebSerializedScriptValue>& values, |
| 72 const WebKit::WebString& keyPath, | 71 const WebKit::WebString& keyPath, |
| 73 WebKit::WebVector<WebKit::WebIDBKey>& keys); | 72 WebKit::WebVector<WebKit::WebIDBKey>& keys) OVERRIDE; |
| 74 virtual WebKit::WebSerializedScriptValue injectIDBKeyIntoSerializedValue( | 73 virtual WebKit::WebSerializedScriptValue injectIDBKeyIntoSerializedValue( |
| 75 const WebKit::WebIDBKey& key, | 74 const WebKit::WebIDBKey& key, |
| 76 const WebKit::WebSerializedScriptValue& value, | 75 const WebKit::WebSerializedScriptValue& value, |
| 77 const WebKit::WebString& keyPath); | 76 const WebKit::WebString& keyPath) OVERRIDE; |
| 78 virtual WebKit::WebFileSystem* fileSystem(); | 77 virtual WebKit::WebFileSystem* fileSystem() OVERRIDE; |
| 79 | 78 virtual WebKit::WebSharedWorkerRepository* sharedWorkerRepository() OVERRIDE; |
| 80 virtual WebKit::WebSharedWorkerRepository* sharedWorkerRepository(); | 79 virtual WebKit::WebGraphicsContext3D* createGraphicsContext3D() OVERRIDE; |
| 81 virtual WebKit::WebGraphicsContext3D* createGraphicsContext3D(); | 80 virtual double audioHardwareSampleRate() OVERRIDE; |
| 82 virtual double audioHardwareSampleRate(); | 81 virtual size_t audioHardwareBufferSize() OVERRIDE; |
| 83 virtual size_t audioHardwareBufferSize(); | |
| 84 virtual WebKit::WebAudioDevice* createAudioDevice( | 82 virtual WebKit::WebAudioDevice* createAudioDevice( |
| 85 size_t buffer_size, unsigned channels, double sample_rate, | 83 size_t buffer_size, unsigned channels, double sample_rate, |
| 86 WebKit::WebAudioDevice::RenderCallback* callback); | 84 WebKit::WebAudioDevice::RenderCallback* callback) OVERRIDE; |
| 87 | 85 virtual WebKit::WebBlobRegistry* blobRegistry() OVERRIDE; |
| 88 virtual WebKit::WebBlobRegistry* blobRegistry(); | 86 virtual WebKit::WebString userAgent(const WebKit::WebURL& url) OVERRIDE; |
| 89 | 87 virtual void GetPlugins(bool refresh, |
| 90 virtual WebKit::WebString userAgent(const WebKit::WebURL& url); | 88 std::vector<webkit::WebPluginInfo>* plugins) OVERRIDE; |
| 91 | 89 |
| 92 private: | 90 private: |
| 93 bool CheckPreparsedJsCachingEnabled() const; | 91 bool CheckPreparsedJsCachingEnabled() const; |
| 94 | 92 |
| 95 // Helper function to send synchronous message from any thread. | 93 // Helper function to send synchronous message from any thread. |
| 96 static bool SendSyncMessageFromAnyThread(IPC::SyncMessage* msg); | 94 static bool SendSyncMessageFromAnyThread(IPC::SyncMessage* msg); |
| 97 | 95 |
| 98 scoped_ptr<webkit_glue::WebClipboardImpl> clipboard_; | 96 scoped_ptr<webkit_glue::WebClipboardImpl> clipboard_; |
| 99 | 97 |
| 100 class FileUtilities; | 98 class FileUtilities; |
| (...skipping 16 matching lines...) Expand all Loading... |
| 117 scoped_ptr<WebSharedWorkerRepositoryImpl> shared_worker_repository_; | 115 scoped_ptr<WebSharedWorkerRepositoryImpl> shared_worker_repository_; |
| 118 | 116 |
| 119 scoped_ptr<WebKit::WebIDBFactory> web_idb_factory_; | 117 scoped_ptr<WebKit::WebIDBFactory> web_idb_factory_; |
| 120 | 118 |
| 121 scoped_ptr<WebFileSystemImpl> web_file_system_; | 119 scoped_ptr<WebFileSystemImpl> web_file_system_; |
| 122 | 120 |
| 123 scoped_ptr<WebKit::WebBlobRegistry> blob_registry_; | 121 scoped_ptr<WebKit::WebBlobRegistry> blob_registry_; |
| 124 }; | 122 }; |
| 125 | 123 |
| 126 #endif // CONTENT_RENDERER_RENDERER_WEBKITPLATFORMSUPPORT_IMPL_H_ | 124 #endif // CONTENT_RENDERER_RENDERER_WEBKITPLATFORMSUPPORT_IMPL_H_ |
| OLD | NEW |