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

Unified Diff: ui/views/view_unittest.cc

Issue 10912063: events: Get rid of GestureStatus in favour of EventResult. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years, 3 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 | « ui/views/view.cc ('k') | ui/views/widget/native_widget_aura.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/view_unittest.cc
diff --git a/ui/views/view_unittest.cc b/ui/views/view_unittest.cc
index c902b17685453c0a739e70096db284f0154629e8..f34d9fc2c14e0f9831fea7d52b5925b23656898a 100644
--- a/ui/views/view_unittest.cc
+++ b/ui/views/view_unittest.cc
@@ -232,7 +232,7 @@ class TestView : public View {
virtual void OnMouseExited(const ui::MouseEvent& event) OVERRIDE;
virtual ui::TouchStatus OnTouchEvent(const ui::TouchEvent& event) OVERRIDE;
// Ignores GestureEvent by default.
- virtual ui::GestureStatus OnGestureEvent(
+ virtual ui::EventResult OnGestureEvent(
const ui::GestureEvent& event) OVERRIDE;
virtual void Paint(gfx::Canvas* canvas) OVERRIDE;
virtual void SchedulePaintInRect(const gfx::Rect& rect) OVERRIDE;
@@ -285,11 +285,11 @@ class TestViewConsumeGesture : public TestView {
virtual ~TestViewConsumeGesture() {}
protected:
- virtual ui::GestureStatus OnGestureEvent(
+ virtual ui::EventResult OnGestureEvent(
const ui::GestureEvent& event) OVERRIDE {
last_gesture_event_type_ = event.type();
location_.SetPoint(event.x(), event.y());
- return ui::GESTURE_STATUS_CONSUMED;
+ return ui::ER_CONSUMED;
}
private:
@@ -303,9 +303,9 @@ class TestViewIgnoreGesture: public TestView {
virtual ~TestViewIgnoreGesture() {}
private:
- virtual ui::GestureStatus OnGestureEvent(
+ virtual ui::EventResult OnGestureEvent(
const ui::GestureEvent& event) OVERRIDE {
- return ui::GESTURE_STATUS_UNKNOWN;
+ return ui::ER_UNHANDLED;
}
DISALLOW_COPY_AND_ASSIGN(TestViewIgnoreGesture);
@@ -319,10 +319,10 @@ class TestViewIgnoreScrollGestures : public TestViewConsumeGesture {
virtual ~TestViewIgnoreScrollGestures() {}
private:
- virtual ui::GestureStatus OnGestureEvent(
+ virtual ui::EventResult OnGestureEvent(
const ui::GestureEvent& event) OVERRIDE {
if (event.IsScrollGestureEvent())
- return ui::GESTURE_STATUS_UNKNOWN;
+ return ui::ER_UNHANDLED;
return TestViewConsumeGesture::OnGestureEvent(event);
}
@@ -589,8 +589,8 @@ TEST_F(ViewTest, TouchEvent) {
widget->CloseNow();
}
-ui::GestureStatus TestView::OnGestureEvent(const ui::GestureEvent& event) {
- return ui::GESTURE_STATUS_UNKNOWN;
+ui::EventResult TestView::OnGestureEvent(const ui::GestureEvent& event) {
+ return ui::ER_UNHANDLED;
}
TEST_F(ViewTest, GestureEvent) {
« no previous file with comments | « ui/views/view.cc ('k') | ui/views/widget/native_widget_aura.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698