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

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

Issue 851853002: It is time. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Trying to reup because the last upload failed. 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
(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_H_
6 #define UI_EVENTS_OZONE_EVDEV_EVENT_CONVERTER_EVDEV_H_
7
8 #include "base/callback.h"
9 #include "base/files/file_path.h"
10 #include "base/message_loop/message_loop.h"
11 #include "ui/events/ozone/evdev/event_dispatch_callback.h"
12 #include "ui/events/ozone/evdev/events_ozone_evdev_export.h"
13 #include "ui/gfx/geometry/size.h"
14
15 namespace ui {
16
17 class EVENTS_OZONE_EVDEV_EXPORT EventConverterEvdev
18 : public base::MessagePumpLibevent::Watcher {
19 public:
20 EventConverterEvdev(int fd, const base::FilePath& path, int id);
21 virtual ~EventConverterEvdev();
22
23 int id() const { return id_; }
24
25 const base::FilePath& path() { return path_; }
26
27 // Start reading events.
28 void Start();
29
30 // Stop reading events.
31 void Stop();
32
33 // Returns true of the converter is used for a touchscreen device.
34 virtual bool HasTouchscreen() const;
35
36 // Returns the size of the touchscreen device if the converter is used for a
37 // touchscreen device.
38 virtual gfx::Size GetTouchscreenSize() const;
39
40 protected:
41 // base::MessagePumpLibevent::Watcher:
42 virtual void OnFileCanWriteWithoutBlocking(int fd) override;
43
44 // File descriptor to read.
45 int fd_;
46
47 // Path to input device.
48 base::FilePath path_;
49
50 // Uniquely identifies an event converter.
51 int id_;
52
53 // Controller for watching the input fd.
54 base::MessagePumpLibevent::FileDescriptorWatcher controller_;
55
56 private:
57 DISALLOW_COPY_AND_ASSIGN(EventConverterEvdev);
58 };
59
60 } // namespace ui
61
62 #endif // UI_EVENTS_OZONE_EVDEV_EVENT_CONVERTER_EVDEV_H_
OLDNEW
« no previous file with comments | « ui/events/ozone/evdev/cursor_delegate_evdev.h ('k') | ui/events/ozone/evdev/event_converter_evdev.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698