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

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

Issue 9633014: Remove dead code left over from old-style WebCompositor initialization path. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: patch for landing 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/renderer/gpu/compositor_thread.cc ('k') | content/renderer/render_widget.h » ('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 249 matching lines...) Expand 10 before | Expand all | Expand 10 after
260 260
261 RemoveFilter(vc_manager_->video_capture_message_filter()); 261 RemoveFilter(vc_manager_->video_capture_message_filter());
262 262
263 RemoveFilter(db_message_filter_.get()); 263 RemoveFilter(db_message_filter_.get());
264 db_message_filter_ = NULL; 264 db_message_filter_ = NULL;
265 265
266 // Shutdown the file thread if it's running. 266 // Shutdown the file thread if it's running.
267 if (file_thread_.get()) 267 if (file_thread_.get())
268 file_thread_->Stop(); 268 file_thread_->Stop();
269 269
270 #ifdef WEBCOMPOSITOR_HAS_INITIALIZE
271 if (compositor_initialized_) { 270 if (compositor_initialized_) {
272 WebKit::WebCompositor::shutdown(); 271 WebKit::WebCompositor::shutdown();
273 compositor_initialized_ = false; 272 compositor_initialized_ = false;
274 } 273 }
275 #endif
276 if (compositor_thread_.get()) { 274 if (compositor_thread_.get()) {
277 RemoveFilter(compositor_thread_->GetMessageFilter()); 275 RemoveFilter(compositor_thread_->GetMessageFilter());
278 compositor_thread_.reset(); 276 compositor_thread_.reset();
279 } 277 }
280 278
281 if (webkit_platform_support_.get()) 279 if (webkit_platform_support_.get())
282 WebKit::shutdown(); 280 WebKit::shutdown();
283 281
284 lazy_tls.Pointer()->Set(NULL); 282 lazy_tls.Pointer()->Set(NULL);
285 283
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after
458 v8::V8::SetCreateHistogramFunction(CreateHistogram); 456 v8::V8::SetCreateHistogramFunction(CreateHistogram);
459 v8::V8::SetAddHistogramSampleFunction(AddHistogramSample); 457 v8::V8::SetAddHistogramSampleFunction(AddHistogramSample);
460 458
461 webkit_platform_support_.reset(new RendererWebKitPlatformSupportImpl); 459 webkit_platform_support_.reset(new RendererWebKitPlatformSupportImpl);
462 WebKit::initialize(webkit_platform_support_.get()); 460 WebKit::initialize(webkit_platform_support_.get());
463 461
464 if (CommandLine::ForCurrentProcess()->HasSwitch( 462 if (CommandLine::ForCurrentProcess()->HasSwitch(
465 switches::kEnableThreadedCompositing)) { 463 switches::kEnableThreadedCompositing)) {
466 compositor_thread_.reset(new CompositorThread(this)); 464 compositor_thread_.reset(new CompositorThread(this));
467 AddFilter(compositor_thread_->GetMessageFilter()); 465 AddFilter(compositor_thread_->GetMessageFilter());
468 #ifdef WEBCOMPOSITOR_HAS_INITIALIZE
469 WebKit::WebCompositor::initialize(compositor_thread_->GetWebThread()); 466 WebKit::WebCompositor::initialize(compositor_thread_->GetWebThread());
470 #else 467 } else
471 WebKit::WebCompositor::setThread(compositor_thread_->GetWebThread());
472 #endif
473 } else {
474 #ifdef WEBCOMPOSITOR_HAS_INITIALIZE
475 WebKit::WebCompositor::initialize(NULL); 468 WebKit::WebCompositor::initialize(NULL);
476 #endif
477 }
478 compositor_initialized_ = true; 469 compositor_initialized_ = true;
479 470
480 WebScriptController::enableV8SingleThreadMode(); 471 WebScriptController::enableV8SingleThreadMode();
481 472
482 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); 473 const CommandLine& command_line = *CommandLine::ForCurrentProcess();
483 474
484 webkit_glue::EnableWebCoreLogChannels( 475 webkit_glue::EnableWebCoreLogChannels(
485 command_line.GetSwitchValueASCII(switches::kWebCoreLogChannels)); 476 command_line.GetSwitchValueASCII(switches::kWebCoreLogChannels));
486 477
487 if (command_line.HasSwitch(switches::kPlaybackMode) || 478 if (command_line.HasSwitch(switches::kPlaybackMode) ||
(...skipping 485 matching lines...) Expand 10 before | Expand all | Expand 10 after
973 964
974 scoped_refptr<base::MessageLoopProxy> 965 scoped_refptr<base::MessageLoopProxy>
975 RenderThreadImpl::GetFileThreadMessageLoopProxy() { 966 RenderThreadImpl::GetFileThreadMessageLoopProxy() {
976 DCHECK(message_loop() == MessageLoop::current()); 967 DCHECK(message_loop() == MessageLoop::current());
977 if (!file_thread_.get()) { 968 if (!file_thread_.get()) {
978 file_thread_.reset(new base::Thread("Renderer::FILE")); 969 file_thread_.reset(new base::Thread("Renderer::FILE"));
979 file_thread_->Start(); 970 file_thread_->Start();
980 } 971 }
981 return file_thread_->message_loop_proxy(); 972 return file_thread_->message_loop_proxy();
982 } 973 }
OLDNEW
« no previous file with comments | « content/renderer/gpu/compositor_thread.cc ('k') | content/renderer/render_widget.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698