OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 WEBKIT_PLATFORM_SUPPORT_IMPL_H_ | 5 #ifndef WEBKIT_PLATFORM_SUPPORT_IMPL_H_ |
6 #define WEBKIT_PLATFORM_SUPPORT_IMPL_H_ | 6 #define WEBKIT_PLATFORM_SUPPORT_IMPL_H_ |
7 | 7 |
8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
9 #include "base/platform_file.h" | 9 #include "base/platform_file.h" |
10 #include "base/threading/thread_local_storage.h" | 10 #include "base/threading/thread_local_storage.h" |
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
117 virtual ResourceLoaderBridge* CreateResourceLoader( | 117 virtual ResourceLoaderBridge* CreateResourceLoader( |
118 const ResourceLoaderBridge::RequestInfo& request_info) = 0; | 118 const ResourceLoaderBridge::RequestInfo& request_info) = 0; |
119 // Creates a WebSocketStreamHandleBridge. | 119 // Creates a WebSocketStreamHandleBridge. |
120 virtual WebSocketStreamHandleBridge* CreateWebSocketBridge( | 120 virtual WebSocketStreamHandleBridge* CreateWebSocketBridge( |
121 WebKit::WebSocketStreamHandle* handle, | 121 WebKit::WebSocketStreamHandle* handle, |
122 WebSocketStreamHandleDelegate* delegate) = 0; | 122 WebSocketStreamHandleDelegate* delegate) = 0; |
123 | 123 |
124 void SuspendSharedTimer(); | 124 void SuspendSharedTimer(); |
125 void ResumeSharedTimer(); | 125 void ResumeSharedTimer(); |
126 | 126 |
| 127 virtual void didStartWorkerRunLoop( |
| 128 const WebKit::WebWorkerRunLoop& runLoop) OVERRIDE; |
| 129 virtual void didStopWorkerRunLoop( |
| 130 const WebKit::WebWorkerRunLoop& runLoop) OVERRIDE; |
| 131 |
127 private: | 132 private: |
128 void DoTimeout() { | 133 void DoTimeout() { |
129 if (shared_timer_func_ && !shared_timer_suspended_) | 134 if (shared_timer_func_ && !shared_timer_suspended_) |
130 shared_timer_func_(); | 135 shared_timer_func_(); |
131 } | 136 } |
132 static void DestroyCurrentThread(void*); | 137 static void DestroyCurrentThread(void*); |
133 | 138 |
134 MessageLoop* main_loop_; | 139 MessageLoop* main_loop_; |
135 base::OneShotTimer<WebKitPlatformSupportImpl> shared_timer_; | 140 base::OneShotTimer<WebKitPlatformSupportImpl> shared_timer_; |
136 void (*shared_timer_func_)(); | 141 void (*shared_timer_func_)(); |
137 double shared_timer_fire_time_; | 142 double shared_timer_fire_time_; |
138 int shared_timer_suspended_; // counter | 143 int shared_timer_suspended_; // counter |
139 WebThemeEngineImpl theme_engine_; | 144 WebThemeEngineImpl theme_engine_; |
140 base::ThreadLocalStorage::Slot current_thread_slot_; | 145 base::ThreadLocalStorage::Slot current_thread_slot_; |
141 }; | 146 }; |
142 | 147 |
143 } // namespace webkit_glue | 148 } // namespace webkit_glue |
144 | 149 |
145 #endif // WEBKIT_PLATFORM_SUPPORT_IMPL_H_ | 150 #endif // WEBKIT_PLATFORM_SUPPORT_IMPL_H_ |
OLD | NEW |