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