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 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
145 virtual void startListening(blink::WebPlatformEventType, | 146 virtual void startListening(blink::WebPlatformEventType, |
146 blink::WebPlatformEventListener*); | 147 blink::WebPlatformEventListener*); |
147 virtual void stopListening(blink::WebPlatformEventType); | 148 virtual void stopListening(blink::WebPlatformEventType); |
148 virtual void queryStorageUsageAndQuota( | 149 virtual void queryStorageUsageAndQuota( |
149 const blink::WebURL& storage_partition, | 150 const blink::WebURL& storage_partition, |
150 blink::WebStorageQuotaType, | 151 blink::WebStorageQuotaType, |
151 blink::WebStorageQuotaCallbacks); | 152 blink::WebStorageQuotaCallbacks); |
152 virtual void vibrate(unsigned int milliseconds); | 153 virtual void vibrate(unsigned int milliseconds); |
153 virtual void cancelVibration(); | 154 virtual void cancelVibration(); |
154 virtual blink::WebScheduler* scheduler(); | 155 virtual blink::WebScheduler* scheduler(); |
| 156 virtual blink::WebThread* currentThread(); |
155 | 157 |
156 // Set the PlatformEventObserverBase in |platform_event_observers_| associated | 158 // Set the PlatformEventObserverBase in |platform_event_observers_| associated |
157 // with |type| to |observer|. If there was already an observer associated to | 159 // with |type| to |observer|. If there was already an observer associated to |
158 // the given |type|, it will be replaced. | 160 // the given |type|, it will be replaced. |
159 // Note that |observer| will be owned by this object after the call. | 161 // Note that |observer| will be owned by this object after the call. |
160 void SetPlatformEventObserverForTesting( | 162 void SetPlatformEventObserverForTesting( |
161 blink::WebPlatformEventType type, | 163 blink::WebPlatformEventType type, |
162 scoped_ptr<PlatformEventObserverBase> observer); | 164 scoped_ptr<PlatformEventObserverBase> observer); |
163 | 165 |
164 // Disables the WebSandboxSupport implementation for testing. | 166 // Disables the WebSandboxSupport implementation for testing. |
(...skipping 30 matching lines...) Expand all Loading... |
195 // it. | 197 // it. |
196 static PlatformEventObserverBase* CreatePlatformEventObserverFromType( | 198 static PlatformEventObserverBase* CreatePlatformEventObserverFromType( |
197 blink::WebPlatformEventType type); | 199 blink::WebPlatformEventType type); |
198 | 200 |
199 // Use the data previously set via SetMockDevice...DataForTesting() and send | 201 // Use the data previously set via SetMockDevice...DataForTesting() and send |
200 // them to the registered listener. | 202 // them to the registered listener. |
201 void SendFakeDeviceEventDataForTesting(blink::WebPlatformEventType type); | 203 void SendFakeDeviceEventDataForTesting(blink::WebPlatformEventType type); |
202 device::VibrationManagerPtr& GetConnectedVibrationManagerService(); | 204 device::VibrationManagerPtr& GetConnectedVibrationManagerService(); |
203 | 205 |
204 scoped_ptr<WebSchedulerImpl> web_scheduler_; | 206 scoped_ptr<WebSchedulerImpl> web_scheduler_; |
| 207 scoped_ptr<WebThreadImplForScheduler> main_thread_; |
205 | 208 |
206 scoped_ptr<RendererClipboardDelegate> clipboard_delegate_; | 209 scoped_ptr<RendererClipboardDelegate> clipboard_delegate_; |
207 scoped_ptr<WebClipboardImpl> clipboard_; | 210 scoped_ptr<WebClipboardImpl> clipboard_; |
208 | 211 |
209 class FileUtilities; | 212 class FileUtilities; |
210 scoped_ptr<FileUtilities> file_utilities_; | 213 scoped_ptr<FileUtilities> file_utilities_; |
211 | 214 |
212 class MimeRegistry; | 215 class MimeRegistry; |
213 scoped_ptr<MimeRegistry> mime_registry_; | 216 scoped_ptr<MimeRegistry> mime_registry_; |
214 | 217 |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
251 device::VibrationManagerPtr vibration_manager_; | 254 device::VibrationManagerPtr vibration_manager_; |
252 | 255 |
253 IDMap<PlatformEventObserverBase, IDMapOwnPointer> platform_event_observers_; | 256 IDMap<PlatformEventObserverBase, IDMapOwnPointer> platform_event_observers_; |
254 | 257 |
255 DISALLOW_COPY_AND_ASSIGN(RendererBlinkPlatformImpl); | 258 DISALLOW_COPY_AND_ASSIGN(RendererBlinkPlatformImpl); |
256 }; | 259 }; |
257 | 260 |
258 } // namespace content | 261 } // namespace content |
259 | 262 |
260 #endif // CONTENT_RENDERER_RENDERER_BLINK_PLATFORM_IMPL_H_ | 263 #endif // CONTENT_RENDERER_RENDERER_BLINK_PLATFORM_IMPL_H_ |
OLD | NEW |