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_BLINK_PLATFORM_IMPL_H_ | 5 #ifndef CONTENT_RENDERER_RENDERER_BLINK_PLATFORM_IMPL_H_ |
6 #define CONTENT_RENDERER_RENDERER_BLINK_PLATFORM_IMPL_H_ | 6 #define CONTENT_RENDERER_RENDERER_BLINK_PLATFORM_IMPL_H_ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 #include <stdint.h> | 9 #include <stdint.h> |
10 | 10 |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
74 | 74 |
75 void set_plugin_refresh_allowed(bool plugin_refresh_allowed) { | 75 void set_plugin_refresh_allowed(bool plugin_refresh_allowed) { |
76 plugin_refresh_allowed_ = plugin_refresh_allowed; | 76 plugin_refresh_allowed_ = plugin_refresh_allowed; |
77 } | 77 } |
78 // Platform methods: | 78 // Platform methods: |
79 blink::WebClipboard* Clipboard() override; | 79 blink::WebClipboard* Clipboard() override; |
80 blink::WebFileUtilities* GetFileUtilities() override; | 80 blink::WebFileUtilities* GetFileUtilities() override; |
81 blink::WebSandboxSupport* GetSandboxSupport() override; | 81 blink::WebSandboxSupport* GetSandboxSupport() override; |
82 blink::WebCookieJar* CookieJar() override; | 82 blink::WebCookieJar* CookieJar() override; |
83 blink::WebThemeEngine* ThemeEngine() override; | 83 blink::WebThemeEngine* ThemeEngine() override; |
84 std::unique_ptr<blink::WebSpeechSynthesizer> CreateSpeechSynthesizer( | 84 blink::WebSpeechSynthesizer* CreateSpeechSynthesizer( |
85 blink::WebSpeechSynthesizerClient* client) override; | 85 blink::WebSpeechSynthesizerClient* client) override; |
86 virtual bool sandboxEnabled(); | 86 virtual bool sandboxEnabled(); |
87 unsigned long long VisitedLinkHash(const char* canonicalURL, | 87 unsigned long long VisitedLinkHash(const char* canonicalURL, |
88 size_t length) override; | 88 size_t length) override; |
89 bool IsLinkVisited(unsigned long long linkHash) override; | 89 bool IsLinkVisited(unsigned long long linkHash) override; |
90 void CreateMessageChannel( | 90 void CreateMessageChannel( |
91 std::unique_ptr<blink::WebMessagePortChannel>* channel1, | 91 std::unique_ptr<blink::WebMessagePortChannel>* channel1, |
92 std::unique_ptr<blink::WebMessagePortChannel>* channel2) override; | 92 std::unique_ptr<blink::WebMessagePortChannel>* channel2) override; |
93 blink::WebPrescientNetworking* PrescientNetworking() override; | 93 blink::WebPrescientNetworking* PrescientNetworking() override; |
94 void CacheMetadata(const blink::WebURL&, | 94 void CacheMetadata(const blink::WebURL&, |
95 int64_t, | 95 int64_t, |
96 const char*, | 96 const char*, |
97 size_t) override; | 97 size_t) override; |
98 void CacheMetadataInCacheStorage( | 98 void CacheMetadataInCacheStorage( |
99 const blink::WebURL&, | 99 const blink::WebURL&, |
100 int64_t, | 100 int64_t, |
101 const char*, | 101 const char*, |
102 size_t, | 102 size_t, |
103 const blink::WebSecurityOrigin& cacheStorageOrigin, | 103 const blink::WebSecurityOrigin& cacheStorageOrigin, |
104 const blink::WebString& cacheStorageCacheName) override; | 104 const blink::WebString& cacheStorageCacheName) override; |
105 blink::WebString DefaultLocale() override; | 105 blink::WebString DefaultLocale() override; |
106 void SuddenTerminationChanged(bool enabled) override; | 106 void SuddenTerminationChanged(bool enabled) override; |
107 std::unique_ptr<blink::WebStorageNamespace> CreateLocalStorageNamespace() | 107 blink::WebStorageNamespace* CreateLocalStorageNamespace() override; |
108 override; | |
109 blink::Platform::FileHandle DatabaseOpenFile( | 108 blink::Platform::FileHandle DatabaseOpenFile( |
110 const blink::WebString& vfs_file_name, | 109 const blink::WebString& vfs_file_name, |
111 int desired_flags) override; | 110 int desired_flags) override; |
112 int DatabaseDeleteFile(const blink::WebString& vfs_file_name, | 111 int DatabaseDeleteFile(const blink::WebString& vfs_file_name, |
113 bool sync_dir) override; | 112 bool sync_dir) override; |
114 long DatabaseGetFileAttributes( | 113 long DatabaseGetFileAttributes( |
115 const blink::WebString& vfs_file_name) override; | 114 const blink::WebString& vfs_file_name) override; |
116 long long DatabaseGetFileSize(const blink::WebString& vfs_file_name) override; | 115 long long DatabaseGetFileSize(const blink::WebString& vfs_file_name) override; |
117 long long DatabaseGetSpaceAvailableForOrigin( | 116 long long DatabaseGetSpaceAvailableForOrigin( |
118 const blink::WebSecurityOrigin& origin) override; | 117 const blink::WebSecurityOrigin& origin) override; |
119 bool DatabaseSetFileSize(const blink::WebString& vfs_file_name, | 118 bool DatabaseSetFileSize(const blink::WebString& vfs_file_name, |
120 long long size) override; | 119 long long size) override; |
121 blink::WebString DatabaseCreateOriginIdentifier( | 120 blink::WebString DatabaseCreateOriginIdentifier( |
122 const blink::WebSecurityOrigin& origin) override; | 121 const blink::WebSecurityOrigin& origin) override; |
123 cc::FrameSinkId GenerateFrameSinkId() override; | 122 cc::FrameSinkId GenerateFrameSinkId() override; |
124 | 123 |
125 void GetPluginList(bool refresh, | 124 void GetPluginList(bool refresh, |
126 const blink::WebSecurityOrigin& mainFrameOrigin, | 125 const blink::WebSecurityOrigin& mainFrameOrigin, |
127 blink::WebPluginListBuilder* builder) override; | 126 blink::WebPluginListBuilder* builder) override; |
128 blink::WebPublicSuffixList* PublicSuffixList() override; | 127 blink::WebPublicSuffixList* PublicSuffixList() override; |
129 blink::WebScrollbarBehavior* ScrollbarBehavior() override; | 128 blink::WebScrollbarBehavior* ScrollbarBehavior() override; |
130 blink::WebIDBFactory* IdbFactory() override; | 129 blink::WebIDBFactory* IdbFactory() override; |
131 std::unique_ptr<blink::WebServiceWorkerCacheStorage> CreateCacheStorage( | 130 blink::WebServiceWorkerCacheStorage* CacheStorage( |
132 const blink::WebSecurityOrigin& security_origin) override; | 131 const blink::WebSecurityOrigin& security_origin) override; |
133 blink::WebFileSystem* FileSystem() override; | 132 blink::WebFileSystem* FileSystem() override; |
134 blink::WebString FileSystemCreateOriginIdentifier( | 133 blink::WebString FileSystemCreateOriginIdentifier( |
135 const blink::WebSecurityOrigin& origin) override; | 134 const blink::WebSecurityOrigin& origin) override; |
136 | 135 |
137 bool IsThreadedCompositingEnabled() override; | 136 bool IsThreadedCompositingEnabled() override; |
138 bool IsThreadedAnimationEnabled() override; | 137 bool IsThreadedAnimationEnabled() override; |
139 bool IsGPUCompositingEnabled() override; | 138 bool IsGPUCompositingEnabled() override; |
140 double AudioHardwareSampleRate() override; | 139 double AudioHardwareSampleRate() override; |
141 size_t AudioHardwareBufferSize() override; | 140 size_t AudioHardwareBufferSize() override; |
142 unsigned AudioHardwareOutputChannels() override; | 141 unsigned AudioHardwareOutputChannels() override; |
143 blink::WebDatabaseObserver* DatabaseObserver() override; | 142 blink::WebDatabaseObserver* DatabaseObserver() override; |
144 | 143 |
145 std::unique_ptr<blink::WebAudioDevice> CreateAudioDevice( | 144 blink::WebAudioDevice* CreateAudioDevice( |
146 unsigned input_channels, | 145 unsigned input_channels, |
147 unsigned channels, | 146 unsigned channels, |
148 const blink::WebAudioLatencyHint& latency_hint, | 147 const blink::WebAudioLatencyHint& latency_hint, |
149 blink::WebAudioDevice::RenderCallback* callback, | 148 blink::WebAudioDevice::RenderCallback* callback, |
150 const blink::WebString& input_device_id, | 149 const blink::WebString& input_device_id, |
151 const blink::WebSecurityOrigin& security_origin) override; | 150 const blink::WebSecurityOrigin& security_origin) override; |
152 | 151 |
153 bool LoadAudioResource(blink::WebAudioBus* destination_bus, | 152 bool LoadAudioResource(blink::WebAudioBus* destination_bus, |
154 const char* audio_file_data, | 153 const char* audio_file_data, |
155 size_t data_size) override; | 154 size_t data_size) override; |
156 | 155 |
157 std::unique_ptr<blink::WebMIDIAccessor> CreateMIDIAccessor( | 156 blink::WebMIDIAccessor* CreateMIDIAccessor( |
158 blink::WebMIDIAccessorClient* client) override; | 157 blink::WebMIDIAccessorClient* client) override; |
159 | 158 |
160 blink::WebBlobRegistry* GetBlobRegistry() override; | 159 blink::WebBlobRegistry* GetBlobRegistry() override; |
161 void SampleGamepads(device::Gamepads&) override; | 160 void SampleGamepads(device::Gamepads&) override; |
162 std::unique_ptr<blink::WebRTCPeerConnectionHandler> | 161 blink::WebRTCPeerConnectionHandler* CreateRTCPeerConnectionHandler( |
163 CreateRTCPeerConnectionHandler( | |
164 blink::WebRTCPeerConnectionHandlerClient* client) override; | 162 blink::WebRTCPeerConnectionHandlerClient* client) override; |
165 std::unique_ptr<blink::WebRTCCertificateGenerator> | 163 blink::WebRTCCertificateGenerator* CreateRTCCertificateGenerator() override; |
166 CreateRTCCertificateGenerator() override; | 164 blink::WebMediaRecorderHandler* CreateMediaRecorderHandler() override; |
167 std::unique_ptr<blink::WebMediaRecorderHandler> CreateMediaRecorderHandler() | 165 blink::WebMediaStreamCenter* CreateMediaStreamCenter( |
168 override; | |
169 std::unique_ptr<blink::WebMediaStreamCenter> CreateMediaStreamCenter( | |
170 blink::WebMediaStreamCenterClient* client) override; | 166 blink::WebMediaStreamCenterClient* client) override; |
171 std::unique_ptr<blink::WebCanvasCaptureHandler> CreateCanvasCaptureHandler( | 167 blink::WebCanvasCaptureHandler* CreateCanvasCaptureHandler( |
172 const blink::WebSize& size, | 168 const blink::WebSize& size, |
173 double frame_rate, | 169 double frame_rate, |
174 blink::WebMediaStreamTrack* track) override; | 170 blink::WebMediaStreamTrack* track) override; |
175 void CreateHTMLVideoElementCapturer( | 171 void CreateHTMLVideoElementCapturer( |
176 blink::WebMediaStream* web_media_stream, | 172 blink::WebMediaStream* web_media_stream, |
177 blink::WebMediaPlayer* web_media_player) override; | 173 blink::WebMediaPlayer* web_media_player) override; |
178 void CreateHTMLAudioElementCapturer( | 174 void CreateHTMLAudioElementCapturer( |
179 blink::WebMediaStream* web_media_stream, | 175 blink::WebMediaStream* web_media_stream, |
180 blink::WebMediaPlayer* web_media_player) override; | 176 blink::WebMediaPlayer* web_media_player) override; |
181 std::unique_ptr<blink::WebImageCaptureFrameGrabber> | 177 blink::WebImageCaptureFrameGrabber* CreateImageCaptureFrameGrabber() override; |
182 CreateImageCaptureFrameGrabber() override; | 178 blink::WebGraphicsContext3DProvider* CreateOffscreenGraphicsContext3DProvider( |
183 std::unique_ptr<blink::WebGraphicsContext3DProvider> | |
184 CreateOffscreenGraphicsContext3DProvider( | |
185 const blink::Platform::ContextAttributes& attributes, | 179 const blink::Platform::ContextAttributes& attributes, |
186 const blink::WebURL& top_document_web_url, | 180 const blink::WebURL& top_document_web_url, |
187 blink::WebGraphicsContext3DProvider* share_provider, | 181 blink::WebGraphicsContext3DProvider* share_provider, |
188 blink::Platform::GraphicsInfo* gl_info) override; | 182 blink::Platform::GraphicsInfo* gl_info) override; |
189 std::unique_ptr<blink::WebGraphicsContext3DProvider> | 183 blink::WebGraphicsContext3DProvider* |
190 CreateSharedOffscreenGraphicsContext3DProvider() override; | 184 CreateSharedOffscreenGraphicsContext3DProvider() override; |
191 gpu::GpuMemoryBufferManager* GetGpuMemoryBufferManager() override; | 185 gpu::GpuMemoryBufferManager* GetGpuMemoryBufferManager() override; |
192 std::unique_ptr<cc::SharedBitmap> AllocateSharedBitmap( | 186 std::unique_ptr<cc::SharedBitmap> AllocateSharedBitmap( |
193 const blink::WebSize& size) override; | 187 const blink::WebSize& size) override; |
194 blink::WebCompositorSupport* CompositorSupport() override; | 188 blink::WebCompositorSupport* CompositorSupport() override; |
195 blink::WebString ConvertIDNToUnicode(const blink::WebString& host) override; | 189 blink::WebString ConvertIDNToUnicode(const blink::WebString& host) override; |
196 service_manager::Connector* GetConnector() override; | 190 service_manager::Connector* GetConnector() override; |
197 blink::InterfaceProvider* GetInterfaceProvider() override; | 191 blink::InterfaceProvider* GetInterfaceProvider() override; |
198 void StartListening(blink::WebPlatformEventType, | 192 void StartListening(blink::WebPlatformEventType, |
199 blink::WebPlatformEventListener*) override; | 193 blink::WebPlatformEventListener*) override; |
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
313 | 307 |
314 // Only used when network service is enabled. | 308 // Only used when network service is enabled. |
315 mojom::URLLoaderFactoryPtr network_service_url_loader_factory_; | 309 mojom::URLLoaderFactoryPtr network_service_url_loader_factory_; |
316 | 310 |
317 DISALLOW_COPY_AND_ASSIGN(RendererBlinkPlatformImpl); | 311 DISALLOW_COPY_AND_ASSIGN(RendererBlinkPlatformImpl); |
318 }; | 312 }; |
319 | 313 |
320 } // namespace content | 314 } // namespace content |
321 | 315 |
322 #endif // CONTENT_RENDERER_RENDERER_BLINK_PLATFORM_IMPL_H_ | 316 #endif // CONTENT_RENDERER_RENDERER_BLINK_PLATFORM_IMPL_H_ |
OLD | NEW |