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

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

Issue 1589463002: compositor worker: Use a WebThread for the compositor thread. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: self.nit Created 4 years, 11 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 | « components/scheduler/scheduler.gypi ('k') | 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 <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after
179 blink::WebServicePortProvider* createServicePortProvider( 179 blink::WebServicePortProvider* createServicePortProvider(
180 blink::WebServicePortProviderClient*) override; 180 blink::WebServicePortProviderClient*) override;
181 blink::WebPermissionClient* permissionClient() override; 181 blink::WebPermissionClient* permissionClient() override;
182 blink::WebSyncProvider* backgroundSyncProvider() override; 182 blink::WebSyncProvider* backgroundSyncProvider() override;
183 183
184 blink::WebString domCodeStringFromEnum(int dom_code) override; 184 blink::WebString domCodeStringFromEnum(int dom_code) override;
185 int domEnumFromCodeString(const blink::WebString& codeString) override; 185 int domEnumFromCodeString(const blink::WebString& codeString) override;
186 blink::WebString domKeyStringFromEnum(int dom_key) override; 186 blink::WebString domKeyStringFromEnum(int dom_key) override;
187 int domKeyEnumFromString(const blink::WebString& key_string) override; 187 int domKeyEnumFromString(const blink::WebString& key_string) override;
188 188
189 scoped_ptr<scheduler::WebThreadBase> createThreadWithOptions( 189 // This class does *not* own the compositor thread. It is the responsibility
190 const char* name, 190 // of the caller to ensure that the compositor thread is cleared before it is
191 base::Thread::Options);
192
193 // This class does *not* own |compositor_thread|. It is the responsibility of
194 // the caller to ensure that the compositor thread is cleared before it is
195 // destructed. 191 // destructed.
196 void set_compositor_thread(scheduler::WebThreadBase* compositor_thread) { 192 void SetCompositorThread(scheduler::WebThreadBase* compositor_thread);
197 compositor_thread_ = compositor_thread;
198 }
199 193
200 private: 194 private:
201 void InternalInit(); 195 void InternalInit();
196 void WaitUntilWebThreadTLSUpdate(scheduler::WebThreadBase* thread);
202 void UpdateWebThreadTLS(blink::WebThread* thread, base::WaitableEvent* event); 197 void UpdateWebThreadTLS(blink::WebThread* thread, base::WaitableEvent* event);
203 198
204 bool IsMainThread() const; 199 bool IsMainThread() const;
205 200
206 scoped_refptr<base::SingleThreadTaskRunner> main_thread_task_runner_; 201 scoped_refptr<base::SingleThreadTaskRunner> main_thread_task_runner_;
207 WebThemeEngineImpl native_theme_engine_; 202 WebThemeEngineImpl native_theme_engine_;
208 WebFallbackThemeEngineImpl fallback_theme_engine_; 203 WebFallbackThemeEngineImpl fallback_theme_engine_;
209 base::ThreadLocalStorage::Slot current_thread_slot_; 204 base::ThreadLocalStorage::Slot current_thread_slot_;
210 webcrypto::WebCryptoImpl web_crypto_; 205 webcrypto::WebCryptoImpl web_crypto_;
211 scoped_ptr<WebGeofencingProviderImpl> geofencing_provider_; 206 scoped_ptr<WebGeofencingProviderImpl> geofencing_provider_;
212 base::ScopedPtrHashMap<blink::WebMemoryDumpProvider*, 207 base::ScopedPtrHashMap<blink::WebMemoryDumpProvider*,
213 scoped_ptr<WebMemoryDumpProviderAdapter>> 208 scoped_ptr<WebMemoryDumpProviderAdapter>>
214 memory_dump_providers_; 209 memory_dump_providers_;
215 base::ScopedPtrHashMap<blink::Platform::TraceLogEnabledStateObserver*, 210 base::ScopedPtrHashMap<blink::Platform::TraceLogEnabledStateObserver*,
216 scoped_ptr<TraceLogObserverAdapter>> 211 scoped_ptr<TraceLogObserverAdapter>>
217 trace_log_observers_; 212 trace_log_observers_;
218 213
219 scoped_refptr<ThreadSafeSender> thread_safe_sender_; 214 scoped_refptr<ThreadSafeSender> thread_safe_sender_;
220 scoped_refptr<NotificationDispatcher> notification_dispatcher_; 215 scoped_refptr<NotificationDispatcher> notification_dispatcher_;
221 scoped_refptr<PushDispatcher> push_dispatcher_; 216 scoped_refptr<PushDispatcher> push_dispatcher_;
222 scoped_ptr<PermissionDispatcher> permission_client_; 217 scoped_ptr<PermissionDispatcher> permission_client_;
223 scoped_ptr<BackgroundSyncProvider> main_thread_sync_provider_; 218 scoped_ptr<BackgroundSyncProvider> main_thread_sync_provider_;
224 219
225 scheduler::WebThreadBase* compositor_thread_; 220 scheduler::WebThreadBase* compositor_thread_;
226 }; 221 };
227 222
228 } // namespace content 223 } // namespace content
229 224
230 #endif // CONTENT_CHILD_BLINK_PLATFORM_IMPL_H_ 225 #endif // CONTENT_CHILD_BLINK_PLATFORM_IMPL_H_
OLDNEW
« no previous file with comments | « components/scheduler/scheduler.gypi ('k') | content/child/blink_platform_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698