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

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

Issue 614233002: 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 383 matching lines...) Expand 10 before | Expand all | Expand 10 after
518 // Timer that periodically calls IdleHandler. 516 // Timer that periodically calls IdleHandler.
519 base::RepeatingTimer<RenderThreadImpl> idle_timer_; 517 base::RepeatingTimer<RenderThreadImpl> idle_timer_;
520 518
521 // The channel from the renderer process to the GPU process. 519 // The channel from the renderer process to the GPU process.
522 scoped_refptr<GpuChannelHost> gpu_channel_; 520 scoped_refptr<GpuChannelHost> gpu_channel_;
523 521
524 // Cache of variables that are needed on the compositor thread by 522 // Cache of variables that are needed on the compositor thread by
525 // GpuChannelHostFactory methods. 523 // GpuChannelHostFactory methods.
526 scoped_refptr<base::MessageLoopProxy> io_message_loop_proxy_; 524 scoped_refptr<base::MessageLoopProxy> io_message_loop_proxy_;
527 525
528 // The message loop of the renderer main thread.
529 // This message loop should be destructed before the RenderThreadImpl
530 // shuts down Blink.
531 scoped_ptr<base::MessageLoop> main_message_loop_;
532
533 // A lazily initiated thread on which file operations are run. 526 // A lazily initiated thread on which file operations are run.
534 scoped_ptr<base::Thread> file_thread_; 527 scoped_ptr<base::Thread> file_thread_;
535 528
536 // May be null if overridden by ContentRendererClient. 529 // May be null if overridden by ContentRendererClient.
537 scoped_ptr<base::Thread> compositor_thread_; 530 scoped_ptr<base::Thread> compositor_thread_;
538 531
539 // Thread for running multimedia operations (e.g., video decoding). 532 // Thread for running multimedia operations (e.g., video decoding).
540 scoped_ptr<base::Thread> media_thread_; 533 scoped_ptr<base::Thread> media_thread_;
541 534
542 // Will point to appropriate MessageLoopProxy after initialization, 535 // Will point to appropriate MessageLoopProxy after initialization,
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
586 bool is_one_copy_enabled_; 579 bool is_one_copy_enabled_;
587 580
588 std::map<int, mojo::MessagePipeHandle> pending_render_frame_connects_; 581 std::map<int, mojo::MessagePipeHandle> pending_render_frame_connects_;
589 582
590 DISALLOW_COPY_AND_ASSIGN(RenderThreadImpl); 583 DISALLOW_COPY_AND_ASSIGN(RenderThreadImpl);
591 }; 584 };
592 585
593 } // namespace content 586 } // namespace content
594 587
595 #endif // CONTENT_RENDERER_RENDER_THREAD_IMPL_H_ 588 #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