Chromium Code Reviews| 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 "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
| 9 #include "base/id_map.h" | 9 #include "base/id_map.h" |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| (...skipping 26 matching lines...) Expand all Loading... | |
| 37 | 37 |
| 38 namespace content { | 38 namespace content { |
| 39 class BatteryStatusDispatcher; | 39 class BatteryStatusDispatcher; |
| 40 class DeviceLightEventPump; | 40 class DeviceLightEventPump; |
| 41 class DeviceMotionEventPump; | 41 class DeviceMotionEventPump; |
| 42 class DeviceOrientationEventPump; | 42 class DeviceOrientationEventPump; |
| 43 class PlatformEventObserverBase; | 43 class PlatformEventObserverBase; |
| 44 class QuotaMessageFilter; | 44 class QuotaMessageFilter; |
| 45 class RendererClipboardClient; | 45 class RendererClipboardClient; |
| 46 class RenderView; | 46 class RenderView; |
| 47 class TaskQueueManager; | |
| 47 class ThreadSafeSender; | 48 class ThreadSafeSender; |
| 48 class WebClipboardImpl; | 49 class WebClipboardImpl; |
| 49 class WebDatabaseObserverImpl; | 50 class WebDatabaseObserverImpl; |
| 50 class WebFileSystemImpl; | 51 class WebFileSystemImpl; |
| 51 | 52 |
| 52 class CONTENT_EXPORT RendererBlinkPlatformImpl : public BlinkPlatformImpl { | 53 class CONTENT_EXPORT RendererBlinkPlatformImpl : public BlinkPlatformImpl { |
| 53 public: | 54 public: |
| 54 RendererBlinkPlatformImpl(); | 55 RendererBlinkPlatformImpl(); |
| 55 virtual ~RendererBlinkPlatformImpl(); | 56 virtual ~RendererBlinkPlatformImpl(); |
| 56 | 57 |
| 57 void set_plugin_refresh_allowed(bool plugin_refresh_allowed) { | 58 void set_plugin_refresh_allowed(bool plugin_refresh_allowed) { |
| 58 plugin_refresh_allowed_ = plugin_refresh_allowed; | 59 plugin_refresh_allowed_ = plugin_refresh_allowed; |
| 59 } | 60 } |
| 60 // Platform methods: | 61 // Platform methods: |
| 62 virtual void callOnMainThread(void (*func)(void*), void* context); | |
|
alexclarke
2014/10/13 10:06:22
Personally I'm OK with a naked function pointer, b
Sami
2014/10/13 18:16:21
This is an existing function that's called from Bl
| |
| 61 virtual blink::WebClipboard* clipboard(); | 63 virtual blink::WebClipboard* clipboard(); |
| 62 virtual blink::WebMimeRegistry* mimeRegistry(); | 64 virtual blink::WebMimeRegistry* mimeRegistry(); |
| 63 virtual blink::WebFileUtilities* fileUtilities(); | 65 virtual blink::WebFileUtilities* fileUtilities(); |
| 64 virtual blink::WebSandboxSupport* sandboxSupport(); | 66 virtual blink::WebSandboxSupport* sandboxSupport(); |
| 65 virtual blink::WebCookieJar* cookieJar(); | 67 virtual blink::WebCookieJar* cookieJar(); |
| 66 virtual blink::WebThemeEngine* themeEngine(); | 68 virtual blink::WebThemeEngine* themeEngine(); |
| 67 virtual blink::WebSpeechSynthesizer* createSpeechSynthesizer( | 69 virtual blink::WebSpeechSynthesizer* createSpeechSynthesizer( |
| 68 blink::WebSpeechSynthesizerClient* client); | 70 blink::WebSpeechSynthesizerClient* client); |
| 69 virtual bool sandboxEnabled(); | 71 virtual bool sandboxEnabled(); |
| 70 virtual unsigned long long visitedLinkHash( | 72 virtual unsigned long long visitedLinkHash( |
| (...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 174 const blink::WebDeviceOrientationData& data); | 176 const blink::WebDeviceOrientationData& data); |
| 175 | 177 |
| 176 // Notifies blink::WebBatteryStatusListener that battery status has changed. | 178 // Notifies blink::WebBatteryStatusListener that battery status has changed. |
| 177 void MockBatteryStatusChangedForTesting( | 179 void MockBatteryStatusChangedForTesting( |
| 178 const blink::WebBatteryStatus& status); | 180 const blink::WebBatteryStatus& status); |
| 179 | 181 |
| 180 WebDatabaseObserverImpl* web_database_observer_impl() { | 182 WebDatabaseObserverImpl* web_database_observer_impl() { |
| 181 return web_database_observer_impl_.get(); | 183 return web_database_observer_impl_.get(); |
| 182 } | 184 } |
| 183 | 185 |
| 186 TaskQueueManager* task_queue_manager() { return task_queue_manager_.get(); } | |
| 187 | |
| 184 private: | 188 private: |
| 185 bool CheckPreparsedJsCachingEnabled() const; | 189 bool CheckPreparsedJsCachingEnabled() const; |
| 186 | 190 |
| 187 // Factory that takes a type and return PlatformEventObserverBase that matches | 191 // Factory that takes a type and return PlatformEventObserverBase that matches |
| 188 // it. | 192 // it. |
| 189 static PlatformEventObserverBase* CreatePlatformEventObserverFromType( | 193 static PlatformEventObserverBase* CreatePlatformEventObserverFromType( |
| 190 blink::WebPlatformEventType type); | 194 blink::WebPlatformEventType type); |
| 191 | 195 |
| 192 // Use the data previously set via SetMockDevice...DataForTesting() and send | 196 // Use the data previously set via SetMockDevice...DataForTesting() and send |
| 193 // them to the registered listener. | 197 // them to the registered listener. |
| 194 void SendFakeDeviceEventDataForTesting(blink::WebPlatformEventType type); | 198 void SendFakeDeviceEventDataForTesting(blink::WebPlatformEventType type); |
| 195 | 199 |
| 200 scoped_ptr<TaskQueueManager> task_queue_manager_; | |
| 201 | |
| 196 scoped_ptr<RendererClipboardClient> clipboard_client_; | 202 scoped_ptr<RendererClipboardClient> clipboard_client_; |
| 197 scoped_ptr<WebClipboardImpl> clipboard_; | 203 scoped_ptr<WebClipboardImpl> clipboard_; |
| 198 | 204 |
| 199 class FileUtilities; | 205 class FileUtilities; |
| 200 scoped_ptr<FileUtilities> file_utilities_; | 206 scoped_ptr<FileUtilities> file_utilities_; |
| 201 | 207 |
| 202 class MimeRegistry; | 208 class MimeRegistry; |
| 203 scoped_ptr<MimeRegistry> mime_registry_; | 209 scoped_ptr<MimeRegistry> mime_registry_; |
| 204 | 210 |
| 205 class SandboxSupport; | 211 class SandboxSupport; |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 238 scoped_ptr<BatteryStatusDispatcher> battery_status_dispatcher_; | 244 scoped_ptr<BatteryStatusDispatcher> battery_status_dispatcher_; |
| 239 | 245 |
| 240 IDMap<PlatformEventObserverBase, IDMapOwnPointer> platform_event_observers_; | 246 IDMap<PlatformEventObserverBase, IDMapOwnPointer> platform_event_observers_; |
| 241 | 247 |
| 242 DISALLOW_COPY_AND_ASSIGN(RendererBlinkPlatformImpl); | 248 DISALLOW_COPY_AND_ASSIGN(RendererBlinkPlatformImpl); |
| 243 }; | 249 }; |
| 244 | 250 |
| 245 } // namespace content | 251 } // namespace content |
| 246 | 252 |
| 247 #endif // CONTENT_RENDERER_RENDERER_BLINK_PLATFORM_IMPL_H_ | 253 #endif // CONTENT_RENDERER_RENDERER_BLINK_PLATFORM_IMPL_H_ |
| OLD | NEW |