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

Side by Side Diff: components/html_viewer/touch_handler.cc

Issue 1645613007: Redefined the bit WebTouchEvent.causesScrollingIfUncanceled. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed an aura unittest. Created 4 years, 10 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "components/html_viewer/touch_handler.h" 5 #include "components/html_viewer/touch_handler.h"
6 6
7 #include "components/mus/public/interfaces/input_events.mojom.h" 7 #include "components/mus/public/interfaces/input_events.mojom.h"
8 #include "third_party/WebKit/public/web/WebInputEvent.h" 8 #include "third_party/WebKit/public/web/WebInputEvent.h"
9 #include "third_party/WebKit/public/web/WebWidget.h" 9 #include "third_party/WebKit/public/web/WebWidget.h"
10 #include "ui/events/base_event_utils.h" 10 #include "ui/events/base_event_utils.h"
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
175 return false; 175 return false;
176 } 176 }
177 177
178 void TouchHandler::SendMotionEventToGestureProvider() { 178 void TouchHandler::SendMotionEventToGestureProvider() {
179 ui::FilteredGestureProvider::TouchHandlingResult result = 179 ui::FilteredGestureProvider::TouchHandlingResult result =
180 gesture_provider_.OnTouchEvent(*current_motion_event_); 180 gesture_provider_.OnTouchEvent(*current_motion_event_);
181 if (!result.succeeded) 181 if (!result.succeeded)
182 return; 182 return;
183 183
184 blink::WebTouchEvent web_event = ui::CreateWebTouchEventFromMotionEvent( 184 blink::WebTouchEvent web_event = ui::CreateWebTouchEventFromMotionEvent(
185 *current_motion_event_, result.did_generate_scroll); 185 *current_motion_event_, result.moved_beyond_slop_region);
186 gesture_provider_.OnTouchEventAck(web_event.uniqueTouchEventId, 186 gesture_provider_.OnTouchEventAck(web_event.uniqueTouchEventId,
187 web_widget_->handleInputEvent(web_event) != 187 web_widget_->handleInputEvent(web_event) !=
188 blink::WebInputEventResult::NotHandled); 188 blink::WebInputEventResult::NotHandled);
189 } 189 }
190 190
191 void TouchHandler::PostProcessMotionEvent(const mus::mojom::Event& event) { 191 void TouchHandler::PostProcessMotionEvent(const mus::mojom::Event& event) {
192 switch (event.action) { 192 switch (event.action) {
193 case mus::mojom::EventType::POINTER_UP: { 193 case mus::mojom::EventType::POINTER_UP: {
194 if (event.pointer_data) { 194 if (event.pointer_data) {
195 const int index = current_motion_event_->FindPointerIndexOfId( 195 const int index = current_motion_event_->FindPointerIndexOfId(
196 event.pointer_data->pointer_id); 196 event.pointer_data->pointer_id);
197 current_motion_event_->RemovePointerAt(index); 197 current_motion_event_->RemovePointerAt(index);
198 } 198 }
199 if (current_motion_event_->GetPointerCount() == 0) 199 if (current_motion_event_->GetPointerCount() == 0)
200 current_motion_event_.reset(); 200 current_motion_event_.reset();
201 break; 201 break;
202 } 202 }
203 203
204 case mus::mojom::EventType::POINTER_CANCEL: 204 case mus::mojom::EventType::POINTER_CANCEL:
205 current_motion_event_.reset(); 205 current_motion_event_.reset();
206 break; 206 break;
207 207
208 default: 208 default:
209 break; 209 break;
210 } 210 }
211 } 211 }
212 212
213 } // namespace html_viewer 213 } // namespace html_viewer
OLDNEW
« no previous file with comments | « blimp/client/feature/compositor/blimp_input_manager.cc ('k') | components/test_runner/event_sender.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698