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

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

Issue 677113002: ozone: evdev: Handle mouse events (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: adopt spang ideas Created 6 years, 2 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
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef UI_EVENTS_OZONE_EVDEV_EVENT_CONVERTER_EVDEV_IMPL_H_
6 #define UI_EVENTS_OZONE_EVDEV_EVENT_CONVERTER_EVDEV_IMPL_H_
7
8 #include "base/files/file_path.h"
9 #include "base/message_loop/message_pump_libevent.h"
10 #include "ui/events/event.h"
11 #include "ui/events/ozone/evdev/cursor_delegate_evdev.h"
12 #include "ui/events/ozone/evdev/event_converter_evdev.h"
13 #include "ui/events/ozone/evdev/event_modifiers_evdev.h"
14 #include "ui/events/ozone/evdev/events_ozone_evdev_export.h"
15 #include "ui/events/ozone/evdev/keyboard_evdev.h"
16
17 struct input_event;
18
19 namespace ui {
20
21 class EVENTS_OZONE_EVDEV_EXPORT EventConverterEvdevImpl
22 : public EventConverterEvdev {
23 public:
24 EventConverterEvdevImpl(int fd,
25 base::FilePath path,
26 int id,
27 CursorDelegateEvdev *cursor,
28 KeyboardEvdev* keyboard,
29 const EventDispatchCallback& callback);
30 virtual ~EventConverterEvdevImpl();
31
32 // EventConverterEvdev:
33 virtual void OnFileCanReadWithoutBlocking(int fd) override;
34
35 void ProcessEvents(const struct input_event* inputs, int count);
36
37 private:
38 void ConvertKeyEvent(const input_event& input);
39
40 void ConvertMouseMoveEvent(const input_event& input);
41
42 // Controller for watching the input fd.
43 base::MessagePumpLibevent::FileDescriptorWatcher controller_;
44
45 // Shared cursor state.
46 CursorDelegateEvdev *cursor_;
47
48 // Shared keyboard state.
49 KeyboardEvdev* keyboard_;
50
51 // Callback for dispatching events.
52 EventDispatchCallback callback_;
53
54 DISALLOW_COPY_AND_ASSIGN(EventConverterEvdevImpl);
55 };
56
57 } // namespace ui
58
59 #endif // UI_EVENTS_OZONE_EVDEV_EVENT_CONVERTER_EVDEV_IMPL_H_
60
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698