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

Unified Diff: ash/wm/system_gesture_event_filter.cc

Issue 10834070: ash: Add some UMA for touch-events. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years, 5 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
Index: ash/wm/system_gesture_event_filter.cc
diff --git a/ash/wm/system_gesture_event_filter.cc b/ash/wm/system_gesture_event_filter.cc
index 34ee6e442e9e991c451d46680a583563a8782f15..15fa798b7f128524c1db36b0c456a471ddc382dc 100644
--- a/ash/wm/system_gesture_event_filter.cc
+++ b/ash/wm/system_gesture_event_filter.cc
@@ -10,6 +10,7 @@
#include "ash/root_window_controller.h"
#include "ash/screen_ash.h"
#include "ash/shell.h"
+#include "ash/shell_delegate.h"
#include "ash/shell_window_ids.h"
#include "ash/system/brightness/brightness_control_delegate.h"
#include "ash/volume_control_delegate.h"
@@ -38,6 +39,10 @@
#include "ui/views/widget/widget.h"
#include "ui/views/widget/widget_delegate.h"
+#if defined(OS_CHROMEOS)
+#include "ui/base/touch/touch_factory.h"
+#endif
+
namespace {
using views::Widget;
@@ -527,6 +532,14 @@ bool SystemGestureEventFilter::PreHandleKeyEvent(aura::Window* target,
bool SystemGestureEventFilter::PreHandleMouseEvent(aura::Window* target,
aura::MouseEvent* event) {
+#if defined(OS_CHROMEOS)
+ if (event->type() == ui::ET_MOUSE_PRESSED && event->native_event() &&
+ ui::TouchFactory::GetInstance()->IsTouchDevicePresent() &&
+ ui::IsTouchpadEvent(event->native_event())) {
Rick Byers 2012/07/31 20:37:36 I don't think we need to restrict ourselves to tou
sadrul 2012/08/01 16:15:27 Done (using just MOUSE_DOWN for both mouse/touchpa
+ Shell::GetInstance()->delegate()->RecordUserMetricsAction(
+ UMA_TOUCHPAD_TAP_DOWN);
+ }
+#endif
return false;
}

Powered by Google App Engine
This is Rietveld 408576698