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

Unified Diff: views/widget/root_view.cc

Issue 6347002: touch: Return an enum from OnTouchEvent. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 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
Index: views/widget/root_view.cc
diff --git a/views/widget/root_view.cc b/views/widget/root_view.cc
index 143b23ad99429c1d19b454c8fb86a5ba6b69c822..2ad45ea6c1e165ea1536fc030344c1e618020b05 100644
--- a/views/widget/root_view.cc
+++ b/views/widget/root_view.cc
@@ -287,7 +287,7 @@ void RootView::ViewHierarchyChanged(bool is_add, View* parent, View* child) {
}
#if defined(TOUCH_UI)
- if (touch_pressed_handler_) {
+ if (touch_pressed_handler_ == child) {
touch_pressed_handler_ = NULL;
}
#endif
@@ -347,6 +347,7 @@ bool RootView::OnTouchEvent(const TouchEvent& e) {
// return true, which will cause subsequent drag/release events to get
// forwarded to that view.
if (handled) {
+ touch_pressed_handler_->set_touch_event_observer(this);
gesture_manager_->ProcessTouchEventForGesture(e, this, handled);
return true;
}
@@ -359,7 +360,13 @@ bool RootView::OnTouchEvent(const TouchEvent& e) {
gesture_manager_->ProcessTouchEventForGesture(e, this, handled);
return handled;
}
-#endif
+
+void RootView::OnTouchSequenceEnd() {
+ DCHECK(touch_pressed_handler_);
+ touch_pressed_handler_ = NULL;
+}
+
+#endif // defined(TOUCH_UI)
bool RootView::OnMousePressed(const MouseEvent& e) {
// This function does not normally handle non-client messages except for
« chrome/browser/renderer_host/render_widget_host_view_views.cc ('K') | « views/widget/root_view.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698