| 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_target.h" | 10 #include "ui/events/event_target.h" |
| 10 | 11 |
| 11 namespace ui { | 12 namespace ui { |
| 12 | 13 |
| 14 class EventSource; |
| 15 |
| 13 class EventTestApi { | 16 class EventTestApi { |
| 14 public: | 17 public: |
| 15 explicit EventTestApi(Event* event); | 18 explicit EventTestApi(Event* event); |
| 16 virtual ~EventTestApi(); | 19 virtual ~EventTestApi(); |
| 17 | 20 |
| 18 void set_time_stamp(base::TimeDelta time_stamp) { | 21 void set_time_stamp(base::TimeDelta time_stamp) { |
| 19 event_->time_stamp_ = time_stamp; | 22 event_->time_stamp_ = time_stamp; |
| 20 } | 23 } |
| 21 | 24 |
| 22 private: | 25 private: |
| (...skipping 30 matching lines...) Expand all Loading... |
| 53 } | 56 } |
| 54 | 57 |
| 55 private: | 58 private: |
| 56 EventTargetTestApi(); | 59 EventTargetTestApi(); |
| 57 | 60 |
| 58 EventTarget* target_; | 61 EventTarget* target_; |
| 59 | 62 |
| 60 DISALLOW_COPY_AND_ASSIGN(EventTargetTestApi); | 63 DISALLOW_COPY_AND_ASSIGN(EventTargetTestApi); |
| 61 }; | 64 }; |
| 62 | 65 |
| 66 class EventSourceTestApi { |
| 67 public: |
| 68 explicit EventSourceTestApi(EventSource* event_source); |
| 69 |
| 70 EventDispatchDetails SendEventToProcessor(Event* event) WARN_UNUSED_RESULT; |
| 71 |
| 72 private: |
| 73 EventSourceTestApi(); |
| 74 |
| 75 EventSource* event_source_; |
| 76 |
| 77 DISALLOW_COPY_AND_ASSIGN(EventSourceTestApi); |
| 78 }; |
| 79 |
| 63 } // namespace ui | 80 } // namespace ui |
| 64 | 81 |
| 65 #endif // UI_EVENTS_TEST_EVENTS_TEST_UTILS_H_ | 82 #endif // UI_EVENTS_TEST_EVENTS_TEST_UTILS_H_ |
| OLD | NEW |