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 15 matching lines...) Expand all Loading... |
26 #elif defined(OS_ANDROID) | 26 #elif defined(OS_ANDROID) |
27 #include "content/child/webthemeengine_impl_android.h" | 27 #include "content/child/webthemeengine_impl_android.h" |
28 #endif | 28 #endif |
29 | 29 |
30 namespace base { | 30 namespace base { |
31 class MessageLoop; | 31 class MessageLoop; |
32 } | 32 } |
33 | 33 |
34 namespace content { | 34 namespace content { |
35 class FlingCurveConfiguration; | 35 class FlingCurveConfiguration; |
| 36 class NotificationDispatcher; |
| 37 class ThreadSafeSender; |
36 class WebCryptoImpl; | 38 class WebCryptoImpl; |
37 class WebGeofencingProviderImpl; | 39 class WebGeofencingProviderImpl; |
38 | 40 |
39 class CONTENT_EXPORT BlinkPlatformImpl | 41 class CONTENT_EXPORT BlinkPlatformImpl |
40 : NON_EXPORTED_BASE(public blink::Platform) { | 42 : NON_EXPORTED_BASE(public blink::Platform) { |
41 public: | 43 public: |
42 BlinkPlatformImpl(); | 44 BlinkPlatformImpl(); |
43 virtual ~BlinkPlatformImpl(); | 45 virtual ~BlinkPlatformImpl(); |
44 | 46 |
45 // Platform methods (partial implementation): | 47 // Platform methods (partial implementation): |
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
147 virtual blink::WebGestureCurve* createFlingAnimationCurve( | 149 virtual blink::WebGestureCurve* createFlingAnimationCurve( |
148 blink::WebGestureDevice device_source, | 150 blink::WebGestureDevice device_source, |
149 const blink::WebFloatPoint& velocity, | 151 const blink::WebFloatPoint& velocity, |
150 const blink::WebSize& cumulative_scroll); | 152 const blink::WebSize& cumulative_scroll); |
151 virtual void didStartWorkerRunLoop( | 153 virtual void didStartWorkerRunLoop( |
152 const blink::WebWorkerRunLoop& runLoop); | 154 const blink::WebWorkerRunLoop& runLoop); |
153 virtual void didStopWorkerRunLoop( | 155 virtual void didStopWorkerRunLoop( |
154 const blink::WebWorkerRunLoop& runLoop); | 156 const blink::WebWorkerRunLoop& runLoop); |
155 virtual blink::WebCrypto* crypto(); | 157 virtual blink::WebCrypto* crypto(); |
156 virtual blink::WebGeofencingProvider* geofencingProvider(); | 158 virtual blink::WebGeofencingProvider* geofencingProvider(); |
| 159 virtual blink::WebNotificationManager* notificationManager(); |
157 | 160 |
158 void SuspendSharedTimer(); | 161 void SuspendSharedTimer(); |
159 void ResumeSharedTimer(); | 162 void ResumeSharedTimer(); |
160 virtual void OnStartSharedTimer(base::TimeDelta delay) {} | 163 virtual void OnStartSharedTimer(base::TimeDelta delay) {} |
161 | 164 |
162 private: | 165 private: |
163 static void DestroyCurrentThread(void*); | 166 static void DestroyCurrentThread(void*); |
164 | 167 |
165 void DoTimeout() { | 168 void DoTimeout() { |
166 if (shared_timer_func_ && !shared_timer_suspended_) | 169 if (shared_timer_func_ && !shared_timer_suspended_) |
167 shared_timer_func_(); | 170 shared_timer_func_(); |
168 } | 171 } |
169 | 172 |
170 WebThemeEngineImpl native_theme_engine_; | 173 WebThemeEngineImpl native_theme_engine_; |
171 WebFallbackThemeEngineImpl fallback_theme_engine_; | 174 WebFallbackThemeEngineImpl fallback_theme_engine_; |
172 base::MessageLoop* main_loop_; | 175 base::MessageLoop* main_loop_; |
173 base::OneShotTimer<BlinkPlatformImpl> shared_timer_; | 176 base::OneShotTimer<BlinkPlatformImpl> shared_timer_; |
174 void (*shared_timer_func_)(); | 177 void (*shared_timer_func_)(); |
175 double shared_timer_fire_time_; | 178 double shared_timer_fire_time_; |
176 bool shared_timer_fire_time_was_set_while_suspended_; | 179 bool shared_timer_fire_time_was_set_while_suspended_; |
177 int shared_timer_suspended_; // counter | 180 int shared_timer_suspended_; // counter |
178 base::ThreadLocalStorage::Slot current_thread_slot_; | 181 base::ThreadLocalStorage::Slot current_thread_slot_; |
179 WebCryptoImpl web_crypto_; | 182 WebCryptoImpl web_crypto_; |
180 scoped_ptr<WebGeofencingProviderImpl> geofencing_provider_; | 183 scoped_ptr<WebGeofencingProviderImpl> geofencing_provider_; |
| 184 |
| 185 scoped_refptr<ThreadSafeSender> thread_safe_sender_; |
| 186 scoped_refptr<NotificationDispatcher> notification_dispatcher_; |
181 }; | 187 }; |
182 | 188 |
183 } // namespace content | 189 } // namespace content |
184 | 190 |
185 #endif // CONTENT_CHILD_BLINK_PLATFORM_IMPL_H_ | 191 #endif // CONTENT_CHILD_BLINK_PLATFORM_IMPL_H_ |
OLD | NEW |