Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(113)

Side by Side Diff: content/child/blink_platform_impl.h

Issue 959803003: web-threads: Create a single instance of WebThread for each blink thread. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | content/child/blink_platform_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 WebBluetoothImpl* BluetoothImplForTesting() { return bluetooth_.get(); } 165 WebBluetoothImpl* BluetoothImplForTesting() { return bluetooth_.get(); }
166 166
167 virtual blink::WebString domCodeStringFromEnum(int dom_code); 167 virtual blink::WebString domCodeStringFromEnum(int dom_code);
168 virtual int domEnumFromCodeString(const blink::WebString& codeString); 168 virtual int domEnumFromCodeString(const blink::WebString& codeString);
169 169
170 private: 170 private:
171 static void DestroyCurrentThread(void*);
172
173 void DoTimeout() { 171 void DoTimeout() {
174 if (shared_timer_func_ && !shared_timer_suspended_) 172 if (shared_timer_func_ && !shared_timer_suspended_)
175 shared_timer_func_(); 173 shared_timer_func_();
176 } 174 }
177 175
178 void InternalInit(); 176 void InternalInit();
177 void UpdateWebThreadTLS(blink::WebThread* thread);
179 178
180 scoped_refptr<base::SingleThreadTaskRunner> MainTaskRunnerForCurrentThread(); 179 scoped_refptr<base::SingleThreadTaskRunner> MainTaskRunnerForCurrentThread();
181 180
182 scoped_refptr<base::SingleThreadTaskRunner> main_thread_task_runner_; 181 scoped_refptr<base::SingleThreadTaskRunner> main_thread_task_runner_;
183 WebThemeEngineImpl native_theme_engine_; 182 WebThemeEngineImpl native_theme_engine_;
184 WebFallbackThemeEngineImpl fallback_theme_engine_; 183 WebFallbackThemeEngineImpl fallback_theme_engine_;
185 base::OneShotTimer<BlinkPlatformImpl> shared_timer_; 184 base::OneShotTimer<BlinkPlatformImpl> shared_timer_;
186 void (*shared_timer_func_)(); 185 void (*shared_timer_func_)();
187 double shared_timer_fire_time_; 186 double shared_timer_fire_time_;
188 bool shared_timer_fire_time_was_set_while_suspended_; 187 bool shared_timer_fire_time_was_set_while_suspended_;
189 int shared_timer_suspended_; // counter 188 int shared_timer_suspended_; // counter
190 base::ThreadLocalStorage::Slot current_thread_slot_; 189 base::ThreadLocalStorage::Slot current_thread_slot_;
191 WebCryptoImpl web_crypto_; 190 WebCryptoImpl web_crypto_;
192 scoped_ptr<WebGeofencingProviderImpl> geofencing_provider_; 191 scoped_ptr<WebGeofencingProviderImpl> geofencing_provider_;
193 scoped_ptr<WebBluetoothImpl> bluetooth_; 192 scoped_ptr<WebBluetoothImpl> bluetooth_;
194 193
195 scoped_refptr<ThreadSafeSender> thread_safe_sender_; 194 scoped_refptr<ThreadSafeSender> thread_safe_sender_;
196 scoped_refptr<NotificationDispatcher> notification_dispatcher_; 195 scoped_refptr<NotificationDispatcher> notification_dispatcher_;
197 scoped_refptr<PushDispatcher> push_dispatcher_; 196 scoped_refptr<PushDispatcher> push_dispatcher_;
198 }; 197 };
199 198
200 } // namespace content 199 } // namespace content
201 200
202 #endif // CONTENT_CHILD_BLINK_PLATFORM_IMPL_H_ 201 #endif // CONTENT_CHILD_BLINK_PLATFORM_IMPL_H_
OLDNEW
« no previous file with comments | « no previous file | content/child/blink_platform_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698