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

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

Issue 2649573003: Revert of Move compositor InputHandler from RenderViewImpl to RenderWidget. (Closed)
Patch Set: Created 3 years, 11 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/render_thread_impl.h ('k') | content/renderer/render_view_impl.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 <utility> 10 #include <utility>
(...skipping 575 matching lines...) Expand 10 before | Expand all | Expand 10 after
586 RenderThreadImpl::RenderThreadImpl( 586 RenderThreadImpl::RenderThreadImpl(
587 std::unique_ptr<base::MessageLoop> main_message_loop, 587 std::unique_ptr<base::MessageLoop> main_message_loop,
588 std::unique_ptr<blink::scheduler::RendererScheduler> scheduler) 588 std::unique_ptr<blink::scheduler::RendererScheduler> scheduler)
589 : ChildThreadImpl(Options::Builder() 589 : ChildThreadImpl(Options::Builder()
590 .AutoStartServiceManagerConnection(false) 590 .AutoStartServiceManagerConnection(false)
591 .ConnectToBrowser(true) 591 .ConnectToBrowser(true)
592 .Build()), 592 .Build()),
593 renderer_scheduler_(std::move(scheduler)), 593 renderer_scheduler_(std::move(scheduler)),
594 main_message_loop_(std::move(main_message_loop)), 594 main_message_loop_(std::move(main_message_loop)),
595 categorized_worker_pool_(new CategorizedWorkerPool()), 595 categorized_worker_pool_(new CategorizedWorkerPool()),
596 is_scroll_animator_enabled_(false),
597 renderer_binding_(this) { 596 renderer_binding_(this) {
598 scoped_refptr<base::SingleThreadTaskRunner> test_task_counter; 597 scoped_refptr<base::SingleThreadTaskRunner> test_task_counter;
599 DCHECK(base::CommandLine::ForCurrentProcess()->HasSwitch( 598 DCHECK(base::CommandLine::ForCurrentProcess()->HasSwitch(
600 switches::kRendererClientId)); 599 switches::kRendererClientId));
601 base::StringToInt(base::CommandLine::ForCurrentProcess()->GetSwitchValueASCII( 600 base::StringToInt(base::CommandLine::ForCurrentProcess()->GetSwitchValueASCII(
602 switches::kRendererClientId), 601 switches::kRendererClientId),
603 &client_id_); 602 &client_id_);
604 Init(test_task_counter); 603 Init(test_task_counter);
605 } 604 }
606 605
(...skipping 973 matching lines...) Expand 10 before | Expand all | Expand 10 after
1580 } 1579 }
1581 1580
1582 bool RenderThreadImpl::AreImageDecodeTasksEnabled() { 1581 bool RenderThreadImpl::AreImageDecodeTasksEnabled() {
1583 return are_image_decode_tasks_enabled_; 1582 return are_image_decode_tasks_enabled_;
1584 } 1583 }
1585 1584
1586 bool RenderThreadImpl::IsThreadedAnimationEnabled() { 1585 bool RenderThreadImpl::IsThreadedAnimationEnabled() {
1587 return is_threaded_animation_enabled_; 1586 return is_threaded_animation_enabled_;
1588 } 1587 }
1589 1588
1590 bool RenderThreadImpl::IsScrollAnimatorEnabled() {
1591 return is_scroll_animator_enabled_;
1592 }
1593
1594 void RenderThreadImpl::OnRAILModeChanged(v8::RAILMode rail_mode) { 1589 void RenderThreadImpl::OnRAILModeChanged(v8::RAILMode rail_mode) {
1595 blink::mainThreadIsolate()->SetRAILMode(rail_mode); 1590 blink::mainThreadIsolate()->SetRAILMode(rail_mode);
1596 blink::setRAILModeOnWorkerThreadIsolates(rail_mode); 1591 blink::setRAILModeOnWorkerThreadIsolates(rail_mode);
1597 } 1592 }
1598 1593
1599 bool RenderThreadImpl::IsMainThread() { 1594 bool RenderThreadImpl::IsMainThread() {
1600 return !!current(); 1595 return !!current();
1601 } 1596 }
1602 1597
1603 void RenderThreadImpl::OnChannelError() { 1598 void RenderThreadImpl::OnChannelError() {
(...skipping 455 matching lines...) Expand 10 before | Expand all | Expand 10 after
2059 gpu::GpuChannelHost* RenderThreadImpl::GetGpuChannel() { 2054 gpu::GpuChannelHost* RenderThreadImpl::GetGpuChannel() {
2060 if (!gpu_channel_) 2055 if (!gpu_channel_)
2061 return nullptr; 2056 return nullptr;
2062 if (gpu_channel_->IsLost()) 2057 if (gpu_channel_->IsLost())
2063 return nullptr; 2058 return nullptr;
2064 return gpu_channel_.get(); 2059 return gpu_channel_.get();
2065 } 2060 }
2066 2061
2067 void RenderThreadImpl::CreateView(mojom::CreateViewParamsPtr params) { 2062 void RenderThreadImpl::CreateView(mojom::CreateViewParamsPtr params) {
2068 CompositorDependencies* compositor_deps = this; 2063 CompositorDependencies* compositor_deps = this;
2069 is_scroll_animator_enabled_ = params->web_preferences.enable_scroll_animator;
2070 // When bringing in render_view, also bring in webkit's glue and jsbindings. 2064 // When bringing in render_view, also bring in webkit's glue and jsbindings.
2071 RenderViewImpl::Create(compositor_deps, *params, 2065 RenderViewImpl::Create(compositor_deps, *params,
2072 RenderWidget::ShowCallback()); 2066 RenderWidget::ShowCallback());
2073 } 2067 }
2074 2068
2075 void RenderThreadImpl::CreateFrame(mojom::CreateFrameParamsPtr params) { 2069 void RenderThreadImpl::CreateFrame(mojom::CreateFrameParamsPtr params) {
2076 // Debug cases of https://crbug.com/626802. 2070 // Debug cases of https://crbug.com/626802.
2077 base::debug::SetCrashKeyValue("newframe_routing_id", 2071 base::debug::SetCrashKeyValue("newframe_routing_id",
2078 base::IntToString(params->routing_id)); 2072 base::IntToString(params->routing_id));
2079 base::debug::SetCrashKeyValue("newframe_proxy_id", 2073 base::debug::SetCrashKeyValue("newframe_proxy_id",
(...skipping 355 matching lines...) Expand 10 before | Expand all | Expand 10 after
2435 } 2429 }
2436 } 2430 }
2437 2431
2438 void RenderThreadImpl::OnRendererInterfaceRequest( 2432 void RenderThreadImpl::OnRendererInterfaceRequest(
2439 mojom::RendererAssociatedRequest request) { 2433 mojom::RendererAssociatedRequest request) {
2440 DCHECK(!renderer_binding_.is_bound()); 2434 DCHECK(!renderer_binding_.is_bound());
2441 renderer_binding_.Bind(std::move(request)); 2435 renderer_binding_.Bind(std::move(request));
2442 } 2436 }
2443 2437
2444 } // namespace content 2438 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/render_thread_impl.h ('k') | content/renderer/render_view_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698