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 "base/macros.h" | 8 #include "base/macros.h" |
9 #include "ui/events/event.h" | 9 #include "ui/events/event.h" |
10 #include "ui/events/event_dispatcher.h" | 10 #include "ui/events/event_dispatcher.h" |
11 #include "ui/events/event_target.h" | 11 #include "ui/events/event_target.h" |
12 | 12 |
13 namespace ui { | 13 namespace ui { |
14 | 14 |
15 class EventSource; | 15 class EventSource; |
16 | 16 |
17 class EventTestApi { | 17 class EventTestApi { |
18 public: | 18 public: |
19 explicit EventTestApi(Event* event); | 19 explicit EventTestApi(Event* event); |
20 virtual ~EventTestApi(); | 20 virtual ~EventTestApi(); |
21 | 21 |
22 void set_time_stamp(base::TimeDelta time_stamp) { | 22 void set_time_stamp(base::TimeTicks time_stamp) { |
23 event_->time_stamp_ = time_stamp; | 23 event_->time_stamp_ = time_stamp; |
24 } | 24 } |
25 | 25 |
26 void set_source_device_id(int source_device_id) { | 26 void set_source_device_id(int source_device_id) { |
27 event_->source_device_id_ = source_device_id; | 27 event_->source_device_id_ = source_device_id; |
28 } | 28 } |
29 | 29 |
30 private: | 30 private: |
31 EventTestApi(); | 31 EventTestApi(); |
32 | 32 |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
98 EventSourceTestApi(); | 98 EventSourceTestApi(); |
99 | 99 |
100 EventSource* event_source_; | 100 EventSource* event_source_; |
101 | 101 |
102 DISALLOW_COPY_AND_ASSIGN(EventSourceTestApi); | 102 DISALLOW_COPY_AND_ASSIGN(EventSourceTestApi); |
103 }; | 103 }; |
104 | 104 |
105 } // namespace ui | 105 } // namespace ui |
106 | 106 |
107 #endif // UI_EVENTS_TEST_EVENTS_TEST_UTILS_H_ | 107 #endif // UI_EVENTS_TEST_EVENTS_TEST_UTILS_H_ |
OLD | NEW |