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 17 matching lines...) Expand all Loading... |
28 namespace IPC { | 28 namespace IPC { |
29 class SyncMessageFilter; | 29 class SyncMessageFilter; |
30 } | 30 } |
31 | 31 |
32 namespace blink { | 32 namespace blink { |
33 class WebBatteryStatus; | 33 class WebBatteryStatus; |
34 class WebDeviceMotionData; | 34 class WebDeviceMotionData; |
35 class WebDeviceOrientationData; | 35 class WebDeviceOrientationData; |
36 class WebGraphicsContext3DProvider; | 36 class WebGraphicsContext3DProvider; |
37 class WebServiceWorkerCacheStorage; | 37 class WebServiceWorkerCacheStorage; |
38 class WebScheduler; | |
39 } | 38 } |
40 | 39 |
41 namespace content { | 40 namespace content { |
42 class BatteryStatusDispatcher; | 41 class BatteryStatusDispatcher; |
43 class DeviceLightEventPump; | 42 class DeviceLightEventPump; |
44 class DeviceMotionEventPump; | 43 class DeviceMotionEventPump; |
45 class DeviceOrientationEventPump; | 44 class DeviceOrientationEventPump; |
46 class PlatformEventObserverBase; | 45 class PlatformEventObserverBase; |
47 class QuotaMessageFilter; | 46 class QuotaMessageFilter; |
48 class RendererClipboardDelegate; | 47 class RendererClipboardDelegate; |
49 class RendererScheduler; | 48 class RendererScheduler; |
50 class RenderView; | 49 class RenderView; |
51 class ThreadSafeSender; | 50 class ThreadSafeSender; |
52 class WebClipboardImpl; | 51 class WebClipboardImpl; |
53 class WebDatabaseObserverImpl; | 52 class WebDatabaseObserverImpl; |
54 class WebFileSystemImpl; | 53 class WebFileSystemImpl; |
55 class WebSchedulerImpl; | |
56 class WebThreadImplForRendererScheduler; | 54 class WebThreadImplForRendererScheduler; |
57 | 55 |
58 class CONTENT_EXPORT RendererBlinkPlatformImpl : public BlinkPlatformImpl { | 56 class CONTENT_EXPORT RendererBlinkPlatformImpl : public BlinkPlatformImpl { |
59 public: | 57 public: |
60 explicit RendererBlinkPlatformImpl(RendererScheduler* renderer_scheduler); | 58 explicit RendererBlinkPlatformImpl(RendererScheduler* renderer_scheduler); |
61 virtual ~RendererBlinkPlatformImpl(); | 59 virtual ~RendererBlinkPlatformImpl(); |
62 | 60 |
63 void set_plugin_refresh_allowed(bool plugin_refresh_allowed) { | 61 void set_plugin_refresh_allowed(bool plugin_refresh_allowed) { |
64 plugin_refresh_allowed_ = plugin_refresh_allowed; | 62 plugin_refresh_allowed_ = plugin_refresh_allowed; |
65 } | 63 } |
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
151 const blink::WebString& host, const blink::WebString& languages); | 149 const blink::WebString& host, const blink::WebString& languages); |
152 virtual void startListening(blink::WebPlatformEventType, | 150 virtual void startListening(blink::WebPlatformEventType, |
153 blink::WebPlatformEventListener*); | 151 blink::WebPlatformEventListener*); |
154 virtual void stopListening(blink::WebPlatformEventType); | 152 virtual void stopListening(blink::WebPlatformEventType); |
155 virtual void queryStorageUsageAndQuota( | 153 virtual void queryStorageUsageAndQuota( |
156 const blink::WebURL& storage_partition, | 154 const blink::WebURL& storage_partition, |
157 blink::WebStorageQuotaType, | 155 blink::WebStorageQuotaType, |
158 blink::WebStorageQuotaCallbacks); | 156 blink::WebStorageQuotaCallbacks); |
159 virtual void vibrate(unsigned int milliseconds); | 157 virtual void vibrate(unsigned int milliseconds); |
160 virtual void cancelVibration(); | 158 virtual void cancelVibration(); |
161 virtual blink::WebScheduler* scheduler(); | |
162 virtual blink::WebThread* currentThread(); | 159 virtual blink::WebThread* currentThread(); |
163 virtual void recordRappor(const char* metric, const blink::WebString& sample); | 160 virtual void recordRappor(const char* metric, const blink::WebString& sample); |
164 virtual void recordRapporURL(const char* metric, const blink::WebURL& url); | 161 virtual void recordRapporURL(const char* metric, const blink::WebURL& url); |
165 | 162 |
166 // Set the PlatformEventObserverBase in |platform_event_observers_| associated | 163 // Set the PlatformEventObserverBase in |platform_event_observers_| associated |
167 // with |type| to |observer|. If there was already an observer associated to | 164 // with |type| to |observer|. If there was already an observer associated to |
168 // the given |type|, it will be replaced. | 165 // the given |type|, it will be replaced. |
169 // Note that |observer| will be owned by this object after the call. | 166 // Note that |observer| will be owned by this object after the call. |
170 void SetPlatformEventObserverForTesting( | 167 void SetPlatformEventObserverForTesting( |
171 blink::WebPlatformEventType type, | 168 blink::WebPlatformEventType type, |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
204 // Factory that takes a type and return PlatformEventObserverBase that matches | 201 // Factory that takes a type and return PlatformEventObserverBase that matches |
205 // it. | 202 // it. |
206 static PlatformEventObserverBase* CreatePlatformEventObserverFromType( | 203 static PlatformEventObserverBase* CreatePlatformEventObserverFromType( |
207 blink::WebPlatformEventType type); | 204 blink::WebPlatformEventType type); |
208 | 205 |
209 // Use the data previously set via SetMockDevice...DataForTesting() and send | 206 // Use the data previously set via SetMockDevice...DataForTesting() and send |
210 // them to the registered listener. | 207 // them to the registered listener. |
211 void SendFakeDeviceEventDataForTesting(blink::WebPlatformEventType type); | 208 void SendFakeDeviceEventDataForTesting(blink::WebPlatformEventType type); |
212 device::VibrationManagerPtr& GetConnectedVibrationManagerService(); | 209 device::VibrationManagerPtr& GetConnectedVibrationManagerService(); |
213 | 210 |
214 scoped_ptr<WebSchedulerImpl> web_scheduler_; | |
215 scoped_ptr<WebThreadImplForRendererScheduler> main_thread_; | 211 scoped_ptr<WebThreadImplForRendererScheduler> main_thread_; |
216 | 212 |
217 scoped_ptr<RendererClipboardDelegate> clipboard_delegate_; | 213 scoped_ptr<RendererClipboardDelegate> clipboard_delegate_; |
218 scoped_ptr<WebClipboardImpl> clipboard_; | 214 scoped_ptr<WebClipboardImpl> clipboard_; |
219 | 215 |
220 class FileUtilities; | 216 class FileUtilities; |
221 scoped_ptr<FileUtilities> file_utilities_; | 217 scoped_ptr<FileUtilities> file_utilities_; |
222 | 218 |
223 class MimeRegistry; | 219 class MimeRegistry; |
224 scoped_ptr<MimeRegistry> mime_registry_; | 220 scoped_ptr<MimeRegistry> mime_registry_; |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
264 device::VibrationManagerPtr vibration_manager_; | 260 device::VibrationManagerPtr vibration_manager_; |
265 | 261 |
266 IDMap<PlatformEventObserverBase, IDMapOwnPointer> platform_event_observers_; | 262 IDMap<PlatformEventObserverBase, IDMapOwnPointer> platform_event_observers_; |
267 | 263 |
268 DISALLOW_COPY_AND_ASSIGN(RendererBlinkPlatformImpl); | 264 DISALLOW_COPY_AND_ASSIGN(RendererBlinkPlatformImpl); |
269 }; | 265 }; |
270 | 266 |
271 } // namespace content | 267 } // namespace content |
272 | 268 |
273 #endif // CONTENT_RENDERER_RENDERER_BLINK_PLATFORM_IMPL_H_ | 269 #endif // CONTENT_RENDERER_RENDERER_BLINK_PLATFORM_IMPL_H_ |
OLD | NEW |