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

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

Issue 10831240: Remove TouchEvent interface, and rename TouchEventImpl to TouchEvent (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: merge-tot Created 8 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 | Annotate | Revision Log
« no previous file with comments | « ash/touch/touch_uma.h ('k') | ash/wm/app_list_controller.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/shell_delegate.h" 7 #include "ash/shell_delegate.h"
8 #include "base/metrics/histogram.h" 8 #include "base/metrics/histogram.h"
9 #include "base/stringprintf.h" 9 #include "base/stringprintf.h"
10 #include "ui/aura/root_window.h" 10 #include "ui/aura/root_window.h"
(...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after
249 249
250 if (event.type() == ui::ET_GESTURE_END && 250 if (event.type() == ui::ET_GESTURE_END &&
251 event.details().touch_points() == 2) { 251 event.details().touch_points() == 2) {
252 WindowTouchDetails* details = target->GetProperty(kWindowTouchDetails); 252 WindowTouchDetails* details = target->GetProperty(kWindowTouchDetails);
253 CHECK(details) << "Window received gesture but no touch events?"; 253 CHECK(details) << "Window received gesture but no touch events?";
254 details->last_mt_time_ = event.time_stamp(); 254 details->last_mt_time_ = event.time_stamp();
255 } 255 }
256 } 256 }
257 257
258 void TouchUMA::RecordTouchEvent(aura::Window* target, 258 void TouchUMA::RecordTouchEvent(aura::Window* target,
259 const ui::TouchEventImpl& event) { 259 const ui::TouchEvent& event) {
260 UMA_HISTOGRAM_CUSTOM_COUNTS("Ash.TouchRadius", 260 UMA_HISTOGRAM_CUSTOM_COUNTS("Ash.TouchRadius",
261 static_cast<int>(std::max(event.radius_x(), event.radius_y())), 261 static_cast<int>(std::max(event.radius_x(), event.radius_y())),
262 1, 500, 100); 262 1, 500, 100);
263 263
264 WindowTouchDetails* details = target->GetProperty(kWindowTouchDetails); 264 WindowTouchDetails* details = target->GetProperty(kWindowTouchDetails);
265 if (!details) { 265 if (!details) {
266 details = new WindowTouchDetails; 266 details = new WindowTouchDetails;
267 target->SetProperty(kWindowTouchDetails, details); 267 target->SetProperty(kWindowTouchDetails, details);
268 } 268 }
269 269
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
313 313
314 UMA_HISTOGRAM_CUSTOM_COUNTS("Ash.TouchMoveSteps", distance, 1, 1000, 50); 314 UMA_HISTOGRAM_CUSTOM_COUNTS("Ash.TouchMoveSteps", distance, 1, 1000, 50);
315 315
316 details->last_move_time_[event.touch_id()] = event.time_stamp(); 316 details->last_move_time_[event.touch_id()] = event.time_stamp();
317 details->last_touch_position_[event.touch_id()] = event.location(); 317 details->last_touch_position_[event.touch_id()] = event.location();
318 } 318 }
319 } 319 }
320 320
321 } // namespace internal 321 } // namespace internal
322 } // namespace ash 322 } // namespace ash
OLDNEW
« no previous file with comments | « ash/touch/touch_uma.h ('k') | ash/wm/app_list_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698