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

Unified Diff: ash/wm/system_gesture_event_filter.cc

Issue 797713002: [Reland] Remove check for native events in SystemGestureEventFilter::OnMouseEvent() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 44970b4049fc7ce38b93db0b3dc28f5f7759f4eb..f0bfb22ddc351762ffbf638c811cd13c5f241b4b 100644
--- a/ash/wm/system_gesture_event_filter.cc
+++ b/ash/wm/system_gesture_event_filter.cc
@@ -11,13 +11,10 @@
#include "ash/wm/gestures/long_press_affordance_handler.h"
#include "ash/wm/gestures/overview_gesture_handler.h"
#include "ash/wm/gestures/shelf_gesture_handler.h"
+#include "ui/base/touch/touch_device.h"
#include "ui/events/event.h"
#include "ui/events/event_constants.h"
-#if defined(OS_CHROMEOS) && defined(USE_X11)
-#include "ui/events/devices/x11/touch_factory_x11.h"
-#endif
-
namespace ash {
SystemGestureEventFilter::SystemGestureEventFilter()
@@ -30,10 +27,8 @@ SystemGestureEventFilter::~SystemGestureEventFilter() {
}
void SystemGestureEventFilter::OnMouseEvent(ui::MouseEvent* event) {
-#if defined(OS_CHROMEOS) && defined(USE_X11)
- if (event->type() == ui::ET_MOUSE_PRESSED && event->HasNativeEvent() &&
- ui::TouchFactory::GetInstance()->IsTouchDevicePresent() &&
- Shell::GetInstance()->delegate()) {
+#if defined(OS_CHROMEOS)
+ if (event->type() == ui::ET_MOUSE_PRESSED && ui::IsTouchDevicePresent()) {
Shell::GetInstance()->metrics()->RecordUserMetricsAction(UMA_MOUSE_DOWN);
}
#endif
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698