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

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

Issue 2479663002: Move compositor InputHandler from RenderViewImpl to RenderWidget. (Closed)
Patch Set: Account for the fact that OOPIF subframes don't have an InnerViewportScrollLayer. 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
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 606 matching lines...) Expand 10 before | Expand all | Expand 10 after
617 RenderThreadImpl::RenderThreadImpl( 617 RenderThreadImpl::RenderThreadImpl(
618 std::unique_ptr<base::MessageLoop> main_message_loop, 618 std::unique_ptr<base::MessageLoop> main_message_loop,
619 std::unique_ptr<blink::scheduler::RendererScheduler> scheduler) 619 std::unique_ptr<blink::scheduler::RendererScheduler> scheduler)
620 : ChildThreadImpl(Options::Builder() 620 : ChildThreadImpl(Options::Builder()
621 .AutoStartServiceManagerConnection(false) 621 .AutoStartServiceManagerConnection(false)
622 .ConnectToBrowser(true) 622 .ConnectToBrowser(true)
623 .Build()), 623 .Build()),
624 renderer_scheduler_(std::move(scheduler)), 624 renderer_scheduler_(std::move(scheduler)),
625 main_message_loop_(std::move(main_message_loop)), 625 main_message_loop_(std::move(main_message_loop)),
626 categorized_worker_pool_(new CategorizedWorkerPool()), 626 categorized_worker_pool_(new CategorizedWorkerPool()),
627 is_scroll_animator_enabled_(false),
627 renderer_binding_(this) { 628 renderer_binding_(this) {
628 scoped_refptr<base::SingleThreadTaskRunner> test_task_counter; 629 scoped_refptr<base::SingleThreadTaskRunner> test_task_counter;
629 DCHECK(base::CommandLine::ForCurrentProcess()->HasSwitch( 630 DCHECK(base::CommandLine::ForCurrentProcess()->HasSwitch(
630 switches::kRendererClientId)); 631 switches::kRendererClientId));
631 base::StringToInt(base::CommandLine::ForCurrentProcess()->GetSwitchValueASCII( 632 base::StringToInt(base::CommandLine::ForCurrentProcess()->GetSwitchValueASCII(
632 switches::kRendererClientId), 633 switches::kRendererClientId),
633 &client_id_); 634 &client_id_);
634 Init(test_task_counter); 635 Init(test_task_counter);
635 } 636 }
636 637
(...skipping 969 matching lines...) Expand 10 before | Expand all | Expand 10 after
1606 } 1607 }
1607 1608
1608 bool RenderThreadImpl::AreImageDecodeTasksEnabled() { 1609 bool RenderThreadImpl::AreImageDecodeTasksEnabled() {
1609 return are_image_decode_tasks_enabled_; 1610 return are_image_decode_tasks_enabled_;
1610 } 1611 }
1611 1612
1612 bool RenderThreadImpl::IsThreadedAnimationEnabled() { 1613 bool RenderThreadImpl::IsThreadedAnimationEnabled() {
1613 return is_threaded_animation_enabled_; 1614 return is_threaded_animation_enabled_;
1614 } 1615 }
1615 1616
1617 bool RenderThreadImpl::IsScrollAnimatorEnabled() {
1618 return is_scroll_animator_enabled_;
1619 }
1620
1616 void RenderThreadImpl::OnRAILModeChanged(v8::RAILMode rail_mode) { 1621 void RenderThreadImpl::OnRAILModeChanged(v8::RAILMode rail_mode) {
1617 blink::mainThreadIsolate()->SetRAILMode(rail_mode); 1622 blink::mainThreadIsolate()->SetRAILMode(rail_mode);
1618 blink::setRAILModeOnWorkerThreadIsolates(rail_mode); 1623 blink::setRAILModeOnWorkerThreadIsolates(rail_mode);
1619 } 1624 }
1620 1625
1621 bool RenderThreadImpl::IsMainThread() { 1626 bool RenderThreadImpl::IsMainThread() {
1622 return !!current(); 1627 return !!current();
1623 } 1628 }
1624 1629
1625 void RenderThreadImpl::OnChannelError() { 1630 void RenderThreadImpl::OnChannelError() {
(...skipping 401 matching lines...) Expand 10 before | Expand all | Expand 10 after
2027 gpu::GpuChannelHost* RenderThreadImpl::GetGpuChannel() { 2032 gpu::GpuChannelHost* RenderThreadImpl::GetGpuChannel() {
2028 if (!gpu_channel_) 2033 if (!gpu_channel_)
2029 return nullptr; 2034 return nullptr;
2030 if (gpu_channel_->IsLost()) 2035 if (gpu_channel_->IsLost())
2031 return nullptr; 2036 return nullptr;
2032 return gpu_channel_.get(); 2037 return gpu_channel_.get();
2033 } 2038 }
2034 2039
2035 void RenderThreadImpl::CreateView(mojom::CreateViewParamsPtr params) { 2040 void RenderThreadImpl::CreateView(mojom::CreateViewParamsPtr params) {
2036 CompositorDependencies* compositor_deps = this; 2041 CompositorDependencies* compositor_deps = this;
2042 is_scroll_animator_enabled_ = params->web_preferences.enable_scroll_animator;
2037 // When bringing in render_view, also bring in webkit's glue and jsbindings. 2043 // When bringing in render_view, also bring in webkit's glue and jsbindings.
2038 RenderViewImpl::Create(compositor_deps, *params, 2044 RenderViewImpl::Create(compositor_deps, *params,
2039 RenderWidget::ShowCallback()); 2045 RenderWidget::ShowCallback());
2040 } 2046 }
2041 2047
2042 void RenderThreadImpl::CreateFrame(mojom::CreateFrameParamsPtr params) { 2048 void RenderThreadImpl::CreateFrame(mojom::CreateFrameParamsPtr params) {
2043 // Debug cases of https://crbug.com/626802. 2049 // Debug cases of https://crbug.com/626802.
2044 base::debug::SetCrashKeyValue("newframe_routing_id", 2050 base::debug::SetCrashKeyValue("newframe_routing_id",
2045 base::IntToString(params->routing_id)); 2051 base::IntToString(params->routing_id));
2046 base::debug::SetCrashKeyValue("newframe_proxy_id", 2052 base::debug::SetCrashKeyValue("newframe_proxy_id",
(...skipping 374 matching lines...) Expand 10 before | Expand all | Expand 10 after
2421 } 2427 }
2422 } 2428 }
2423 2429
2424 void RenderThreadImpl::OnRendererInterfaceRequest( 2430 void RenderThreadImpl::OnRendererInterfaceRequest(
2425 mojom::RendererAssociatedRequest request) { 2431 mojom::RendererAssociatedRequest request) {
2426 DCHECK(!renderer_binding_.is_bound()); 2432 DCHECK(!renderer_binding_.is_bound());
2427 renderer_binding_.Bind(std::move(request)); 2433 renderer_binding_.Bind(std::move(request));
2428 } 2434 }
2429 2435
2430 } // namespace content 2436 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698