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

Side by Side Diff: content/renderer/input/input_handler_wrapper.cc

Issue 2417783005: [Master/Overview CL] Make PageScaleFactor work for oopif subframe.
Patch Set: Rebase to master@{#429656}. Created 4 years, 1 month 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/input/input_handler_wrapper.h ('k') | content/renderer/render_frame_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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/input/input_handler_wrapper.h" 5 #include "content/renderer/input/input_handler_wrapper.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/location.h" 8 #include "base/location.h"
9 #include "content/public/common/content_switches.h" 9 #include "content/public/common/content_switches.h"
10 #include "content/renderer/input/input_event_filter.h" 10 #include "content/renderer/input/input_event_filter.h"
11 #include "content/renderer/input/input_handler_manager.h" 11 #include "content/renderer/input/input_handler_manager.h"
12 #include "third_party/WebKit/public/platform/Platform.h" 12 #include "third_party/WebKit/public/platform/Platform.h"
13 #include "ui/events/blink/did_overscroll_params.h" 13 #include "ui/events/blink/did_overscroll_params.h"
14 14
15 namespace content { 15 namespace content {
16 16
17 InputHandlerWrapper::InputHandlerWrapper( 17 InputHandlerWrapper::InputHandlerWrapper(
18 InputHandlerManager* input_handler_manager, 18 InputHandlerManager* input_handler_manager,
19 int routing_id, 19 int routing_id,
20 const scoped_refptr<base::SingleThreadTaskRunner>& main_task_runner, 20 const scoped_refptr<base::SingleThreadTaskRunner>& main_task_runner,
21 const base::WeakPtr<cc::InputHandler>& input_handler, 21 const base::WeakPtr<cc::InputHandler>& input_handler,
22 const base::WeakPtr<RenderViewImpl>& render_view_impl, 22 const base::WeakPtr<RenderWidget>& render_widget,
23 bool enable_smooth_scrolling) 23 bool enable_smooth_scrolling)
24 : input_handler_manager_(input_handler_manager), 24 : input_handler_manager_(input_handler_manager),
25 routing_id_(routing_id), 25 routing_id_(routing_id),
26 input_handler_proxy_(input_handler.get(), this), 26 input_handler_proxy_(input_handler.get(), this),
27 main_task_runner_(main_task_runner), 27 main_task_runner_(main_task_runner),
28 render_view_impl_(render_view_impl) { 28 render_widget_(render_widget) {
29 DCHECK(input_handler); 29 DCHECK(input_handler);
30 input_handler_proxy_.set_smooth_scroll_enabled(enable_smooth_scrolling); 30 input_handler_proxy_.set_smooth_scroll_enabled(enable_smooth_scrolling);
31 } 31 }
32 32
33 InputHandlerWrapper::~InputHandlerWrapper() { 33 InputHandlerWrapper::~InputHandlerWrapper() {
34 } 34 }
35 35
36 void InputHandlerWrapper::NeedsMainFrame() { 36 void InputHandlerWrapper::NeedsMainFrame() {
37 main_task_runner_->PostTask( 37 main_task_runner_->PostTask(
38 FROM_HERE, 38 FROM_HERE,
39 base::Bind(&RenderViewImpl::SetNeedsMainFrame, render_view_impl_)); 39 base::Bind(&RenderWidget::SetNeedsMainFrame, render_widget_));
40 } 40 }
41 41
42 void InputHandlerWrapper::TransferActiveWheelFlingAnimation( 42 void InputHandlerWrapper::TransferActiveWheelFlingAnimation(
43 const blink::WebActiveWheelFlingParameters& params) { 43 const blink::WebActiveWheelFlingParameters& params) {
44 main_task_runner_->PostTask( 44 main_task_runner_->PostTask(
45 FROM_HERE, base::Bind(&RenderViewImpl::TransferActiveWheelFlingAnimation, 45 FROM_HERE, base::Bind(&RenderWidget::TransferActiveWheelFlingAnimation,
46 render_view_impl_, params)); 46 render_widget_, params));
47 } 47 }
48 48
49 void InputHandlerWrapper::DispatchNonBlockingEventToMainThread( 49 void InputHandlerWrapper::DispatchNonBlockingEventToMainThread(
50 ui::ScopedWebInputEvent event, 50 ui::ScopedWebInputEvent event,
51 const ui::LatencyInfo& latency_info) { 51 const ui::LatencyInfo& latency_info) {
52 input_handler_manager_->DispatchNonBlockingEventToMainThread( 52 input_handler_manager_->DispatchNonBlockingEventToMainThread(
53 routing_id_, std::move(event), latency_info); 53 routing_id_, std::move(event), latency_info);
54 } 54 }
55 55
56 void InputHandlerWrapper::WillShutdown() { 56 void InputHandlerWrapper::WillShutdown() {
(...skipping 28 matching lines...) Expand all
85 85
86 void InputHandlerWrapper::DidStopFlinging() { 86 void InputHandlerWrapper::DidStopFlinging() {
87 input_handler_manager_->DidStopFlinging(routing_id_); 87 input_handler_manager_->DidStopFlinging(routing_id_);
88 } 88 }
89 89
90 void InputHandlerWrapper::DidAnimateForInput() { 90 void InputHandlerWrapper::DidAnimateForInput() {
91 input_handler_manager_->DidAnimateForInput(); 91 input_handler_manager_->DidAnimateForInput();
92 } 92 }
93 93
94 } // namespace content 94 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/input/input_handler_wrapper.h ('k') | content/renderer/render_frame_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698