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 ContentWebKitPlatformSupportImpl { |
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 | 54 |
55 virtual WebKit::WebKitPlatformSupport::FileHandle databaseOpenFile( | 55 virtual WebKit::WebKitPlatformSupport::FileHandle databaseOpenFile( |
56 const WebKit::WebString& vfs_file_name, int desired_flags); | 56 const WebKit::WebString& vfs_file_name, int desired_flags) OVERRIDE; |
57 virtual int databaseDeleteFile(const WebKit::WebString& vfs_file_name, | 57 virtual int databaseDeleteFile(const WebKit::WebString& vfs_file_name, |
58 bool sync_dir); | 58 bool sync_dir) OVERRIDE; |
59 virtual long databaseGetFileAttributes( | 59 virtual long databaseGetFileAttributes( |
60 const WebKit::WebString& vfs_file_name); | 60 const WebKit::WebString& vfs_file_name) OVERRIDE; |
61 virtual long long databaseGetFileSize( | 61 virtual long long databaseGetFileSize( |
62 const WebKit::WebString& vfs_file_name); | 62 const WebKit::WebString& vfs_file_name) OVERRIDE; |
63 virtual long long databaseGetSpaceAvailableForOrigin( | 63 virtual long long databaseGetSpaceAvailableForOrigin( |
64 const WebKit::WebString& origin_identifier); | 64 const WebKit::WebString& origin_identifier) OVERRIDE; |
65 virtual WebKit::WebString signedPublicKeyAndChallengeString( | 65 virtual WebKit::WebString signedPublicKeyAndChallengeString( |
66 unsigned key_size_index, | 66 unsigned key_size_index, |
67 const WebKit::WebString& challenge, | 67 const WebKit::WebString& challenge, |
68 const WebKit::WebURL& url); | 68 const WebKit::WebURL& url) OVERRIDE; |
69 virtual WebKit::WebIDBFactory* idbFactory(); | 69 virtual WebKit::WebIDBFactory* idbFactory() OVERRIDE; |
70 virtual void createIDBKeysFromSerializedValuesAndKeyPath( | 70 virtual void createIDBKeysFromSerializedValuesAndKeyPath( |
71 const WebKit::WebVector<WebKit::WebSerializedScriptValue>& values, | 71 const WebKit::WebVector<WebKit::WebSerializedScriptValue>& values, |
72 const WebKit::WebString& keyPath, | 72 const WebKit::WebString& keyPath, |
73 WebKit::WebVector<WebKit::WebIDBKey>& keys); | 73 WebKit::WebVector<WebKit::WebIDBKey>& keys) OVERRIDE; |
74 virtual WebKit::WebSerializedScriptValue injectIDBKeyIntoSerializedValue( | 74 virtual WebKit::WebSerializedScriptValue injectIDBKeyIntoSerializedValue( |
75 const WebKit::WebIDBKey& key, | 75 const WebKit::WebIDBKey& key, |
76 const WebKit::WebSerializedScriptValue& value, | 76 const WebKit::WebSerializedScriptValue& value, |
77 const WebKit::WebString& keyPath); | 77 const WebKit::WebString& keyPath) OVERRIDE; |
78 virtual WebKit::WebFileSystem* fileSystem(); | 78 virtual WebKit::WebFileSystem* fileSystem() OVERRIDE; |
79 | 79 |
80 virtual WebKit::WebSharedWorkerRepository* sharedWorkerRepository(); | 80 virtual WebKit::WebSharedWorkerRepository* sharedWorkerRepository() OVERRIDE; |
81 virtual WebKit::WebGraphicsContext3D* createGraphicsContext3D(); | 81 virtual WebKit::WebGraphicsContext3D* createGraphicsContext3D() OVERRIDE; |
82 virtual double audioHardwareSampleRate(); | 82 virtual double audioHardwareSampleRate() OVERRIDE; |
83 virtual size_t audioHardwareBufferSize(); | 83 virtual size_t audioHardwareBufferSize() OVERRIDE; |
84 virtual WebKit::WebAudioDevice* createAudioDevice( | 84 virtual WebKit::WebAudioDevice* createAudioDevice( |
85 size_t buffer_size, unsigned channels, double sample_rate, | 85 size_t buffer_size, unsigned channels, double sample_rate, |
86 WebKit::WebAudioDevice::RenderCallback* callback); | 86 WebKit::WebAudioDevice::RenderCallback* callback) OVERRIDE; |
87 | 87 |
88 virtual WebKit::WebBlobRegistry* blobRegistry(); | 88 virtual WebKit::WebBlobRegistry* blobRegistry() OVERRIDE; |
89 | 89 |
90 virtual WebKit::WebString userAgent(const WebKit::WebURL& url); | 90 virtual WebKit::WebString userAgent(const WebKit::WebURL& url) OVERRIDE; |
91 | |
92 virtual void GetPlugins(bool refresh, | |
jam
2011/11/19 23:13:46
nit: here and above (not your fault), please remov
piman
2011/11/21 22:05:04
Done.
| |
93 std::vector<webkit::WebPluginInfo>* plugins) OVERRIDE; | |
91 | 94 |
92 private: | 95 private: |
93 bool CheckPreparsedJsCachingEnabled() const; | 96 bool CheckPreparsedJsCachingEnabled() const; |
94 | 97 |
95 // Helper function to send synchronous message from any thread. | 98 // Helper function to send synchronous message from any thread. |
96 static bool SendSyncMessageFromAnyThread(IPC::SyncMessage* msg); | 99 static bool SendSyncMessageFromAnyThread(IPC::SyncMessage* msg); |
97 | 100 |
98 scoped_ptr<webkit_glue::WebClipboardImpl> clipboard_; | 101 scoped_ptr<webkit_glue::WebClipboardImpl> clipboard_; |
99 | 102 |
100 class FileUtilities; | 103 class FileUtilities; |
(...skipping 16 matching lines...) Expand all Loading... | |
117 scoped_ptr<WebSharedWorkerRepositoryImpl> shared_worker_repository_; | 120 scoped_ptr<WebSharedWorkerRepositoryImpl> shared_worker_repository_; |
118 | 121 |
119 scoped_ptr<WebKit::WebIDBFactory> web_idb_factory_; | 122 scoped_ptr<WebKit::WebIDBFactory> web_idb_factory_; |
120 | 123 |
121 scoped_ptr<WebFileSystemImpl> web_file_system_; | 124 scoped_ptr<WebFileSystemImpl> web_file_system_; |
122 | 125 |
123 scoped_ptr<WebKit::WebBlobRegistry> blob_registry_; | 126 scoped_ptr<WebKit::WebBlobRegistry> blob_registry_; |
124 }; | 127 }; |
125 | 128 |
126 #endif // CONTENT_RENDERER_RENDERER_WEBKITPLATFORMSUPPORT_IMPL_H_ | 129 #endif // CONTENT_RENDERER_RENDERER_WEBKITPLATFORMSUPPORT_IMPL_H_ |
OLD | NEW |