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