| 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/debug/trace_event.h" | 9 #include "base/debug/trace_event.h" |
| 10 #include "base/threading/thread_local_storage.h" | 10 #include "base/threading/thread_local_storage.h" |
| (...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 155 virtual void didStopWorkerRunLoop( | 155 virtual void didStopWorkerRunLoop( |
| 156 const blink::WebWorkerRunLoop& runLoop); | 156 const blink::WebWorkerRunLoop& runLoop); |
| 157 virtual blink::WebCrypto* crypto(); | 157 virtual blink::WebCrypto* crypto(); |
| 158 virtual blink::WebGeofencingProvider* geofencingProvider(); | 158 virtual blink::WebGeofencingProvider* geofencingProvider(); |
| 159 virtual blink::WebNotificationManager* notificationManager(); | 159 virtual blink::WebNotificationManager* notificationManager(); |
| 160 | 160 |
| 161 void SuspendSharedTimer(); | 161 void SuspendSharedTimer(); |
| 162 void ResumeSharedTimer(); | 162 void ResumeSharedTimer(); |
| 163 virtual void OnStartSharedTimer(base::TimeDelta delay) {} | 163 virtual void OnStartSharedTimer(base::TimeDelta delay) {} |
| 164 | 164 |
| 165 protected: |
| 166 base::OneShotTimer<BlinkPlatformImpl> shared_timer_; |
| 167 scoped_refptr<base::SingleThreadTaskRunner> main_thread_task_runner_; |
| 168 |
| 165 private: | 169 private: |
| 166 static void DestroyCurrentThread(void*); | 170 static void DestroyCurrentThread(void*); |
| 167 | 171 |
| 168 void DoTimeout() { | 172 void DoTimeout() { |
| 169 if (shared_timer_func_ && !shared_timer_suspended_) | 173 if (shared_timer_func_ && !shared_timer_suspended_) |
| 170 shared_timer_func_(); | 174 shared_timer_func_(); |
| 171 } | 175 } |
| 172 | 176 |
| 173 WebThemeEngineImpl native_theme_engine_; | 177 WebThemeEngineImpl native_theme_engine_; |
| 174 WebFallbackThemeEngineImpl fallback_theme_engine_; | 178 WebFallbackThemeEngineImpl fallback_theme_engine_; |
| 175 base::MessageLoop* main_loop_; | |
| 176 base::OneShotTimer<BlinkPlatformImpl> shared_timer_; | |
| 177 void (*shared_timer_func_)(); | 179 void (*shared_timer_func_)(); |
| 178 double shared_timer_fire_time_; | 180 double shared_timer_fire_time_; |
| 179 bool shared_timer_fire_time_was_set_while_suspended_; | 181 bool shared_timer_fire_time_was_set_while_suspended_; |
| 180 int shared_timer_suspended_; // counter | 182 int shared_timer_suspended_; // counter |
| 181 base::ThreadLocalStorage::Slot current_thread_slot_; | 183 base::ThreadLocalStorage::Slot current_thread_slot_; |
| 182 WebCryptoImpl web_crypto_; | 184 WebCryptoImpl web_crypto_; |
| 183 scoped_ptr<WebGeofencingProviderImpl> geofencing_provider_; | 185 scoped_ptr<WebGeofencingProviderImpl> geofencing_provider_; |
| 184 | 186 |
| 185 scoped_refptr<ThreadSafeSender> thread_safe_sender_; | 187 scoped_refptr<ThreadSafeSender> thread_safe_sender_; |
| 186 scoped_refptr<NotificationDispatcher> notification_dispatcher_; | 188 scoped_refptr<NotificationDispatcher> notification_dispatcher_; |
| 187 }; | 189 }; |
| 188 | 190 |
| 189 } // namespace content | 191 } // namespace content |
| 190 | 192 |
| 191 #endif // CONTENT_CHILD_BLINK_PLATFORM_IMPL_H_ | 193 #endif // CONTENT_CHILD_BLINK_PLATFORM_IMPL_H_ |
| OLD | NEW |