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

Side by Side Diff: ui/events/test/events_test_utils.h

Issue 336403005: Use XInput2 events for keyboard events. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address review comments (sadrul) 3 Created 6 years, 5 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
OLDNEW
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"
11 11
12 namespace ui { 12 namespace ui {
13 13
14 class EventSource; 14 class EventSource;
15 15
16 class EventTestApi { 16 class EventTestApi {
17 public: 17 public:
18 explicit EventTestApi(Event* event); 18 explicit EventTestApi(Event* event);
19 virtual ~EventTestApi(); 19 virtual ~EventTestApi();
20 20
21 void set_time_stamp(base::TimeDelta time_stamp) { 21 void set_time_stamp(base::TimeDelta time_stamp) {
22 event_->time_stamp_ = time_stamp; 22 event_->time_stamp_ = time_stamp;
23 } 23 }
24 24
25 void set_source_device_id(int source_device_id) {
26 event_->source_device_id_ = source_device_id;
27 }
28
25 private: 29 private:
26 EventTestApi(); 30 EventTestApi();
27 31
28 Event* event_; 32 Event* event_;
29 33
30 DISALLOW_COPY_AND_ASSIGN(EventTestApi); 34 DISALLOW_COPY_AND_ASSIGN(EventTestApi);
31 }; 35 };
32 36
33 class LocatedEventTestApi : public EventTestApi { 37 class LocatedEventTestApi : public EventTestApi {
34 public: 38 public:
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 EventSourceTestApi(); 77 EventSourceTestApi();
74 78
75 EventSource* event_source_; 79 EventSource* event_source_;
76 80
77 DISALLOW_COPY_AND_ASSIGN(EventSourceTestApi); 81 DISALLOW_COPY_AND_ASSIGN(EventSourceTestApi);
78 }; 82 };
79 83
80 } // namespace ui 84 } // namespace ui
81 85
82 #endif // UI_EVENTS_TEST_EVENTS_TEST_UTILS_H_ 86 #endif // UI_EVENTS_TEST_EVENTS_TEST_UTILS_H_
OLDNEW
« no previous file with comments | « ui/events/keycodes/keyboard_code_conversion_x.cc ('k') | ui/events/test/events_test_utils_x11.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698