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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
43 class DeviceOrientationEventPump; | 43 class DeviceOrientationEventPump; |
44 class PlatformEventObserverBase; | 44 class PlatformEventObserverBase; |
45 class QuotaMessageFilter; | 45 class QuotaMessageFilter; |
46 class RendererClipboardDelegate; | 46 class RendererClipboardDelegate; |
47 class RendererScheduler; | 47 class RendererScheduler; |
48 class RenderView; | 48 class RenderView; |
49 class ThreadSafeSender; | 49 class ThreadSafeSender; |
50 class WebClipboardImpl; | 50 class WebClipboardImpl; |
51 class WebDatabaseObserverImpl; | 51 class WebDatabaseObserverImpl; |
52 class WebFileSystemImpl; | 52 class WebFileSystemImpl; |
| 53 class WebThreadImplForScheduler; |
53 class WebSchedulerImpl; | 54 class WebSchedulerImpl; |
54 | 55 |
55 class CONTENT_EXPORT RendererBlinkPlatformImpl : public BlinkPlatformImpl { | 56 class CONTENT_EXPORT RendererBlinkPlatformImpl : public BlinkPlatformImpl { |
56 public: | 57 public: |
57 explicit RendererBlinkPlatformImpl(RendererScheduler* renderer_scheduler); | 58 explicit RendererBlinkPlatformImpl(RendererScheduler* renderer_scheduler); |
58 virtual ~RendererBlinkPlatformImpl(); | 59 virtual ~RendererBlinkPlatformImpl(); |
59 | 60 |
60 void set_plugin_refresh_allowed(bool plugin_refresh_allowed) { | 61 void set_plugin_refresh_allowed(bool plugin_refresh_allowed) { |
61 plugin_refresh_allowed_ = plugin_refresh_allowed; | 62 plugin_refresh_allowed_ = plugin_refresh_allowed; |
62 } | 63 } |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
146 virtual void startListening(blink::WebPlatformEventType, | 147 virtual void startListening(blink::WebPlatformEventType, |
147 blink::WebPlatformEventListener*); | 148 blink::WebPlatformEventListener*); |
148 virtual void stopListening(blink::WebPlatformEventType); | 149 virtual void stopListening(blink::WebPlatformEventType); |
149 virtual void queryStorageUsageAndQuota( | 150 virtual void queryStorageUsageAndQuota( |
150 const blink::WebURL& storage_partition, | 151 const blink::WebURL& storage_partition, |
151 blink::WebStorageQuotaType, | 152 blink::WebStorageQuotaType, |
152 blink::WebStorageQuotaCallbacks); | 153 blink::WebStorageQuotaCallbacks); |
153 virtual void vibrate(unsigned int milliseconds); | 154 virtual void vibrate(unsigned int milliseconds); |
154 virtual void cancelVibration(); | 155 virtual void cancelVibration(); |
155 virtual blink::WebScheduler* scheduler(); | 156 virtual blink::WebScheduler* scheduler(); |
| 157 virtual blink::WebThread* currentThread(); |
156 | 158 |
157 // Set the PlatformEventObserverBase in |platform_event_observers_| associated | 159 // Set the PlatformEventObserverBase in |platform_event_observers_| associated |
158 // with |type| to |observer|. If there was already an observer associated to | 160 // with |type| to |observer|. If there was already an observer associated to |
159 // the given |type|, it will be replaced. | 161 // the given |type|, it will be replaced. |
160 // Note that |observer| will be owned by this object after the call. | 162 // Note that |observer| will be owned by this object after the call. |
161 void SetPlatformEventObserverForTesting( | 163 void SetPlatformEventObserverForTesting( |
162 blink::WebPlatformEventType type, | 164 blink::WebPlatformEventType type, |
163 scoped_ptr<PlatformEventObserverBase> observer); | 165 scoped_ptr<PlatformEventObserverBase> observer); |
164 | 166 |
165 // Disables the WebSandboxSupport implementation for testing. | 167 // Disables the WebSandboxSupport implementation for testing. |
(...skipping 30 matching lines...) Expand all Loading... |
196 // it. | 198 // it. |
197 static PlatformEventObserverBase* CreatePlatformEventObserverFromType( | 199 static PlatformEventObserverBase* CreatePlatformEventObserverFromType( |
198 blink::WebPlatformEventType type); | 200 blink::WebPlatformEventType type); |
199 | 201 |
200 // Use the data previously set via SetMockDevice...DataForTesting() and send | 202 // Use the data previously set via SetMockDevice...DataForTesting() and send |
201 // them to the registered listener. | 203 // them to the registered listener. |
202 void SendFakeDeviceEventDataForTesting(blink::WebPlatformEventType type); | 204 void SendFakeDeviceEventDataForTesting(blink::WebPlatformEventType type); |
203 device::VibrationManagerPtr& GetConnectedVibrationManagerService(); | 205 device::VibrationManagerPtr& GetConnectedVibrationManagerService(); |
204 | 206 |
205 scoped_ptr<WebSchedulerImpl> web_scheduler_; | 207 scoped_ptr<WebSchedulerImpl> web_scheduler_; |
| 208 scoped_ptr<WebThreadImplForScheduler> main_thread_; |
206 | 209 |
207 scoped_ptr<RendererClipboardDelegate> clipboard_delegate_; | 210 scoped_ptr<RendererClipboardDelegate> clipboard_delegate_; |
208 scoped_ptr<WebClipboardImpl> clipboard_; | 211 scoped_ptr<WebClipboardImpl> clipboard_; |
209 | 212 |
210 class FileUtilities; | 213 class FileUtilities; |
211 scoped_ptr<FileUtilities> file_utilities_; | 214 scoped_ptr<FileUtilities> file_utilities_; |
212 | 215 |
213 class MimeRegistry; | 216 class MimeRegistry; |
214 scoped_ptr<MimeRegistry> mime_registry_; | 217 scoped_ptr<MimeRegistry> mime_registry_; |
215 | 218 |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
252 device::VibrationManagerPtr vibration_manager_; | 255 device::VibrationManagerPtr vibration_manager_; |
253 | 256 |
254 IDMap<PlatformEventObserverBase, IDMapOwnPointer> platform_event_observers_; | 257 IDMap<PlatformEventObserverBase, IDMapOwnPointer> platform_event_observers_; |
255 | 258 |
256 DISALLOW_COPY_AND_ASSIGN(RendererBlinkPlatformImpl); | 259 DISALLOW_COPY_AND_ASSIGN(RendererBlinkPlatformImpl); |
257 }; | 260 }; |
258 | 261 |
259 } // namespace content | 262 } // namespace content |
260 | 263 |
261 #endif // CONTENT_RENDERER_RENDERER_BLINK_PLATFORM_IMPL_H_ | 264 #endif // CONTENT_RENDERER_RENDERER_BLINK_PLATFORM_IMPL_H_ |
OLD | NEW |