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

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

Issue 2854683002: Send a GSB to main thread before switching to it in the middle of scrolling. (Closed)
Patch Set: Created 3 years, 7 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/input/input_handler_wrapper.h ('k') | ui/events/blink/input_handler_proxy.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 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_features.h" 9 #include "content/public/common/content_features.h"
10 #include "content/public/common/content_switches.h" 10 #include "content/public/common/content_switches.h"
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 } 83 }
84 84
85 void InputHandlerWrapper::DidStopFlinging() { 85 void InputHandlerWrapper::DidStopFlinging() {
86 input_handler_manager_->DidStopFlinging(routing_id_); 86 input_handler_manager_->DidStopFlinging(routing_id_);
87 } 87 }
88 88
89 void InputHandlerWrapper::DidAnimateForInput() { 89 void InputHandlerWrapper::DidAnimateForInput() {
90 input_handler_manager_->DidAnimateForInput(); 90 input_handler_manager_->DidAnimateForInput();
91 } 91 }
92 92
93 void InputHandlerWrapper::GenerateScrollBeginAndSendToMainThread(
94 const blink::WebGestureEvent& update_event) {
95 DCHECK_EQ(update_event.GetType(), blink::WebInputEvent::kGestureScrollUpdate);
96 blink::WebGestureEvent scroll_begin(update_event);
97 scroll_begin.SetType(blink::WebInputEvent::kGestureScrollBegin);
98 scroll_begin.data.scroll_begin.inertial_phase =
99 update_event.data.scroll_update.inertial_phase;
100 scroll_begin.data.scroll_begin.delta_x_hint =
101 update_event.data.scroll_update.delta_x;
102 scroll_begin.data.scroll_begin.delta_y_hint =
103 update_event.data.scroll_update.delta_y;
104 scroll_begin.data.scroll_begin.delta_hint_units =
105 update_event.data.scroll_update.delta_units;
106
107 DispatchNonBlockingEventToMainThread(
108 ui::WebInputEventTraits::Clone(scroll_begin), ui::LatencyInfo());
109 }
110
93 } // namespace content 111 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/input/input_handler_wrapper.h ('k') | ui/events/blink/input_handler_proxy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698