| 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/threading/thread_local_storage.h" | 9 #include "base/threading/thread_local_storage.h" |
| 10 #include "base/timer/timer.h" | 10 #include "base/timer/timer.h" |
| (...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 169 void SuspendSharedTimer(); | 169 void SuspendSharedTimer(); |
| 170 void ResumeSharedTimer(); | 170 void ResumeSharedTimer(); |
| 171 virtual void OnStartSharedTimer(base::TimeDelta delay) {} | 171 virtual void OnStartSharedTimer(base::TimeDelta delay) {} |
| 172 | 172 |
| 173 WebBluetoothImpl* BluetoothImplForTesting() { return bluetooth_.get(); } | 173 WebBluetoothImpl* BluetoothImplForTesting() { return bluetooth_.get(); } |
| 174 | 174 |
| 175 virtual blink::WebString domCodeStringFromEnum(int dom_code); | 175 virtual blink::WebString domCodeStringFromEnum(int dom_code); |
| 176 virtual int domEnumFromCodeString(const blink::WebString& codeString); | 176 virtual int domEnumFromCodeString(const blink::WebString& codeString); |
| 177 | 177 |
| 178 private: | 178 private: |
| 179 static void DestroyCurrentThread(void*); | |
| 180 | |
| 181 void DoTimeout() { | 179 void DoTimeout() { |
| 182 if (shared_timer_func_ && !shared_timer_suspended_) | 180 if (shared_timer_func_ && !shared_timer_suspended_) |
| 183 shared_timer_func_(); | 181 shared_timer_func_(); |
| 184 } | 182 } |
| 185 | 183 |
| 186 void InternalInit(); | 184 void InternalInit(); |
| 185 void UpdateWebThreadTLS(blink::WebThread* thread); |
| 187 | 186 |
| 188 scoped_refptr<base::SingleThreadTaskRunner> MainTaskRunnerForCurrentThread(); | 187 scoped_refptr<base::SingleThreadTaskRunner> MainTaskRunnerForCurrentThread(); |
| 189 | 188 |
| 190 scoped_refptr<base::SingleThreadTaskRunner> main_thread_task_runner_; | 189 scoped_refptr<base::SingleThreadTaskRunner> main_thread_task_runner_; |
| 191 WebThemeEngineImpl native_theme_engine_; | 190 WebThemeEngineImpl native_theme_engine_; |
| 192 WebFallbackThemeEngineImpl fallback_theme_engine_; | 191 WebFallbackThemeEngineImpl fallback_theme_engine_; |
| 193 base::OneShotTimer<BlinkPlatformImpl> shared_timer_; | 192 base::OneShotTimer<BlinkPlatformImpl> shared_timer_; |
| 194 void (*shared_timer_func_)(); | 193 void (*shared_timer_func_)(); |
| 195 double shared_timer_fire_time_; | 194 double shared_timer_fire_time_; |
| 196 bool shared_timer_fire_time_was_set_while_suspended_; | 195 bool shared_timer_fire_time_was_set_while_suspended_; |
| 197 int shared_timer_suspended_; // counter | 196 int shared_timer_suspended_; // counter |
| 198 base::ThreadLocalStorage::Slot current_thread_slot_; | 197 base::ThreadLocalStorage::Slot current_thread_slot_; |
| 199 WebCryptoImpl web_crypto_; | 198 WebCryptoImpl web_crypto_; |
| 200 scoped_ptr<WebGeofencingProviderImpl> geofencing_provider_; | 199 scoped_ptr<WebGeofencingProviderImpl> geofencing_provider_; |
| 201 scoped_ptr<WebBluetoothImpl> bluetooth_; | 200 scoped_ptr<WebBluetoothImpl> bluetooth_; |
| 202 | 201 |
| 203 scoped_refptr<ThreadSafeSender> thread_safe_sender_; | 202 scoped_refptr<ThreadSafeSender> thread_safe_sender_; |
| 204 scoped_refptr<NotificationDispatcher> notification_dispatcher_; | 203 scoped_refptr<NotificationDispatcher> notification_dispatcher_; |
| 205 scoped_refptr<PushDispatcher> push_dispatcher_; | 204 scoped_refptr<PushDispatcher> push_dispatcher_; |
| 206 }; | 205 }; |
| 207 | 206 |
| 208 } // namespace content | 207 } // namespace content |
| 209 | 208 |
| 210 #endif // CONTENT_CHILD_BLINK_PLATFORM_IMPL_H_ | 209 #endif // CONTENT_CHILD_BLINK_PLATFORM_IMPL_H_ |
| OLD | NEW |