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

Unified Diff: services/native_viewport/platform_viewport_android.cc

Issue 869543002: Focus Views on touch events. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years, 11 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 | « no previous file | services/window_manager/focus_controller.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: services/native_viewport/platform_viewport_android.cc
diff --git a/services/native_viewport/platform_viewport_android.cc b/services/native_viewport/platform_viewport_android.cc
index f3db992290fe04a8f438cd39c27074226c4577a1..8cd264e4bc5ff5bc8082f1f788825b4a8a41d674 100644
--- a/services/native_viewport/platform_viewport_android.cc
+++ b/services/native_viewport/platform_viewport_android.cc
@@ -110,7 +110,8 @@ bool PlatformViewportAndroid::TouchEvent(JNIEnv* env, jobject obj,
base::TimeDelta::FromMilliseconds(time_ms));
// TODO(beng): handle multiple touch-points.
delegate_->OnEvent(&event);
- if (action == ui::ET_TOUCH_RELEASED || action == ui::ET_TOUCH_CANCELLED)
+ if (event.type() == ui::ET_TOUCH_RELEASED ||
+ event.type() == ui::ET_TOUCH_CANCELLED)
id_generator_.ReleaseNumber(pointer_id);
return true;
« no previous file with comments | « no previous file | services/window_manager/focus_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698