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

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

Issue 9667012: Fix --single-process mode issues with GpuChannelHostFactory (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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 | Annotate | Revision Log
« no previous file with comments | « content/common/webkitplatformsupport_impl.cc ('k') | content/renderer/render_view_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 #include "content/renderer/render_thread_impl.h" 5 #include "content/renderer/render_thread_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <limits> 8 #include <limits>
9 #include <map> 9 #include <map>
10 #include <vector> 10 #include <vector>
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
176 176
177 void RenderThreadImpl::Init() { 177 void RenderThreadImpl::Init() {
178 TRACE_EVENT_BEGIN_ETW("RenderThreadImpl::Init", 0, ""); 178 TRACE_EVENT_BEGIN_ETW("RenderThreadImpl::Init", 0, "");
179 179
180 #if defined(OS_MACOSX) || defined(OS_ANDROID) 180 #if defined(OS_MACOSX) || defined(OS_ANDROID)
181 // On Mac and Android, the select popups are rendered by the browser. 181 // On Mac and Android, the select popups are rendered by the browser.
182 WebKit::WebView::setUseExternalPopupMenus(true); 182 WebKit::WebView::setUseExternalPopupMenus(true);
183 #endif 183 #endif
184 184
185 lazy_tls.Pointer()->Set(this); 185 lazy_tls.Pointer()->Set(this);
186 GpuChannelHostFactory::set_instance(this);
187 186
188 #if defined(OS_WIN) 187 #if defined(OS_WIN)
189 // If you are running plugins in this thread you need COM active but in 188 // If you are running plugins in this thread you need COM active but in
190 // the normal case you don't. 189 // the normal case you don't.
191 if (RenderProcessImpl::InProcessPlugins()) 190 if (RenderProcessImpl::InProcessPlugins())
192 initialize_com_.reset(new base::win::ScopedCOMInitializer()); 191 initialize_com_.reset(new base::win::ScopedCOMInitializer());
193 #endif 192 #endif
194 193
195 // Register this object as the main thread. 194 // Register this object as the main thread.
196 ChildProcess::current()->set_main_thread(this); 195 ChildProcess::current()->set_main_thread(this);
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
272 } 271 }
273 #endif 272 #endif
274 if (compositor_thread_.get()) { 273 if (compositor_thread_.get()) {
275 RemoveFilter(compositor_thread_->GetMessageFilter()); 274 RemoveFilter(compositor_thread_->GetMessageFilter());
276 compositor_thread_.reset(); 275 compositor_thread_.reset();
277 } 276 }
278 277
279 if (webkit_platform_support_.get()) 278 if (webkit_platform_support_.get())
280 WebKit::shutdown(); 279 WebKit::shutdown();
281 280
282 GpuChannelHostFactory::set_instance(NULL);
283 lazy_tls.Pointer()->Set(NULL); 281 lazy_tls.Pointer()->Set(NULL);
284 282
285 // TODO(port) 283 // TODO(port)
286 #if defined(OS_WIN) 284 #if defined(OS_WIN)
287 // Clean up plugin channels before this thread goes away. 285 // Clean up plugin channels before this thread goes away.
288 NPChannelBase::CleanupChannels(); 286 NPChannelBase::CleanupChannels();
289 #endif 287 #endif
290 } 288 }
291 289
292 bool RenderThreadImpl::Send(IPC::Message* msg) { 290 bool RenderThreadImpl::Send(IPC::Message* msg) {
(...skipping 666 matching lines...) Expand 10 before | Expand all | Expand 10 after
959 957
960 scoped_refptr<base::MessageLoopProxy> 958 scoped_refptr<base::MessageLoopProxy>
961 RenderThreadImpl::GetFileThreadMessageLoopProxy() { 959 RenderThreadImpl::GetFileThreadMessageLoopProxy() {
962 DCHECK(message_loop() == MessageLoop::current()); 960 DCHECK(message_loop() == MessageLoop::current());
963 if (!file_thread_.get()) { 961 if (!file_thread_.get()) {
964 file_thread_.reset(new base::Thread("Renderer::FILE")); 962 file_thread_.reset(new base::Thread("Renderer::FILE"));
965 file_thread_->Start(); 963 file_thread_->Start();
966 } 964 }
967 return file_thread_->message_loop_proxy(); 965 return file_thread_->message_loop_proxy();
968 } 966 }
OLDNEW
« no previous file with comments | « content/common/webkitplatformsupport_impl.cc ('k') | content/renderer/render_view_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698