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

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

Issue 608043002: Revert of Pending tasks in a message loop should be deleted before shutting down Blink (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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/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 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 // The routing IDs correspond to RenderView instances. 113 // The routing IDs correspond to RenderView instances.
114 class CONTENT_EXPORT RenderThreadImpl : public RenderThread, 114 class CONTENT_EXPORT RenderThreadImpl : public RenderThread,
115 public ChildThread, 115 public ChildThread,
116 public GpuChannelHostFactory { 116 public GpuChannelHostFactory {
117 public: 117 public:
118 static RenderThreadImpl* current(); 118 static RenderThreadImpl* current();
119 119
120 RenderThreadImpl(); 120 RenderThreadImpl();
121 // Constructor that's used when running in single process mode. 121 // Constructor that's used when running in single process mode.
122 explicit RenderThreadImpl(const std::string& channel_name); 122 explicit RenderThreadImpl(const std::string& channel_name);
123 // Constructor that's used in RendererMain.
124 explicit RenderThreadImpl(scoped_ptr<base::MessageLoop> main_message_loop);
125 virtual ~RenderThreadImpl(); 123 virtual ~RenderThreadImpl();
126 virtual void Shutdown() OVERRIDE; 124 virtual void Shutdown() OVERRIDE;
127 125
128 // When initializing WebKit, ensure that any schemes needed for the content 126 // When initializing WebKit, ensure that any schemes needed for the content
129 // module are registered properly. Static to allow sharing with tests. 127 // module are registered properly. Static to allow sharing with tests.
130 static void RegisterSchemes(); 128 static void RegisterSchemes();
131 129
132 // Notify V8 that the date/time configuration of the system might have 130 // Notify V8 that the date/time configuration of the system might have
133 // changed. 131 // changed.
134 static void NotifyTimezoneChange(); 132 static void NotifyTimezoneChange();
(...skipping 390 matching lines...) Expand 10 before | Expand all | Expand 10 after
525 // Timer that periodically calls IdleHandler. 523 // Timer that periodically calls IdleHandler.
526 base::RepeatingTimer<RenderThreadImpl> idle_timer_; 524 base::RepeatingTimer<RenderThreadImpl> idle_timer_;
527 525
528 // The channel from the renderer process to the GPU process. 526 // The channel from the renderer process to the GPU process.
529 scoped_refptr<GpuChannelHost> gpu_channel_; 527 scoped_refptr<GpuChannelHost> gpu_channel_;
530 528
531 // Cache of variables that are needed on the compositor thread by 529 // Cache of variables that are needed on the compositor thread by
532 // GpuChannelHostFactory methods. 530 // GpuChannelHostFactory methods.
533 scoped_refptr<base::MessageLoopProxy> io_message_loop_proxy_; 531 scoped_refptr<base::MessageLoopProxy> io_message_loop_proxy_;
534 532
535 // The message loop of the renderer main thread.
536 // This message loop should be destructed before the RenderThreadImpl
537 // shuts down Blink.
538 scoped_ptr<base::MessageLoop> main_message_loop_;
539
540 // A lazily initiated thread on which file operations are run. 533 // A lazily initiated thread on which file operations are run.
541 scoped_ptr<base::Thread> file_thread_; 534 scoped_ptr<base::Thread> file_thread_;
542 535
543 // May be null if overridden by ContentRendererClient. 536 // May be null if overridden by ContentRendererClient.
544 scoped_ptr<base::Thread> compositor_thread_; 537 scoped_ptr<base::Thread> compositor_thread_;
545 538
546 // Thread for running multimedia operations (e.g., video decoding). 539 // Thread for running multimedia operations (e.g., video decoding).
547 scoped_ptr<base::Thread> media_thread_; 540 scoped_ptr<base::Thread> media_thread_;
548 541
549 // Will point to appropriate MessageLoopProxy after initialization, 542 // Will point to appropriate MessageLoopProxy after initialization,
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
593 bool is_one_copy_enabled_; 586 bool is_one_copy_enabled_;
594 587
595 std::map<int, mojo::MessagePipeHandle> pending_render_frame_connects_; 588 std::map<int, mojo::MessagePipeHandle> pending_render_frame_connects_;
596 589
597 DISALLOW_COPY_AND_ASSIGN(RenderThreadImpl); 590 DISALLOW_COPY_AND_ASSIGN(RenderThreadImpl);
598 }; 591 };
599 592
600 } // namespace content 593 } // namespace content
601 594
602 #endif // CONTENT_RENDERER_RENDER_THREAD_IMPL_H_ 595 #endif // CONTENT_RENDERER_RENDER_THREAD_IMPL_H_
OLDNEW
« no previous file with comments | « no previous file | content/renderer/render_thread_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698