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

Side by Side Diff: content/browser/renderer_host/render_widget_host_input_event_router.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
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 "content/browser/renderer_host/render_widget_host_input_event_router.h" 5 #include "content/browser/renderer_host/render_widget_host_input_event_router.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/metrics/histogram_macros.h" 9 #include "base/metrics/histogram_macros.h"
10 10
(...skipping 341 matching lines...) Expand 10 before | Expand all | Expand 10 after
352 break; 352 break;
353 } 353 }
354 case blink::WebInputEvent::TouchMove: 354 case blink::WebInputEvent::TouchMove:
355 if (touch_target_.target) { 355 if (touch_target_.target) {
356 TransformEventTouchPositions(event, touch_target_.delta); 356 TransformEventTouchPositions(event, touch_target_.delta);
357 touch_target_.target->ProcessTouchEvent(*event, latency); 357 touch_target_.target->ProcessTouchEvent(*event, latency);
358 } 358 }
359 break; 359 break;
360 case blink::WebInputEvent::TouchEnd: 360 case blink::WebInputEvent::TouchEnd:
361 case blink::WebInputEvent::TouchCancel: 361 case blink::WebInputEvent::TouchCancel:
362 // It might be safer to test active_touches_ and only decrement it if it's
363 // non-zero, since active_touches_ can be reset to 0 in
364 // OnRenderWidgetHostViewBaseDestroyed, and this can happen between the
365 // TouchStart and a subsequent TouchMove/End/Cancel.
366 DCHECK(active_touches_); 362 DCHECK(active_touches_);
367 active_touches_ -= CountChangedTouchPoints(*event); 363 active_touches_ -= CountChangedTouchPoints(*event);
368 if (!touch_target_.target) 364 if (!touch_target_.target)
369 return; 365 return;
370 366
371 TransformEventTouchPositions(event, touch_target_.delta); 367 TransformEventTouchPositions(event, touch_target_.delta);
372 touch_target_.target->ProcessTouchEvent(*event, latency); 368 touch_target_.target->ProcessTouchEvent(*event, latency);
373 if (!active_touches_) 369 if (!active_touches_)
374 touch_target_.target = nullptr; 370 touch_target_.target = nullptr;
375 break; 371 break;
(...skipping 403 matching lines...) Expand 10 before | Expand all | Expand 10 after
779 if (!touchpad_gesture_target_.target) 775 if (!touchpad_gesture_target_.target)
780 return; 776 return;
781 777
782 // TODO(mohsen): Add tests to check event location. 778 // TODO(mohsen): Add tests to check event location.
783 event->x += touchpad_gesture_target_.delta.x(); 779 event->x += touchpad_gesture_target_.delta.x();
784 event->y += touchpad_gesture_target_.delta.y(); 780 event->y += touchpad_gesture_target_.delta.y();
785 touchpad_gesture_target_.target->ProcessGestureEvent(*event, latency); 781 touchpad_gesture_target_.target->ProcessGestureEvent(*event, latency);
786 } 782 }
787 783
788 } // namespace content 784 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/renderer_host/input/input_router_impl.h ('k') | content/browser/site_per_process_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698