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

Unified Diff: ash/touch/touch_uma.cc

Issue 10827145: Convert Aura to use ui::Event. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ash/touch/touch_uma.h ('k') | ash/wm/activation_controller.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/touch/touch_uma.cc
===================================================================
--- ash/touch/touch_uma.cc (revision 150582)
+++ ash/touch/touch_uma.cc (working copy)
@@ -7,10 +7,10 @@
#include "ash/shell_delegate.h"
#include "base/metrics/histogram.h"
#include "base/stringprintf.h"
-#include "ui/aura/event.h"
#include "ui/aura/root_window.h"
#include "ui/aura/window.h"
#include "ui/aura/window_property.h"
+#include "ui/base/event.h"
namespace {
@@ -89,7 +89,7 @@
NULL);
GestureActionType FindGestureActionType(aura::Window* window,
- const aura::GestureEvent& event) {
+ const ui::GestureEventImpl& event) {
if (!window || window->GetRootWindow() == window) {
if (event.type() == ui::ET_GESTURE_SCROLL_BEGIN)
return GESTURE_BEZEL_SCROLL;
@@ -149,7 +149,7 @@
return GESTURE_UNKNOWN;
}
-UMAEventType UMAEventTypeFromEvent(const aura::Event& event) {
+UMAEventType UMAEventTypeFromEvent(const ui::Event& event) {
switch (event.type()) {
case ui::ET_TOUCH_RELEASED:
return UMA_ET_TOUCH_RELEASED;
@@ -166,8 +166,8 @@
case ui::ET_GESTURE_SCROLL_END:
return UMA_ET_GESTURE_SCROLL_END;
case ui::ET_GESTURE_SCROLL_UPDATE: {
- const aura::GestureEvent& gesture =
- static_cast<const aura::GestureEvent&>(event);
+ const ui::GestureEventImpl& gesture =
+ static_cast<const ui::GestureEventImpl&>(event);
if (gesture.details().touch_points() >= 4)
return UMA_ET_GESTURE_SCROLL_UPDATE_4P;
else if (gesture.details().touch_points() == 3)
@@ -193,8 +193,8 @@
case ui::ET_GESTURE_PINCH_END:
return UMA_ET_GESTURE_PINCH_END;
case ui::ET_GESTURE_PINCH_UPDATE: {
- const aura::GestureEvent& gesture =
- static_cast<const aura::GestureEvent&>(event);
+ const ui::GestureEventImpl& gesture =
+ static_cast<const ui::GestureEventImpl&>(event);
if (gesture.details().touch_points() >= 4)
return UMA_ET_GESTURE_PINCH_UPDATE_4P;
else if (gesture.details().touch_points() == 3)
@@ -204,8 +204,8 @@
case ui::ET_GESTURE_LONG_PRESS:
return UMA_ET_GESTURE_LONG_PRESS;
case ui::ET_GESTURE_MULTIFINGER_SWIPE: {
- const aura::GestureEvent& gesture =
- static_cast<const aura::GestureEvent&>(event);
+ const ui::GestureEventImpl& gesture =
+ static_cast<const ui::GestureEventImpl&>(event);
if (gesture.details().touch_points() >= 4)
return UMA_ET_GESTURE_MULTIFINGER_SWIPE_4P;
else if (gesture.details().touch_points() == 3)
@@ -235,7 +235,7 @@
}
void TouchUMA::RecordGestureEvent(aura::Window* target,
- const aura::GestureEvent& event) {
+ const ui::GestureEventImpl& event) {
UMA_HISTOGRAM_ENUMERATION("Ash.GestureCreated",
UMAEventTypeFromEvent(event),
UMA_ET_COUNT);
@@ -256,7 +256,7 @@
}
void TouchUMA::RecordTouchEvent(aura::Window* target,
- const aura::TouchEvent& event) {
+ const ui::TouchEventImpl& event) {
UMA_HISTOGRAM_CUSTOM_COUNTS("Ash.TouchRadius",
static_cast<int>(std::max(event.radius_x(), event.radius_y())),
1, 500, 100);
« no previous file with comments | « ash/touch/touch_uma.h ('k') | ash/wm/activation_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698