| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_CHILD_BLINK_PLATFORM_IMPL_H_ | 5 #ifndef CONTENT_CHILD_BLINK_PLATFORM_IMPL_H_ |
| 6 #define CONTENT_CHILD_BLINK_PLATFORM_IMPL_H_ | 6 #define CONTENT_CHILD_BLINK_PLATFORM_IMPL_H_ |
| 7 | 7 |
| 8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
| 9 #include "base/containers/scoped_ptr_hash_map.h" | 9 #include "base/containers/scoped_ptr_hash_map.h" |
| 10 #include "base/threading/thread_local_storage.h" | 10 #include "base/threading/thread_local_storage.h" |
| (...skipping 21 matching lines...) Expand all Loading... |
| 32 class MessageLoop; | 32 class MessageLoop; |
| 33 } | 33 } |
| 34 | 34 |
| 35 namespace content { | 35 namespace content { |
| 36 class BackgroundSyncProvider; | 36 class BackgroundSyncProvider; |
| 37 class FlingCurveConfiguration; | 37 class FlingCurveConfiguration; |
| 38 class NotificationDispatcher; | 38 class NotificationDispatcher; |
| 39 class PermissionDispatcher; | 39 class PermissionDispatcher; |
| 40 class PushDispatcher; | 40 class PushDispatcher; |
| 41 class ThreadSafeSender; | 41 class ThreadSafeSender; |
| 42 class WebBluetoothImpl; | |
| 43 class WebCryptoImpl; | 42 class WebCryptoImpl; |
| 44 class WebGeofencingProviderImpl; | 43 class WebGeofencingProviderImpl; |
| 45 class WebMemoryDumpProviderAdapter; | 44 class WebMemoryDumpProviderAdapter; |
| 46 | 45 |
| 47 class CONTENT_EXPORT BlinkPlatformImpl | 46 class CONTENT_EXPORT BlinkPlatformImpl |
| 48 : NON_EXPORTED_BASE(public blink::Platform) { | 47 : NON_EXPORTED_BASE(public blink::Platform) { |
| 49 public: | 48 public: |
| 50 BlinkPlatformImpl(); | 49 BlinkPlatformImpl(); |
| 51 explicit BlinkPlatformImpl( | 50 explicit BlinkPlatformImpl( |
| 52 scoped_refptr<base::SingleThreadTaskRunner> main_thread_task_runner); | 51 scoped_refptr<base::SingleThreadTaskRunner> main_thread_task_runner); |
| (...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 160 virtual void cryptographicallyRandomValues( | 159 virtual void cryptographicallyRandomValues( |
| 161 unsigned char* buffer, size_t length); | 160 unsigned char* buffer, size_t length); |
| 162 virtual blink::WebGestureCurve* createFlingAnimationCurve( | 161 virtual blink::WebGestureCurve* createFlingAnimationCurve( |
| 163 blink::WebGestureDevice device_source, | 162 blink::WebGestureDevice device_source, |
| 164 const blink::WebFloatPoint& velocity, | 163 const blink::WebFloatPoint& velocity, |
| 165 const blink::WebSize& cumulative_scroll); | 164 const blink::WebSize& cumulative_scroll); |
| 166 virtual void didStartWorkerRunLoop(); | 165 virtual void didStartWorkerRunLoop(); |
| 167 virtual void didStopWorkerRunLoop(); | 166 virtual void didStopWorkerRunLoop(); |
| 168 virtual blink::WebCrypto* crypto(); | 167 virtual blink::WebCrypto* crypto(); |
| 169 virtual blink::WebGeofencingProvider* geofencingProvider(); | 168 virtual blink::WebGeofencingProvider* geofencingProvider(); |
| 170 virtual blink::WebBluetooth* bluetooth(); | |
| 171 virtual blink::WebNotificationManager* notificationManager(); | 169 virtual blink::WebNotificationManager* notificationManager(); |
| 172 virtual blink::WebPushProvider* pushProvider(); | 170 virtual blink::WebPushProvider* pushProvider(); |
| 173 virtual blink::WebServicePortProvider* createServicePortProvider( | 171 virtual blink::WebServicePortProvider* createServicePortProvider( |
| 174 blink::WebServicePortProviderClient*); | 172 blink::WebServicePortProviderClient*); |
| 175 virtual blink::WebPermissionClient* permissionClient(); | 173 virtual blink::WebPermissionClient* permissionClient(); |
| 176 virtual blink::WebSyncProvider* backgroundSyncProvider(); | 174 virtual blink::WebSyncProvider* backgroundSyncProvider(); |
| 177 | 175 |
| 178 virtual blink::WebString domCodeStringFromEnum(int dom_code); | 176 virtual blink::WebString domCodeStringFromEnum(int dom_code); |
| 179 virtual int domEnumFromCodeString(const blink::WebString& codeString); | 177 virtual int domEnumFromCodeString(const blink::WebString& codeString); |
| 180 | 178 |
| 181 private: | 179 private: |
| 182 void InternalInit(); | 180 void InternalInit(); |
| 183 void UpdateWebThreadTLS(blink::WebThread* thread); | 181 void UpdateWebThreadTLS(blink::WebThread* thread); |
| 184 | 182 |
| 185 bool IsMainThread() const; | 183 bool IsMainThread() const; |
| 186 | 184 |
| 187 scoped_refptr<base::SingleThreadTaskRunner> MainTaskRunnerForCurrentThread(); | 185 scoped_refptr<base::SingleThreadTaskRunner> MainTaskRunnerForCurrentThread(); |
| 188 | 186 |
| 189 scoped_refptr<base::SingleThreadTaskRunner> main_thread_task_runner_; | 187 scoped_refptr<base::SingleThreadTaskRunner> main_thread_task_runner_; |
| 190 WebThemeEngineImpl native_theme_engine_; | 188 WebThemeEngineImpl native_theme_engine_; |
| 191 WebFallbackThemeEngineImpl fallback_theme_engine_; | 189 WebFallbackThemeEngineImpl fallback_theme_engine_; |
| 192 base::ThreadLocalStorage::Slot current_thread_slot_; | 190 base::ThreadLocalStorage::Slot current_thread_slot_; |
| 193 webcrypto::WebCryptoImpl web_crypto_; | 191 webcrypto::WebCryptoImpl web_crypto_; |
| 194 scoped_ptr<WebGeofencingProviderImpl> geofencing_provider_; | 192 scoped_ptr<WebGeofencingProviderImpl> geofencing_provider_; |
| 195 scoped_ptr<WebBluetoothImpl> bluetooth_; | |
| 196 base::ScopedPtrHashMap<blink::WebMemoryDumpProvider*, | 193 base::ScopedPtrHashMap<blink::WebMemoryDumpProvider*, |
| 197 scoped_ptr<WebMemoryDumpProviderAdapter>> | 194 scoped_ptr<WebMemoryDumpProviderAdapter>> |
| 198 memory_dump_providers_; | 195 memory_dump_providers_; |
| 199 | 196 |
| 200 scoped_refptr<ThreadSafeSender> thread_safe_sender_; | 197 scoped_refptr<ThreadSafeSender> thread_safe_sender_; |
| 201 scoped_refptr<NotificationDispatcher> notification_dispatcher_; | 198 scoped_refptr<NotificationDispatcher> notification_dispatcher_; |
| 202 scoped_refptr<PushDispatcher> push_dispatcher_; | 199 scoped_refptr<PushDispatcher> push_dispatcher_; |
| 203 scoped_ptr<PermissionDispatcher> permission_client_; | 200 scoped_ptr<PermissionDispatcher> permission_client_; |
| 204 scoped_ptr<BackgroundSyncProvider> sync_provider_; | 201 scoped_ptr<BackgroundSyncProvider> sync_provider_; |
| 205 }; | 202 }; |
| 206 | 203 |
| 207 } // namespace content | 204 } // namespace content |
| 208 | 205 |
| 209 #endif // CONTENT_CHILD_BLINK_PLATFORM_IMPL_H_ | 206 #endif // CONTENT_CHILD_BLINK_PLATFORM_IMPL_H_ |
| OLD | NEW |