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

Unified Diff: views/view_unittest.cc

Issue 6347002: touch: Return an enum from OnTouchEvent. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Update tests, add a missed case. 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/view_unittest.cc
diff --git a/views/view_unittest.cc b/views/view_unittest.cc
index cf6fd887d2860792061d5ff66d4c8d4b17cbe973..87f9e6ae04f5535f31dd71cf28b839c4c6c4e7b3 100644
--- a/views/view_unittest.cc
+++ b/views/view_unittest.cc
@@ -154,7 +154,7 @@ class TestView : public View {
virtual bool OnMouseDragged(const MouseEvent& event);
virtual void OnMouseReleased(const MouseEvent& event, bool canceled);
#if defined(TOUCH_UI)
- virtual bool OnTouchEvent(const TouchEvent& event);
+ virtual TouchStatus OnTouchEvent(const TouchEvent& event);
#endif
virtual void Paint(gfx::Canvas* canvas);
virtual bool AcceleratorPressed(const Accelerator& accelerator);
@@ -429,10 +429,11 @@ bool MockGestureManager::ProcessTouchEventForGesture(
MockGestureManager::MockGestureManager() {
}
-bool TestView::OnTouchEvent(const TouchEvent& event) {
+View::TouchStatus TestView::OnTouchEvent(const TouchEvent& event) {
last_touch_event_type_ = event.GetType();
location_.SetPoint(event.x(), event.y());
- return last_touch_event_was_handled_;
+ return last_touch_event_was_handled_ ? TOUCH_STATUS_CONTINUE :
+ TOUCH_STATUS_UNKNOWN;
}
TEST_F(ViewTest, TouchEvent) {
« no previous file with comments | « views/view.cc ('k') | views/widget/root_view.h » ('j') | views/widget/root_view.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698