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

Side by Side Diff: content/browser/renderer_host/render_widget_host_input_event_router.cc

Issue 2207993002: Remove DumpWithoutCrashing in RouteGestureEvent. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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 | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "base/debug/dump_without_crashing.h"
8 #include "cc/quads/surface_draw_quad.h" 7 #include "cc/quads/surface_draw_quad.h"
9 #include "cc/surfaces/surface_id_allocator.h" 8 #include "cc/surfaces/surface_id_allocator.h"
10 #include "cc/surfaces/surface_manager.h" 9 #include "cc/surfaces/surface_manager.h"
11 #include "content/browser/renderer_host/render_widget_host_view_base.h" 10 #include "content/browser/renderer_host/render_widget_host_view_base.h"
12 #include "content/common/frame_messages.h" 11 #include "content/common/frame_messages.h"
13 #include "third_party/WebKit/public/web/WebInputEvent.h" 12 #include "third_party/WebKit/public/web/WebInputEvent.h"
14 13
15 namespace { 14 namespace {
16 15
17 void TransformEventTouchPositions(blink::WebTouchEvent* event, 16 void TransformEventTouchPositions(blink::WebTouchEvent* event,
(...skipping 381 matching lines...) Expand 10 before | Expand all | Expand 10 after
399 // means the GestureFlingCancel that always comes between ET_GESTURE_BEGIN and 398 // means the GestureFlingCancel that always comes between ET_GESTURE_BEGIN and
400 // GestureTapDown is sent to the previous target, in case it is still in a 399 // GestureTapDown is sent to the previous target, in case it is still in a
401 // fling. 400 // fling.
402 if (event->type == blink::WebInputEvent::GestureTapDown) { 401 if (event->type == blink::WebInputEvent::GestureTapDown) {
403 if (touchscreen_gesture_target_queue_.empty()) { 402 if (touchscreen_gesture_target_queue_.empty()) {
404 LOG(ERROR) << "Gesture sequence start detected with no target available."; 403 LOG(ERROR) << "Gesture sequence start detected with no target available.";
405 // Ignore this gesture sequence as no target is available. 404 // Ignore this gesture sequence as no target is available.
406 // TODO(wjmaclean): this only happens on Windows, and should not happen. 405 // TODO(wjmaclean): this only happens on Windows, and should not happen.
407 // https://crbug.com/595422 406 // https://crbug.com/595422
408 touchscreen_gesture_target_.target = nullptr; 407 touchscreen_gesture_target_.target = nullptr;
409 base::debug::DumpWithoutCrashing();
410 return; 408 return;
411 } 409 }
412 410
413 touchscreen_gesture_target_ = touchscreen_gesture_target_queue_.front(); 411 touchscreen_gesture_target_ = touchscreen_gesture_target_queue_.front();
414 touchscreen_gesture_target_queue_.pop_front(); 412 touchscreen_gesture_target_queue_.pop_front();
415 413
416 // Abort any scroll bubbling in progress to avoid double entry. 414 // Abort any scroll bubbling in progress to avoid double entry.
417 if (touchscreen_gesture_target_.target && 415 if (touchscreen_gesture_target_.target &&
418 touchscreen_gesture_target_.target == 416 touchscreen_gesture_target_.target ==
419 bubbling_gesture_scroll_target_.target) { 417 bubbling_gesture_scroll_target_.target) {
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
464 if (!touchpad_gesture_target_.target) 462 if (!touchpad_gesture_target_.target)
465 return; 463 return;
466 464
467 // TODO(mohsen): Add tests to check event location. 465 // TODO(mohsen): Add tests to check event location.
468 event->x += touchpad_gesture_target_.delta.x(); 466 event->x += touchpad_gesture_target_.delta.x();
469 event->y += touchpad_gesture_target_.delta.y(); 467 event->y += touchpad_gesture_target_.delta.y();
470 touchpad_gesture_target_.target->ProcessGestureEvent(*event, latency); 468 touchpad_gesture_target_.target->ProcessGestureEvent(*event, latency);
471 } 469 }
472 470
473 } // namespace content 471 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698