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

Side by Side Diff: ash/touch/touch_uma.cc

Issue 1300803003: Drop ui::TouchEvent shims for radius_{x,y} and force (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 years, 3 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "ash/touch/touch_uma.h" 5 #include "ash/touch/touch_uma.h"
6 6
7 #include "ash/metrics/user_metrics_recorder.h" 7 #include "ash/metrics/user_metrics_recorder.h"
8 #include "ash/shell.h" 8 #include "ash/shell.h"
9 #include "base/metrics/histogram.h" 9 #include "base/metrics/histogram.h"
10 #include "base/strings/stringprintf.h" 10 #include "base/strings/stringprintf.h"
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 74
75 void TouchUMA::RecordGestureAction(GestureActionType action) { 75 void TouchUMA::RecordGestureAction(GestureActionType action) {
76 if (action == GESTURE_UNKNOWN || action >= GESTURE_ACTION_COUNT) 76 if (action == GESTURE_UNKNOWN || action >= GESTURE_ACTION_COUNT)
77 return; 77 return;
78 UMA_HISTOGRAM_ENUMERATION("Ash.GestureTarget", action, 78 UMA_HISTOGRAM_ENUMERATION("Ash.GestureTarget", action,
79 GESTURE_ACTION_COUNT); 79 GESTURE_ACTION_COUNT);
80 } 80 }
81 81
82 void TouchUMA::RecordTouchEvent(aura::Window* target, 82 void TouchUMA::RecordTouchEvent(aura::Window* target,
83 const ui::TouchEvent& event) { 83 const ui::TouchEvent& event) {
84 UMA_HISTOGRAM_CUSTOM_COUNTS("Ash.TouchRadius", 84 UMA_HISTOGRAM_CUSTOM_COUNTS(
85 static_cast<int>(std::max(event.radius_x(), event.radius_y())), 85 "Ash.TouchRadius",
86 static_cast<int>(std::max(event.pointer_details().radius_x(),
87 event.pointer_details().radius_y())),
86 1, 500, 100); 88 1, 500, 100);
87 89
88 UpdateTouchState(event); 90 UpdateTouchState(event);
89 91
90 WindowTouchDetails* details = target->GetProperty(kWindowTouchDetails); 92 WindowTouchDetails* details = target->GetProperty(kWindowTouchDetails);
91 if (!details) { 93 if (!details) {
92 details = new WindowTouchDetails; 94 details = new WindowTouchDetails;
93 target->SetProperty(kWindowTouchDetails, details); 95 target->SetProperty(kWindowTouchDetails, details);
94 } 96 }
95 97
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after
297 return GESTURE_OMNIBOX_SCROLL; 299 return GESTURE_OMNIBOX_SCROLL;
298 if (event.type() == ui::ET_GESTURE_PINCH_BEGIN) 300 if (event.type() == ui::ET_GESTURE_PINCH_BEGIN)
299 return GESTURE_OMNIBOX_PINCH; 301 return GESTURE_OMNIBOX_PINCH;
300 return GESTURE_UNKNOWN; 302 return GESTURE_UNKNOWN;
301 } 303 }
302 304
303 return GESTURE_UNKNOWN; 305 return GESTURE_UNKNOWN;
304 } 306 }
305 307
306 } // namespace ash 308 } // namespace ash
OLDNEW
« no previous file with comments | « ash/touch/touch_hud_debug.cc ('k') | mojo/converters/input_events/input_events_type_converters.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698