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

Side by Side Diff: ui/events/ozone/evdev/event_converter_evdev_impl.h

Issue 872883003: [PATCH 2/11] ozone: evdev: Move KeyboardEvdev usage during dispatch to EventFactoryEvdev (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: updates for events_unittests Created 5 years, 11 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_OZONE_EVDEV_EVENT_CONVERTER_EVDEV_IMPL_H_ 5 #ifndef UI_EVENTS_OZONE_EVDEV_EVENT_CONVERTER_EVDEV_IMPL_H_
6 #define UI_EVENTS_OZONE_EVDEV_EVENT_CONVERTER_EVDEV_IMPL_H_ 6 #define UI_EVENTS_OZONE_EVDEV_EVENT_CONVERTER_EVDEV_IMPL_H_
7 7
8 #include <set> 8 #include <set>
9 9
10 #include "base/files/file_path.h" 10 #include "base/files/file_path.h"
(...skipping 16 matching lines...) Expand all
27 : public EventConverterEvdev { 27 : public EventConverterEvdev {
28 public: 28 public:
29 EventConverterEvdevImpl(int fd, 29 EventConverterEvdevImpl(int fd,
30 base::FilePath path, 30 base::FilePath path,
31 int id, 31 int id,
32 InputDeviceType type, 32 InputDeviceType type,
33 const EventDeviceInfo& info, 33 const EventDeviceInfo& info,
34 EventModifiersEvdev* modifiers, 34 EventModifiersEvdev* modifiers,
35 MouseButtonMapEvdev* button_map, 35 MouseButtonMapEvdev* button_map,
36 CursorDelegateEvdev* cursor, 36 CursorDelegateEvdev* cursor,
37 KeyboardEvdev* keyboard, 37 const KeyEventDispatchCallback& key_callback,
38 const EventDispatchCallback& callback); 38 const EventDispatchCallback& callback);
39 ~EventConverterEvdevImpl() override; 39 ~EventConverterEvdevImpl() override;
40 40
41 // EventConverterEvdev: 41 // EventConverterEvdev:
42 void OnFileCanReadWithoutBlocking(int fd) override; 42 void OnFileCanReadWithoutBlocking(int fd) override;
43 bool HasKeyboard() const override; 43 bool HasKeyboard() const override;
44 bool HasTouchpad() const override; 44 bool HasTouchpad() const override;
45 void SetAllowedKeys(scoped_ptr<std::set<DomCode>> allowed_keys) override; 45 void SetAllowedKeys(scoped_ptr<std::set<DomCode>> allowed_keys) override;
46 void AllowAllKeys() override; 46 void AllowAllKeys() override;
47 47
(...skipping 23 matching lines...) Expand all
71 // Controller for watching the input fd. 71 // Controller for watching the input fd.
72 base::MessagePumpLibevent::FileDescriptorWatcher controller_; 72 base::MessagePumpLibevent::FileDescriptorWatcher controller_;
73 73
74 // The keys which should be processed. nullptr if all keys should be 74 // The keys which should be processed. nullptr if all keys should be
75 // processed. 75 // processed.
76 scoped_ptr<std::set<DomCode>> allowed_keys_; 76 scoped_ptr<std::set<DomCode>> allowed_keys_;
77 77
78 // Shared cursor state. 78 // Shared cursor state.
79 CursorDelegateEvdev* cursor_; 79 CursorDelegateEvdev* cursor_;
80 80
81 // Shared keyboard state.
82 KeyboardEvdev* keyboard_;
83
84 // Modifier key state (shift, ctrl, etc). 81 // Modifier key state (shift, ctrl, etc).
85 EventModifiersEvdev* modifiers_; 82 EventModifiersEvdev* modifiers_;
86 83
87 // Shared mouse button map. 84 // Shared mouse button map.
88 MouseButtonMapEvdev* button_map_; 85 MouseButtonMapEvdev* button_map_;
89 86
90 // Callback for dispatching events. 87 // Callbacks for dispatching events.
88 KeyEventDispatchCallback key_callback_;
91 EventDispatchCallback callback_; 89 EventDispatchCallback callback_;
92 90
93 DISALLOW_COPY_AND_ASSIGN(EventConverterEvdevImpl); 91 DISALLOW_COPY_AND_ASSIGN(EventConverterEvdevImpl);
94 }; 92 };
95 93
96 } // namespace ui 94 } // namespace ui
97 95
98 #endif // UI_EVENTS_OZONE_EVDEV_EVENT_CONVERTER_EVDEV_IMPL_H_ 96 #endif // UI_EVENTS_OZONE_EVDEV_EVENT_CONVERTER_EVDEV_IMPL_H_
99 97
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698