| OLD | NEW |
| 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/renderer/input/render_widget_input_handler.h" | 5 #include "content/renderer/input/render_widget_input_handler.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 #include <utility> | 9 #include <utility> |
| 10 | 10 |
| (...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 114 break; | 114 break; |
| 115 } | 115 } |
| 116 | 116 |
| 117 #undef CASE_TYPE | 117 #undef CASE_TYPE |
| 118 } | 118 } |
| 119 | 119 |
| 120 void LogPassiveEventListenersUma(WebInputEventResult result, | 120 void LogPassiveEventListenersUma(WebInputEventResult result, |
| 121 WebInputEvent::DispatchType dispatch_type, | 121 WebInputEvent::DispatchType dispatch_type, |
| 122 double event_timestamp, | 122 double event_timestamp, |
| 123 const ui::LatencyInfo& latency_info) { | 123 const ui::LatencyInfo& latency_info) { |
| 124 enum { | 124 enum ListenerEnum { |
| 125 PASSIVE_LISTENER_UMA_ENUM_PASSIVE, | 125 PASSIVE_LISTENER_UMA_ENUM_PASSIVE, |
| 126 PASSIVE_LISTENER_UMA_ENUM_UNCANCELABLE, | 126 PASSIVE_LISTENER_UMA_ENUM_UNCANCELABLE, |
| 127 PASSIVE_LISTENER_UMA_ENUM_SUPPRESSED, | 127 PASSIVE_LISTENER_UMA_ENUM_SUPPRESSED, |
| 128 PASSIVE_LISTENER_UMA_ENUM_CANCELABLE, | 128 PASSIVE_LISTENER_UMA_ENUM_CANCELABLE, |
| 129 PASSIVE_LISTENER_UMA_ENUM_CANCELABLE_AND_CANCELED, | 129 PASSIVE_LISTENER_UMA_ENUM_CANCELABLE_AND_CANCELED, |
| 130 PASSIVE_LISTENER_UMA_ENUM_FORCED_NON_BLOCKING_DUE_TO_FLING, | 130 PASSIVE_LISTENER_UMA_ENUM_FORCED_NON_BLOCKING_DUE_TO_FLING, |
| 131 PASSIVE_LISTENER_UMA_ENUM_FORCED_NON_BLOCKING_DUE_TO_MAIN_THREAD_RESPONSIVEN
ESS, | 131 PASSIVE_LISTENER_UMA_ENUM_FORCED_NON_BLOCKING_DUE_TO_MAIN_THREAD_RESPONSIVEN
ESS, |
| 132 PASSIVE_LISTENER_UMA_ENUM_COUNT | 132 PASSIVE_LISTENER_UMA_ENUM_COUNT |
| 133 }; | 133 }; |
| 134 | 134 |
| 135 int enum_value; | 135 ListenerEnum enum_value; |
| 136 switch (dispatch_type) { | 136 switch (dispatch_type) { |
| 137 case WebInputEvent::kListenersForcedNonBlockingDueToFling: | 137 case WebInputEvent::kListenersForcedNonBlockingDueToFling: |
| 138 enum_value = PASSIVE_LISTENER_UMA_ENUM_FORCED_NON_BLOCKING_DUE_TO_FLING; | 138 enum_value = PASSIVE_LISTENER_UMA_ENUM_FORCED_NON_BLOCKING_DUE_TO_FLING; |
| 139 break; | 139 break; |
| 140 case WebInputEvent:: | 140 case WebInputEvent:: |
| 141 kListenersForcedNonBlockingDueToMainThreadResponsiveness: | 141 kListenersForcedNonBlockingDueToMainThreadResponsiveness: |
| 142 enum_value = | 142 enum_value = |
| 143 PASSIVE_LISTENER_UMA_ENUM_FORCED_NON_BLOCKING_DUE_TO_MAIN_THREAD_RESPO
NSIVENESS; | 143 PASSIVE_LISTENER_UMA_ENUM_FORCED_NON_BLOCKING_DUE_TO_MAIN_THREAD_RESPO
NSIVENESS; |
| 144 break; | 144 break; |
| 145 case WebInputEvent::kListenersNonBlockingPassive: | 145 case WebInputEvent::kListenersNonBlockingPassive: |
| (...skipping 314 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 460 // it can be bundled in the event ack. | 460 // it can be bundled in the event ack. |
| 461 if (handling_event_overscroll_) { | 461 if (handling_event_overscroll_) { |
| 462 *handling_event_overscroll_ = std::move(params); | 462 *handling_event_overscroll_ = std::move(params); |
| 463 return; | 463 return; |
| 464 } | 464 } |
| 465 | 465 |
| 466 delegate_->OnDidOverscroll(*params); | 466 delegate_->OnDidOverscroll(*params); |
| 467 } | 467 } |
| 468 | 468 |
| 469 } // namespace content | 469 } // namespace content |
| OLD | NEW |