OLD | NEW |
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 "ui/events/blink/input_handler_proxy.h" | 5 #include "ui/events/blink/input_handler_proxy.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <algorithm> | 9 #include <algorithm> |
10 | 10 |
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
180 if (!(event.GetType() == WebInputEvent::kGestureScrollBegin || | 180 if (!(event.GetType() == WebInputEvent::kGestureScrollBegin || |
181 event.GetType() == WebInputEvent::kGestureScrollUpdate || | 181 event.GetType() == WebInputEvent::kGestureScrollUpdate || |
182 event.GetType() == WebInputEvent::kGesturePinchBegin || | 182 event.GetType() == WebInputEvent::kGesturePinchBegin || |
183 event.GetType() == WebInputEvent::kGesturePinchUpdate || | 183 event.GetType() == WebInputEvent::kGesturePinchUpdate || |
184 event.GetType() == WebInputEvent::kGestureFlingStart)) { | 184 event.GetType() == WebInputEvent::kGestureFlingStart)) { |
185 return; | 185 return; |
186 } | 186 } |
187 | 187 |
188 ui::LatencyInfo::LatencyMap::const_iterator it = | 188 ui::LatencyInfo::LatencyMap::const_iterator it = |
189 latency_info.latency_components().find(std::make_pair( | 189 latency_info.latency_components().find(std::make_pair( |
190 ui::INPUT_EVENT_LATENCY_ORIGINAL_COMPONENT, 0)); | 190 ui::INPUT_EVENT_LATENCY_ORIGINAL_COMPONENT, static_cast<int64_t>(0))); |
191 | 191 |
192 if (it == latency_info.latency_components().end()) | 192 if (it == latency_info.latency_components().end()) |
193 return; | 193 return; |
194 | 194 |
195 base::TimeDelta delta = base::TimeTicks::Now() - it->second.event_time; | 195 base::TimeDelta delta = base::TimeTicks::Now() - it->second.event_time; |
196 for (size_t i = 0; i < it->second.event_count; ++i) { | 196 for (size_t i = 0; i < it->second.event_count; ++i) { |
197 switch (event.GetType()) { | 197 switch (event.GetType()) { |
198 case blink::WebInputEvent::kGestureScrollBegin: | 198 case blink::WebInputEvent::kGestureScrollBegin: |
199 UMA_HISTOGRAM_CUSTOM_COUNTS( | 199 UMA_HISTOGRAM_CUSTOM_COUNTS( |
200 "Event.Latency.RendererImpl.GestureScrollBegin", | 200 "Event.Latency.RendererImpl.GestureScrollBegin", |
(...skipping 1532 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1733 scroll_elasticity_controller_->GetWeakPtr(), gesture_event, | 1733 scroll_elasticity_controller_->GetWeakPtr(), gesture_event, |
1734 scroll_result)); | 1734 scroll_result)); |
1735 } | 1735 } |
1736 | 1736 |
1737 void InputHandlerProxy::SetTickClockForTesting( | 1737 void InputHandlerProxy::SetTickClockForTesting( |
1738 std::unique_ptr<base::TickClock> tick_clock) { | 1738 std::unique_ptr<base::TickClock> tick_clock) { |
1739 tick_clock_ = std::move(tick_clock); | 1739 tick_clock_ = std::move(tick_clock); |
1740 } | 1740 } |
1741 | 1741 |
1742 } // namespace ui | 1742 } // namespace ui |
OLD | NEW |