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

Unified Diff: views/widget/root_view.cc

Issue 6981007: Add a status-type for a mouse-event triggered by a touch event. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 7 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 | « views/view.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: views/widget/root_view.cc
diff --git a/views/widget/root_view.cc b/views/widget/root_view.cc
index a91843b5925c8994d0ca5892ca5cb6149406a895..bea5b58bf206f0de610e5991767e7b44d4395b9b 100644
--- a/views/widget/root_view.cc
+++ b/views/widget/root_view.cc
@@ -335,7 +335,8 @@ View::TouchStatus RootView::OnTouchEvent(const TouchEvent& event) {
if (touch_pressed_handler_) {
TouchEvent touch_event(e, this, touch_pressed_handler_);
status = touch_pressed_handler_->ProcessTouchEvent(touch_event);
- gesture_manager_->ProcessTouchEventForGesture(e, this, status);
+ if (gesture_manager_->ProcessTouchEventForGesture(e, this, status))
+ status = View::TOUCH_STATUS_SYNTH_MOUSE;
if (status == TOUCH_STATUS_END)
touch_pressed_handler_ = NULL;
return status;
@@ -373,7 +374,8 @@ View::TouchStatus RootView::OnTouchEvent(const TouchEvent& event) {
if (status != TOUCH_STATUS_START)
touch_pressed_handler_ = NULL;
- gesture_manager_->ProcessTouchEventForGesture(e, this, status);
+ if (gesture_manager_->ProcessTouchEventForGesture(e, this, status))
+ status = View::TOUCH_STATUS_SYNTH_MOUSE;
return status;
}
@@ -381,7 +383,8 @@ View::TouchStatus RootView::OnTouchEvent(const TouchEvent& event) {
touch_pressed_handler_ = NULL;
// Give the touch event to the gesture manager.
- gesture_manager_->ProcessTouchEventForGesture(e, this, status);
+ if (gesture_manager_->ProcessTouchEventForGesture(e, this, status))
+ status = View::TOUCH_STATUS_SYNTH_MOUSE;
return status;
}
#endif
« no previous file with comments | « views/view.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698