| 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 | |
| 132 private: | 127 private: |
| 133 void DoTimeout() { | 128 void DoTimeout() { |
| 134 if (shared_timer_func_ && !shared_timer_suspended_) | 129 if (shared_timer_func_ && !shared_timer_suspended_) |
| 135 shared_timer_func_(); | 130 shared_timer_func_(); |
| 136 } | 131 } |
| 137 static void DestroyCurrentThread(void*); | 132 static void DestroyCurrentThread(void*); |
| 138 | 133 |
| 139 MessageLoop* main_loop_; | 134 MessageLoop* main_loop_; |
| 140 base::OneShotTimer<WebKitPlatformSupportImpl> shared_timer_; | 135 base::OneShotTimer<WebKitPlatformSupportImpl> shared_timer_; |
| 141 void (*shared_timer_func_)(); | 136 void (*shared_timer_func_)(); |
| 142 double shared_timer_fire_time_; | 137 double shared_timer_fire_time_; |
| 143 int shared_timer_suspended_; // counter | 138 int shared_timer_suspended_; // counter |
| 144 WebThemeEngineImpl theme_engine_; | 139 WebThemeEngineImpl theme_engine_; |
| 145 base::ThreadLocalStorage::Slot current_thread_slot_; | 140 base::ThreadLocalStorage::Slot current_thread_slot_; |
| 146 }; | 141 }; |
| 147 | 142 |
| 148 } // namespace webkit_glue | 143 } // namespace webkit_glue |
| 149 | 144 |
| 150 #endif // WEBKIT_PLATFORM_SUPPORT_IMPL_H_ | 145 #endif // WEBKIT_PLATFORM_SUPPORT_IMPL_H_ |
| OLD | NEW |