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

Side by Side Diff: ui/aura/event_filter_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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ui/aura/event_filter.cc ('k') | ui/aura/gestures/gesture_recognizer_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ui/aura/event_filter.h" 5 #include "ui/aura/event_filter.h"
6 6
7 #include "base/basictypes.h" 7 #include "base/basictypes.h"
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "ui/aura/focus_manager.h" 9 #include "ui/aura/focus_manager.h"
10 #include "ui/aura/root_window.h" 10 #include "ui/aura/root_window.h"
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 } 63 }
64 virtual bool OnMouseEvent(ui::MouseEvent* event) OVERRIDE { 64 virtual bool OnMouseEvent(ui::MouseEvent* event) OVERRIDE {
65 ++mouse_event_count_; 65 ++mouse_event_count_;
66 return consumes_mouse_events_; 66 return consumes_mouse_events_;
67 } 67 }
68 virtual ui::TouchStatus OnTouchEvent(ui::TouchEvent* event) OVERRIDE { 68 virtual ui::TouchStatus OnTouchEvent(ui::TouchEvent* event) OVERRIDE {
69 ++touch_event_count_; 69 ++touch_event_count_;
70 // TODO(sadrul): ! 70 // TODO(sadrul): !
71 return ui::TOUCH_STATUS_UNKNOWN; 71 return ui::TOUCH_STATUS_UNKNOWN;
72 } 72 }
73 virtual ui::GestureStatus OnGestureEvent( 73 virtual ui::EventResult OnGestureEvent(
74 ui::GestureEvent* event) OVERRIDE { 74 ui::GestureEvent* event) OVERRIDE {
75 // TODO(sadrul): ! 75 // TODO(sadrul): !
76 return ui::GESTURE_STATUS_UNKNOWN; 76 return ui::ER_UNHANDLED;
77 } 77 }
78 78
79 private: 79 private:
80 int key_event_count_; 80 int key_event_count_;
81 int mouse_event_count_; 81 int mouse_event_count_;
82 int touch_event_count_; 82 int touch_event_count_;
83 bool consumes_key_events_; 83 bool consumes_key_events_;
84 bool consumes_mouse_events_; 84 bool consumes_mouse_events_;
85 bool consumes_touch_events_; 85 bool consumes_touch_events_;
86 86
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
257 generator.PressKey(ui::VKEY_A, 0); 257 generator.PressKey(ui::VKEY_A, 0);
258 generator.PressLeftButton(); 258 generator.PressLeftButton();
259 259
260 EXPECT_EQ(1, w1_filter->key_event_count()); 260 EXPECT_EQ(1, w1_filter->key_event_count());
261 EXPECT_EQ(0, d11->key_event_count()); 261 EXPECT_EQ(0, d11->key_event_count());
262 EXPECT_EQ(1, w1_filter->mouse_event_count()); 262 EXPECT_EQ(1, w1_filter->mouse_event_count());
263 EXPECT_EQ(0, d11->mouse_event_count()); 263 EXPECT_EQ(0, d11->mouse_event_count());
264 } 264 }
265 265
266 } // namespace aura 266 } // namespace aura
OLDNEW
« no previous file with comments | « ui/aura/event_filter.cc ('k') | ui/aura/gestures/gesture_recognizer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698