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

Side by Side Diff: content/browser/renderer_host/input/touch_event_queue.cc

Issue 2683283003: Fix compile failure on Mac and Linux for build 57.0.2987.42 (Closed)
Patch Set: Created 3 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
« 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 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/browser/renderer_host/input/touch_event_queue.h" 5 #include "content/browser/renderer_host/input/touch_event_queue.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/auto_reset.h" 9 #include "base/auto_reset.h"
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 10 matching lines...) Expand all
21 using blink::WebTouchPoint; 21 using blink::WebTouchPoint;
22 using ui::LatencyInfo; 22 using ui::LatencyInfo;
23 23
24 namespace content { 24 namespace content {
25 namespace { 25 namespace {
26 26
27 // Time interval at which touchmove events will be forwarded to the client while 27 // Time interval at which touchmove events will be forwarded to the client while
28 // scrolling is active and possible. 28 // scrolling is active and possible.
29 const double kAsyncTouchMoveIntervalSec = .2; 29 const double kAsyncTouchMoveIntervalSec = .2;
30 30
31 // A sanity check on touches received to ensure that touch movement outside
32 // the platform slop region will cause scrolling.
33 const double kMaxConceivablePlatformSlopRegionLengthDipsSquared = 60. * 60.;
34
35 TouchEventWithLatencyInfo ObtainCancelEventForTouchEvent( 31 TouchEventWithLatencyInfo ObtainCancelEventForTouchEvent(
36 const TouchEventWithLatencyInfo& event_to_cancel) { 32 const TouchEventWithLatencyInfo& event_to_cancel) {
37 TouchEventWithLatencyInfo event = event_to_cancel; 33 TouchEventWithLatencyInfo event = event_to_cancel;
38 WebTouchEventTraits::ResetTypeAndTouchStates( 34 WebTouchEventTraits::ResetTypeAndTouchStates(
39 WebInputEvent::TouchCancel, 35 WebInputEvent::TouchCancel,
40 // TODO(rbyers): Shouldn't we use a fresh timestamp? 36 // TODO(rbyers): Shouldn't we use a fresh timestamp?
41 event.event.timeStampSeconds(), &event.event); 37 event.event.timeStampSeconds(), &event.event);
42 return event; 38 return event;
43 } 39 }
44 40
(...skipping 867 matching lines...) Expand 10 before | Expand all | Expand 10 after
912 if (ack_result == INPUT_EVENT_ACK_STATE_CONSUMED) 908 if (ack_result == INPUT_EVENT_ACK_STATE_CONSUMED)
913 send_touch_events_async_ = false; 909 send_touch_events_async_ = false;
914 has_handler_for_current_sequence_ |= 910 has_handler_for_current_sequence_ |=
915 ack_result != INPUT_EVENT_ACK_STATE_NO_CONSUMER_EXISTS; 911 ack_result != INPUT_EVENT_ACK_STATE_NO_CONSUMER_EXISTS;
916 } else if (WebTouchEventTraits::IsTouchSequenceEnd(event)) { 912 } else if (WebTouchEventTraits::IsTouchSequenceEnd(event)) {
917 has_handler_for_current_sequence_ = false; 913 has_handler_for_current_sequence_ = false;
918 } 914 }
919 } 915 }
920 916
921 } // namespace content 917 } // 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