OLD | NEW |
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 #ifndef UI_AURA_TEST_TEST_EVENT_HANDLER_H_ | 5 #ifndef UI_AURA_TEST_TEST_EVENT_HANDLER_H_ |
6 #define UI_AURA_TEST_TEST_EVENT_HANDLER_H_ | 6 #define UI_AURA_TEST_TEST_EVENT_HANDLER_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
10 #include "ui/base/events/event_handler.h" | 10 #include "ui/base/events/event_handler.h" |
(...skipping 10 matching lines...) Expand all Loading... |
21 | 21 |
22 int num_key_events() const { return num_key_events_; } | 22 int num_key_events() const { return num_key_events_; } |
23 int num_mouse_events() const { return num_mouse_events_; } | 23 int num_mouse_events() const { return num_mouse_events_; } |
24 int num_scroll_events() const { return num_scroll_events_; } | 24 int num_scroll_events() const { return num_scroll_events_; } |
25 int num_touch_events() const { return num_touch_events_; } | 25 int num_touch_events() const { return num_touch_events_; } |
26 int num_gesture_events() const { return num_gesture_events_; } | 26 int num_gesture_events() const { return num_gesture_events_; } |
27 | 27 |
28 void Reset(); | 28 void Reset(); |
29 | 29 |
30 // ui::EventHandler overrides: | 30 // ui::EventHandler overrides: |
31 virtual ui::EventResult OnKeyEvent(ui::KeyEvent* event) OVERRIDE; | 31 virtual void OnKeyEvent(ui::KeyEvent* event) OVERRIDE; |
32 virtual ui::EventResult OnMouseEvent(ui::MouseEvent* event) OVERRIDE; | 32 virtual ui::EventResult OnMouseEvent(ui::MouseEvent* event) OVERRIDE; |
33 virtual void OnScrollEvent(ui::ScrollEvent* event) OVERRIDE; | 33 virtual void OnScrollEvent(ui::ScrollEvent* event) OVERRIDE; |
34 virtual void OnTouchEvent(ui::TouchEvent* event) OVERRIDE; | 34 virtual void OnTouchEvent(ui::TouchEvent* event) OVERRIDE; |
35 virtual void OnGestureEvent(ui::GestureEvent* event) OVERRIDE; | 35 virtual void OnGestureEvent(ui::GestureEvent* event) OVERRIDE; |
36 | 36 |
37 private: | 37 private: |
38 // How many events have been received of each type? | 38 // How many events have been received of each type? |
39 int num_key_events_; | 39 int num_key_events_; |
40 int num_mouse_events_; | 40 int num_mouse_events_; |
41 int num_scroll_events_; | 41 int num_scroll_events_; |
42 int num_touch_events_; | 42 int num_touch_events_; |
43 int num_gesture_events_; | 43 int num_gesture_events_; |
44 | 44 |
45 DISALLOW_COPY_AND_ASSIGN(TestEventHandler); | 45 DISALLOW_COPY_AND_ASSIGN(TestEventHandler); |
46 }; | 46 }; |
47 | 47 |
48 } // namespace test | 48 } // namespace test |
49 } // namespace aura | 49 } // namespace aura |
50 | 50 |
51 #endif // UI_AURA_TEST_TEST_EVENT_HANDLER_H_ | 51 #endif // UI_AURA_TEST_TEST_EVENT_HANDLER_H_ |
OLD | NEW |