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

Unified Diff: services/window_manager/focus_controller.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 | « services/native_viewport/platform_viewport_android.cc ('k') | sky/viewer/document_view.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: services/window_manager/focus_controller.cc
diff --git a/services/window_manager/focus_controller.cc b/services/window_manager/focus_controller.cc
index e58dca862bd57dd49675a5e3526ea0b275e06bca..cfe535ab109dc4c6cb20dc2ea3269ae9f22c7332 100644
--- a/services/window_manager/focus_controller.cc
+++ b/services/window_manager/focus_controller.cc
@@ -133,6 +133,10 @@ void FocusController::OnScrollEvent(ui::ScrollEvent* event) {
}
void FocusController::OnTouchEvent(ui::TouchEvent* event) {
+ if (event->type() == ui::ET_TOUCH_PRESSED && !event->handled()) {
+ View* view = static_cast<ViewTarget*>(event->target())->view();
+ ViewFocusedFromInputEvent(view);
+ }
}
void FocusController::OnGestureEvent(ui::GestureEvent* event) {
« no previous file with comments | « services/native_viewport/platform_viewport_android.cc ('k') | sky/viewer/document_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698