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

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

Issue 404203003: Distinguish between keystroke and character events. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: IsCharFromNative() for Mac build 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
« no previous file with comments | « ui/events/test/event_generator.cc ('k') | ui/events/test/events_test_utils.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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"
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 {
55 public:
56 explicit KeyEventTestApi(KeyEvent* key_event);
57 virtual ~KeyEventTestApi();
58
59 void set_is_char(bool is_char) {
60 key_event_->set_is_char(is_char);
61 }
62
63 private:
64 KeyEventTestApi();
65
66 KeyEvent* key_event_;
67
68 DISALLOW_COPY_AND_ASSIGN(KeyEventTestApi);
69 };
70
54 class EventTargetTestApi { 71 class EventTargetTestApi {
55 public: 72 public:
56 explicit EventTargetTestApi(EventTarget* target); 73 explicit EventTargetTestApi(EventTarget* target);
57 74
58 const EventHandlerList& pre_target_handlers() { 75 const EventHandlerList& pre_target_handlers() {
59 return target_->pre_target_list_; 76 return target_->pre_target_list_;
60 } 77 }
61 78
62 private: 79 private:
63 EventTargetTestApi(); 80 EventTargetTestApi();
(...skipping 13 matching lines...) Expand all
77 EventSourceTestApi(); 94 EventSourceTestApi();
78 95
79 EventSource* event_source_; 96 EventSource* event_source_;
80 97
81 DISALLOW_COPY_AND_ASSIGN(EventSourceTestApi); 98 DISALLOW_COPY_AND_ASSIGN(EventSourceTestApi);
82 }; 99 };
83 100
84 } // namespace ui 101 } // namespace ui
85 102
86 #endif // UI_EVENTS_TEST_EVENTS_TEST_UTILS_H_ 103 #endif // UI_EVENTS_TEST_EVENTS_TEST_UTILS_H_
OLDNEW
« no previous file with comments | « ui/events/test/event_generator.cc ('k') | ui/events/test/events_test_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698