| 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 <stddef.h> | 8 #include <stddef.h> |
| 9 #include <stdint.h> | 9 #include <stdint.h> |
| 10 | 10 |
| (...skipping 25 matching lines...) Expand all Loading... |
| 36 class WaitableEvent; | 36 class WaitableEvent; |
| 37 } | 37 } |
| 38 | 38 |
| 39 namespace blink { | 39 namespace blink { |
| 40 namespace scheduler { | 40 namespace scheduler { |
| 41 class WebThreadBase; | 41 class WebThreadBase; |
| 42 } | 42 } |
| 43 } | 43 } |
| 44 | 44 |
| 45 namespace content { | 45 namespace content { |
| 46 class BackgroundSyncProvider; | 46 |
| 47 class NotificationDispatcher; | 47 class NotificationDispatcher; |
| 48 class PushDispatcher; | 48 class PushDispatcher; |
| 49 class ThreadSafeSender; | 49 class ThreadSafeSender; |
| 50 class WebCryptoImpl; | 50 class WebCryptoImpl; |
| 51 | 51 |
| 52 class CONTENT_EXPORT BlinkPlatformImpl | 52 class CONTENT_EXPORT BlinkPlatformImpl |
| 53 : NON_EXPORTED_BASE(public blink::Platform) { | 53 : NON_EXPORTED_BASE(public blink::Platform) { |
| 54 public: | 54 public: |
| 55 BlinkPlatformImpl(); | 55 BlinkPlatformImpl(); |
| 56 explicit BlinkPlatformImpl( | 56 explicit BlinkPlatformImpl( |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 106 blink::WebGestureDevice device_source, | 106 blink::WebGestureDevice device_source, |
| 107 const blink::WebFloatPoint& velocity, | 107 const blink::WebFloatPoint& velocity, |
| 108 const blink::WebSize& cumulative_scroll) override; | 108 const blink::WebSize& cumulative_scroll) override; |
| 109 void didStartWorkerThread() override; | 109 void didStartWorkerThread() override; |
| 110 void willStopWorkerThread() override; | 110 void willStopWorkerThread() override; |
| 111 bool allowScriptExtensionForServiceWorker( | 111 bool allowScriptExtensionForServiceWorker( |
| 112 const blink::WebURL& script_url) override; | 112 const blink::WebURL& script_url) override; |
| 113 blink::WebCrypto* crypto() override; | 113 blink::WebCrypto* crypto() override; |
| 114 blink::WebNotificationManager* notificationManager() override; | 114 blink::WebNotificationManager* notificationManager() override; |
| 115 blink::WebPushProvider* pushProvider() override; | 115 blink::WebPushProvider* pushProvider() override; |
| 116 blink::WebSyncProvider* backgroundSyncProvider() override; | |
| 117 | 116 |
| 118 blink::WebString domCodeStringFromEnum(int dom_code) override; | 117 blink::WebString domCodeStringFromEnum(int dom_code) override; |
| 119 int domEnumFromCodeString(const blink::WebString& codeString) override; | 118 int domEnumFromCodeString(const blink::WebString& codeString) override; |
| 120 blink::WebString domKeyStringFromEnum(int dom_key) override; | 119 blink::WebString domKeyStringFromEnum(int dom_key) override; |
| 121 int domKeyEnumFromString(const blink::WebString& key_string) override; | 120 int domKeyEnumFromString(const blink::WebString& key_string) override; |
| 122 | 121 |
| 123 // This class does *not* own the compositor thread. It is the responsibility | 122 // This class does *not* own the compositor thread. It is the responsibility |
| 124 // of the caller to ensure that the compositor thread is cleared before it is | 123 // of the caller to ensure that the compositor thread is cleared before it is |
| 125 // destructed. | 124 // destructed. |
| 126 void SetCompositorThread(blink::scheduler::WebThreadBase* compositor_thread); | 125 void SetCompositorThread(blink::scheduler::WebThreadBase* compositor_thread); |
| 127 | 126 |
| 128 private: | 127 private: |
| 129 void InternalInit(); | 128 void InternalInit(); |
| 130 void WaitUntilWebThreadTLSUpdate(blink::scheduler::WebThreadBase* thread); | 129 void WaitUntilWebThreadTLSUpdate(blink::scheduler::WebThreadBase* thread); |
| 131 void UpdateWebThreadTLS(blink::WebThread* thread, base::WaitableEvent* event); | 130 void UpdateWebThreadTLS(blink::WebThread* thread, base::WaitableEvent* event); |
| 132 | 131 |
| 133 bool IsMainThread() const; | 132 bool IsMainThread() const; |
| 134 | 133 |
| 135 scoped_refptr<base::SingleThreadTaskRunner> main_thread_task_runner_; | 134 scoped_refptr<base::SingleThreadTaskRunner> main_thread_task_runner_; |
| 136 WebThemeEngineImpl native_theme_engine_; | 135 WebThemeEngineImpl native_theme_engine_; |
| 137 WebFallbackThemeEngineImpl fallback_theme_engine_; | 136 WebFallbackThemeEngineImpl fallback_theme_engine_; |
| 138 base::ThreadLocalStorage::Slot current_thread_slot_; | 137 base::ThreadLocalStorage::Slot current_thread_slot_; |
| 139 webcrypto::WebCryptoImpl web_crypto_; | 138 webcrypto::WebCryptoImpl web_crypto_; |
| 140 | 139 |
| 141 scoped_refptr<ThreadSafeSender> thread_safe_sender_; | 140 scoped_refptr<ThreadSafeSender> thread_safe_sender_; |
| 142 scoped_refptr<NotificationDispatcher> notification_dispatcher_; | 141 scoped_refptr<NotificationDispatcher> notification_dispatcher_; |
| 143 scoped_refptr<PushDispatcher> push_dispatcher_; | 142 scoped_refptr<PushDispatcher> push_dispatcher_; |
| 144 std::unique_ptr<BackgroundSyncProvider> main_thread_sync_provider_; | |
| 145 | 143 |
| 146 blink::scheduler::WebThreadBase* compositor_thread_; | 144 blink::scheduler::WebThreadBase* compositor_thread_; |
| 147 }; | 145 }; |
| 148 | 146 |
| 149 } // namespace content | 147 } // namespace content |
| 150 | 148 |
| 151 #endif // CONTENT_CHILD_BLINK_PLATFORM_IMPL_H_ | 149 #endif // CONTENT_CHILD_BLINK_PLATFORM_IMPL_H_ |
| OLD | NEW |