| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 | 7 |
| 8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
| 9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
| 10 #include "base/platform_file.h" | 10 #include "base/platform_file.h" |
| (...skipping 16 matching lines...) Expand all Loading... |
| 27 class CONTENT_EXPORT RendererWebKitPlatformSupportImpl | 27 class CONTENT_EXPORT RendererWebKitPlatformSupportImpl |
| 28 : public WebKitPlatformSupportImpl { | 28 : public WebKitPlatformSupportImpl { |
| 29 public: | 29 public: |
| 30 RendererWebKitPlatformSupportImpl(); | 30 RendererWebKitPlatformSupportImpl(); |
| 31 virtual ~RendererWebKitPlatformSupportImpl(); | 31 virtual ~RendererWebKitPlatformSupportImpl(); |
| 32 | 32 |
| 33 void set_plugin_refresh_allowed(bool plugin_refresh_allowed) { | 33 void set_plugin_refresh_allowed(bool plugin_refresh_allowed) { |
| 34 plugin_refresh_allowed_ = plugin_refresh_allowed; | 34 plugin_refresh_allowed_ = plugin_refresh_allowed; |
| 35 } | 35 } |
| 36 // WebKitPlatformSupport methods: | 36 // WebKitPlatformSupport methods: |
| 37 virtual WebKit::WebClipboard* clipboard() OVERRIDE; | 37 virtual WebKit::WebClipboard* clipboard(); |
| 38 virtual WebKit::WebMimeRegistry* mimeRegistry() OVERRIDE; | 38 virtual WebKit::WebMimeRegistry* mimeRegistry(); |
| 39 virtual WebKit::WebFileUtilities* fileUtilities() OVERRIDE; | 39 virtual WebKit::WebFileUtilities* fileUtilities(); |
| 40 virtual WebKit::WebSandboxSupport* sandboxSupport() OVERRIDE; | 40 virtual WebKit::WebSandboxSupport* sandboxSupport(); |
| 41 virtual WebKit::WebCookieJar* cookieJar() OVERRIDE; | 41 virtual WebKit::WebCookieJar* cookieJar(); |
| 42 virtual bool sandboxEnabled() OVERRIDE; | 42 virtual bool sandboxEnabled(); |
| 43 virtual unsigned long long visitedLinkHash( | 43 virtual unsigned long long visitedLinkHash( |
| 44 const char* canonicalURL, size_t length) OVERRIDE; | 44 const char* canonicalURL, size_t length); |
| 45 virtual bool isLinkVisited(unsigned long long linkHash) OVERRIDE; | 45 virtual bool isLinkVisited(unsigned long long linkHash); |
| 46 virtual WebKit::WebMessagePortChannel* createMessagePortChannel() OVERRIDE; | 46 virtual WebKit::WebMessagePortChannel* createMessagePortChannel(); |
| 47 virtual void prefetchHostName(const WebKit::WebString&) OVERRIDE; | 47 virtual void prefetchHostName(const WebKit::WebString&); |
| 48 virtual void cacheMetadata( | 48 virtual void cacheMetadata( |
| 49 const WebKit::WebURL&, double, const char*, size_t) OVERRIDE; | 49 const WebKit::WebURL&, double, const char*, size_t); |
| 50 virtual WebKit::WebString defaultLocale() OVERRIDE; | 50 virtual WebKit::WebString defaultLocale(); |
| 51 virtual void suddenTerminationChanged(bool enabled) OVERRIDE; | 51 virtual void suddenTerminationChanged(bool enabled); |
| 52 virtual WebKit::WebStorageNamespace* createLocalStorageNamespace( | 52 virtual WebKit::WebStorageNamespace* createLocalStorageNamespace( |
| 53 const WebKit::WebString& path, unsigned quota) OVERRIDE; | 53 const WebKit::WebString& path, unsigned quota); |
| 54 virtual WebKit::WebKitPlatformSupport::FileHandle databaseOpenFile( | 54 virtual WebKit::WebKitPlatformSupport::FileHandle databaseOpenFile( |
| 55 const WebKit::WebString& vfs_file_name, int desired_flags) OVERRIDE; | 55 const WebKit::WebString& vfs_file_name, int desired_flags); |
| 56 virtual int databaseDeleteFile(const WebKit::WebString& vfs_file_name, | 56 virtual int databaseDeleteFile(const WebKit::WebString& vfs_file_name, |
| 57 bool sync_dir) OVERRIDE; | 57 bool sync_dir); |
| 58 virtual long databaseGetFileAttributes( | 58 virtual long databaseGetFileAttributes( |
| 59 const WebKit::WebString& vfs_file_name) OVERRIDE; | 59 const WebKit::WebString& vfs_file_name); |
| 60 virtual long long databaseGetFileSize( | 60 virtual long long databaseGetFileSize( |
| 61 const WebKit::WebString& vfs_file_name) OVERRIDE; | 61 const WebKit::WebString& vfs_file_name); |
| 62 virtual long long databaseGetSpaceAvailableForOrigin( | 62 virtual long long databaseGetSpaceAvailableForOrigin( |
| 63 const WebKit::WebString& origin_identifier) OVERRIDE; | 63 const WebKit::WebString& origin_identifier); |
| 64 virtual WebKit::WebString signedPublicKeyAndChallengeString( | 64 virtual WebKit::WebString signedPublicKeyAndChallengeString( |
| 65 unsigned key_size_index, | 65 unsigned key_size_index, |
| 66 const WebKit::WebString& challenge, | 66 const WebKit::WebString& challenge, |
| 67 const WebKit::WebURL& url) OVERRIDE; | 67 const WebKit::WebURL& url); |
| 68 virtual void screenColorProfile(WebKit::WebVector<char>* to_profile) OVERRIDE; | 68 virtual void screenColorProfile(WebKit::WebVector<char>* to_profile); |
| 69 virtual WebKit::WebIDBFactory* idbFactory() OVERRIDE; | 69 virtual WebKit::WebIDBFactory* idbFactory(); |
| 70 virtual WebKit::WebFileSystem* fileSystem() OVERRIDE; | 70 virtual WebKit::WebFileSystem* fileSystem(); |
| 71 virtual WebKit::WebSharedWorkerRepository* sharedWorkerRepository() OVERRIDE; | 71 virtual WebKit::WebSharedWorkerRepository* sharedWorkerRepository(); |
| 72 virtual bool canAccelerate2dCanvas(); | 72 virtual bool canAccelerate2dCanvas(); |
| 73 virtual double audioHardwareSampleRate() OVERRIDE; | 73 virtual double audioHardwareSampleRate(); |
| 74 virtual size_t audioHardwareBufferSize() OVERRIDE; | 74 virtual size_t audioHardwareBufferSize(); |
| 75 virtual WebKit::WebAudioDevice* createAudioDevice( | 75 virtual WebKit::WebAudioDevice* createAudioDevice( |
| 76 size_t buffer_size, unsigned channels, double sample_rate, | 76 size_t buffer_size, unsigned channels, double sample_rate, |
| 77 WebKit::WebAudioDevice::RenderCallback* callback) OVERRIDE; | 77 WebKit::WebAudioDevice::RenderCallback* callback); |
| 78 virtual WebKit::WebBlobRegistry* blobRegistry() OVERRIDE; | 78 virtual WebKit::WebBlobRegistry* blobRegistry(); |
| 79 virtual void sampleGamepads(WebKit::WebGamepads&) OVERRIDE; | 79 virtual void sampleGamepads(WebKit::WebGamepads&); |
| 80 virtual WebKit::WebString userAgent(const WebKit::WebURL& url) OVERRIDE; | 80 virtual WebKit::WebString userAgent(const WebKit::WebURL& url); |
| 81 virtual void GetPlugins(bool refresh, | 81 virtual void GetPlugins(bool refresh, |
| 82 std::vector<webkit::WebPluginInfo>* plugins) OVERRIDE; | 82 std::vector<webkit::WebPluginInfo>* plugins) OVERRIDE; |
| 83 virtual WebKit::WebRTCPeerConnectionHandler* createRTCPeerConnectionHandler( | 83 virtual WebKit::WebRTCPeerConnectionHandler* createRTCPeerConnectionHandler( |
| 84 WebKit::WebRTCPeerConnectionHandlerClient* client) OVERRIDE; | 84 WebKit::WebRTCPeerConnectionHandlerClient* client); |
| 85 virtual WebKit::WebMediaStreamCenter* createMediaStreamCenter( | 85 virtual WebKit::WebMediaStreamCenter* createMediaStreamCenter( |
| 86 WebKit::WebMediaStreamCenterClient* client) OVERRIDE; | 86 WebKit::WebMediaStreamCenterClient* client); |
| 87 virtual bool canHyphenate(const WebKit::WebString& locale) OVERRIDE; | 87 virtual bool canHyphenate(const WebKit::WebString& locale); |
| 88 virtual size_t computeLastHyphenLocation(const char16* characters, | 88 virtual size_t computeLastHyphenLocation(const char16* characters, |
| 89 size_t length, | 89 size_t length, |
| 90 size_t before_index, | 90 size_t before_index, |
| 91 const WebKit::WebString& locale) OVERRIDE; | 91 const WebKit::WebString& locale); |
| 92 | 92 |
| 93 // Disables the WebSandboxSupport implementation for testing. | 93 // Disables the WebSandboxSupport implementation for testing. |
| 94 // Tests that do not set up a full sandbox environment should call | 94 // Tests that do not set up a full sandbox environment should call |
| 95 // SetSandboxEnabledForTesting(false) _before_ creating any instances | 95 // SetSandboxEnabledForTesting(false) _before_ creating any instances |
| 96 // of this class, to ensure that we don't attempt to use sandbox-related | 96 // of this class, to ensure that we don't attempt to use sandbox-related |
| 97 // file descriptors or other resources. | 97 // file descriptors or other resources. |
| 98 // | 98 // |
| 99 // Returns the previous |enable| value. | 99 // Returns the previous |enable| value. |
| 100 static bool SetSandboxEnabledForTesting(bool enable); | 100 static bool SetSandboxEnabledForTesting(bool enable); |
| 101 | 101 |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 140 scoped_ptr<WebKit::WebBlobRegistry> blob_registry_; | 140 scoped_ptr<WebKit::WebBlobRegistry> blob_registry_; |
| 141 | 141 |
| 142 scoped_ptr<GamepadSharedMemoryReader> gamepad_shared_memory_reader_; | 142 scoped_ptr<GamepadSharedMemoryReader> gamepad_shared_memory_reader_; |
| 143 | 143 |
| 144 scoped_ptr<content::Hyphenator> hyphenator_; | 144 scoped_ptr<content::Hyphenator> hyphenator_; |
| 145 }; | 145 }; |
| 146 | 146 |
| 147 } // namespace content | 147 } // namespace content |
| 148 | 148 |
| 149 #endif // CONTENT_RENDERER_RENDERER_WEBKITPLATFORMSUPPORT_IMPL_H_ | 149 #endif // CONTENT_RENDERER_RENDERER_WEBKITPLATFORMSUPPORT_IMPL_H_ |
| OLD | NEW |