summaryrefslogtreecommitdiffstats
path: root/ash/wm
diff options
context:
space:
mode:
authorjam <jam@chromium.org>2014-12-11 09:27:21 -0800
committerCommit bot <commit-bot@chromium.org>2014-12-11 17:27:48 +0000
commit78641678df68753ab836e3ebaaeaa77b11985e02 (patch)
treef518f2852f5b5597d59c95c29070c2bdd4bee553 /ash/wm
parent88569021f60986f9d65d7f463487bfa71ce057b5 (diff)
downloadchromium_src-78641678df68753ab836e3ebaaeaa77b11985e02.zip
chromium_src-78641678df68753ab836e3ebaaeaa77b11985e02.tar.gz
chromium_src-78641678df68753ab836e3ebaaeaa77b11985e02.tar.bz2
Revert of Remove check for native events in SystemGestureEventFilter::OnMouseEvent() (patchset #1 id:20001 of https://codereview.chromium.org/784233002/)
Reason for revert: broke ozone build: http://build.chromium.org/p/chromium.chromiumos/builders/Linux%20ChromiumOS%20Ozone%20Builder/builds/8366/steps/compile/logs/stdio Original issue's description: > Remove check for native events in SystemGestureEventFilter::OnMouseEvent() > > BUG=401590 > TEST=None > > Committed: https://crrev.com/d2b68827125a71539cbe2ba56eb63aed7c6630e2 > Cr-Commit-Position: refs/heads/master@{#307913} TBR=sadrul@chromium.org,pkotwicz@chromium.org NOTREECHECKS=true NOTRY=true BUG=401590 Review URL: https://codereview.chromium.org/801433002 Cr-Commit-Position: refs/heads/master@{#307921}
Diffstat (limited to 'ash/wm')
-rw-r--r--ash/wm/system_gesture_event_filter.cc7
1 files changed, 4 insertions, 3 deletions
diff --git a/ash/wm/system_gesture_event_filter.cc b/ash/wm/system_gesture_event_filter.cc
index 836d110..44970b4 100644
--- a/ash/wm/system_gesture_event_filter.cc
+++ b/ash/wm/system_gesture_event_filter.cc
@@ -30,9 +30,10 @@ SystemGestureEventFilter::~SystemGestureEventFilter() {
}
void SystemGestureEventFilter::OnMouseEvent(ui::MouseEvent* event) {
-#if defined(OS_CHROMEOS)
- if (event->type() == ui::ET_MOUSE_PRESSED &&
- ui::TouchFactory::GetInstance()->IsTouchDevicePresent()) {
+#if defined(OS_CHROMEOS) && defined(USE_X11)
+ if (event->type() == ui::ET_MOUSE_PRESSED && event->HasNativeEvent() &&
+ ui::TouchFactory::GetInstance()->IsTouchDevicePresent() &&
+ Shell::GetInstance()->delegate()) {
Shell::GetInstance()->metrics()->RecordUserMetricsAction(UMA_MOUSE_DOWN);
}
#endif