OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_EVENTS_TEST_EVENTS_TEST_UTILS_H_ | 5 #ifndef UI_EVENTS_TEST_EVENTS_TEST_UTILS_H_ |
6 #define UI_EVENTS_TEST_EVENTS_TEST_UTILS_H_ | 6 #define UI_EVENTS_TEST_EVENTS_TEST_UTILS_H_ |
7 | 7 |
8 #include "ui/events/event.h" | 8 #include "ui/events/event.h" |
9 #include "ui/events/event_dispatcher.h" | 9 #include "ui/events/event_dispatcher.h" |
10 #include "ui/events/event_target.h" | 10 #include "ui/events/event_target.h" |
(...skipping 19 matching lines...) Expand all Loading... |
30 EventTestApi(); | 30 EventTestApi(); |
31 | 31 |
32 Event* event_; | 32 Event* event_; |
33 | 33 |
34 DISALLOW_COPY_AND_ASSIGN(EventTestApi); | 34 DISALLOW_COPY_AND_ASSIGN(EventTestApi); |
35 }; | 35 }; |
36 | 36 |
37 class LocatedEventTestApi : public EventTestApi { | 37 class LocatedEventTestApi : public EventTestApi { |
38 public: | 38 public: |
39 explicit LocatedEventTestApi(LocatedEvent* located_event); | 39 explicit LocatedEventTestApi(LocatedEvent* located_event); |
40 virtual ~LocatedEventTestApi(); | 40 ~LocatedEventTestApi() override; |
41 | 41 |
42 void set_location(const gfx::Point& location) { | 42 void set_location(const gfx::Point& location) { |
43 located_event_->location_ = location; | 43 located_event_->location_ = location; |
44 } | 44 } |
45 | 45 |
46 private: | 46 private: |
47 LocatedEventTestApi(); | 47 LocatedEventTestApi(); |
48 | 48 |
49 LocatedEvent* located_event_; | 49 LocatedEvent* located_event_; |
50 | 50 |
51 DISALLOW_COPY_AND_ASSIGN(LocatedEventTestApi); | 51 DISALLOW_COPY_AND_ASSIGN(LocatedEventTestApi); |
52 }; | 52 }; |
53 | 53 |
54 class KeyEventTestApi : public EventTestApi { | 54 class KeyEventTestApi : public EventTestApi { |
55 public: | 55 public: |
56 explicit KeyEventTestApi(KeyEvent* key_event); | 56 explicit KeyEventTestApi(KeyEvent* key_event); |
57 virtual ~KeyEventTestApi(); | 57 ~KeyEventTestApi() override; |
58 | 58 |
59 void set_is_char(bool is_char) { | 59 void set_is_char(bool is_char) { |
60 key_event_->set_is_char(is_char); | 60 key_event_->set_is_char(is_char); |
61 } | 61 } |
62 | 62 |
63 private: | 63 private: |
64 KeyEventTestApi(); | 64 KeyEventTestApi(); |
65 | 65 |
66 KeyEvent* key_event_; | 66 KeyEvent* key_event_; |
67 | 67 |
(...skipping 26 matching lines...) Expand all Loading... |
94 EventSourceTestApi(); | 94 EventSourceTestApi(); |
95 | 95 |
96 EventSource* event_source_; | 96 EventSource* event_source_; |
97 | 97 |
98 DISALLOW_COPY_AND_ASSIGN(EventSourceTestApi); | 98 DISALLOW_COPY_AND_ASSIGN(EventSourceTestApi); |
99 }; | 99 }; |
100 | 100 |
101 } // namespace ui | 101 } // namespace ui |
102 | 102 |
103 #endif // UI_EVENTS_TEST_EVENTS_TEST_UTILS_H_ | 103 #endif // UI_EVENTS_TEST_EVENTS_TEST_UTILS_H_ |
OLD | NEW |