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

Side by Side Diff: content/renderer/render_thread_impl.h

Issue 1227303002: Set listener task runner before connect channel. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix trybot error. Created 5 years, 5 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 | « content/renderer/in_process_renderer_thread.cc ('k') | content/renderer/render_thread_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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_RENDERER_RENDER_THREAD_IMPL_H_ 5 #ifndef CONTENT_RENDERER_RENDER_THREAD_IMPL_H_
6 #define CONTENT_RENDERER_RENDER_THREAD_IMPL_H_ 6 #define CONTENT_RENDERER_RENDER_THREAD_IMPL_H_
7 7
8 #include <set> 8 #include <set>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 // 128 //
129 // Most of the communication occurs in the form of IPC messages. They are 129 // Most of the communication occurs in the form of IPC messages. They are
130 // routed to the RenderThread according to the routing IDs of the messages. 130 // routed to the RenderThread according to the routing IDs of the messages.
131 // The routing IDs correspond to RenderView instances. 131 // The routing IDs correspond to RenderView instances.
132 class CONTENT_EXPORT RenderThreadImpl 132 class CONTENT_EXPORT RenderThreadImpl
133 : public RenderThread, 133 : public RenderThread,
134 public ChildThreadImpl, 134 public ChildThreadImpl,
135 public GpuChannelHostFactory, 135 public GpuChannelHostFactory,
136 NON_EXPORTED_BASE(public CompositorDependencies) { 136 NON_EXPORTED_BASE(public CompositorDependencies) {
137 public: 137 public:
138 static RenderThreadImpl* Create(const InProcessChildThreadParams& params);
139 static RenderThreadImpl* Create(
140 scoped_ptr<base::MessageLoop> main_message_loop);
138 static RenderThreadImpl* current(); 141 static RenderThreadImpl* current();
139 142
140 explicit RenderThreadImpl(const InProcessChildThreadParams& params);
141 explicit RenderThreadImpl(scoped_ptr<base::MessageLoop> main_message_loop);
142 ~RenderThreadImpl() override; 143 ~RenderThreadImpl() override;
143 void Shutdown() override; 144 void Shutdown() override;
144 145
145 // When initializing WebKit, ensure that any schemes needed for the content 146 // When initializing WebKit, ensure that any schemes needed for the content
146 // module are registered properly. Static to allow sharing with tests. 147 // module are registered properly. Static to allow sharing with tests.
147 static void RegisterSchemes(); 148 static void RegisterSchemes();
148 149
149 // Notify V8 that the date/time configuration of the system might have 150 // Notify V8 that the date/time configuration of the system might have
150 // changed. 151 // changed.
151 static void NotifyTimezoneChange(); 152 static void NotifyTimezoneChange();
(...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after
413 414
414 void AddEmbeddedWorkerRoute(int32 routing_id, IPC::Listener* listener); 415 void AddEmbeddedWorkerRoute(int32 routing_id, IPC::Listener* listener);
415 void RemoveEmbeddedWorkerRoute(int32 routing_id); 416 void RemoveEmbeddedWorkerRoute(int32 routing_id);
416 417
417 void RegisterPendingRenderFrameConnect( 418 void RegisterPendingRenderFrameConnect(
418 int routing_id, 419 int routing_id,
419 mojo::InterfaceRequest<mojo::ServiceProvider> services, 420 mojo::InterfaceRequest<mojo::ServiceProvider> services,
420 mojo::ServiceProviderPtr exposed_services); 421 mojo::ServiceProviderPtr exposed_services);
421 422
422 protected: 423 protected:
424 RenderThreadImpl(const InProcessChildThreadParams& params,
425 scoped_ptr<scheduler::RendererScheduler> scheduler);
426 RenderThreadImpl(scoped_ptr<base::MessageLoop> main_message_loop,
427 scoped_ptr<scheduler::RendererScheduler> scheduler);
423 virtual void SetResourceDispatchTaskQueue( 428 virtual void SetResourceDispatchTaskQueue(
424 const scoped_refptr<base::SingleThreadTaskRunner>& resource_task_queue); 429 const scoped_refptr<base::SingleThreadTaskRunner>& resource_task_queue);
425 430
426 private: 431 private:
427 // ChildThread 432 // ChildThread
428 bool OnControlMessageReceived(const IPC::Message& msg) override; 433 bool OnControlMessageReceived(const IPC::Message& msg) override;
429 434
430 // GpuChannelHostFactory implementation: 435 // GpuChannelHostFactory implementation:
431 bool IsMainThread() override; 436 bool IsMainThread() override;
432 scoped_refptr<base::SingleThreadTaskRunner> GetIOThreadTaskRunner() override; 437 scoped_refptr<base::SingleThreadTaskRunner> GetIOThreadTaskRunner() override;
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after
644 DISALLOW_COPY_AND_ASSIGN(RenderThreadImpl); 649 DISALLOW_COPY_AND_ASSIGN(RenderThreadImpl);
645 }; 650 };
646 651
647 #if defined(COMPILER_MSVC) 652 #if defined(COMPILER_MSVC)
648 #pragma warning(pop) 653 #pragma warning(pop)
649 #endif 654 #endif
650 655
651 } // namespace content 656 } // namespace content
652 657
653 #endif // CONTENT_RENDERER_RENDER_THREAD_IMPL_H_ 658 #endif // CONTENT_RENDERER_RENDER_THREAD_IMPL_H_
OLDNEW
« no previous file with comments | « content/renderer/in_process_renderer_thread.cc ('k') | content/renderer/render_thread_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698