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

Unified Diff: ui/events/ozone/evdev/event_converter_evdev.h

Issue 790153005: ozone: evdev: Add property to identify internal or external devices (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | ui/events/ozone/evdev/event_converter_evdev.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/events/ozone/evdev/event_converter_evdev.h
diff --git a/ui/events/ozone/evdev/event_converter_evdev.h b/ui/events/ozone/evdev/event_converter_evdev.h
index af4f067767eecde241dc00ca9bb03320f3f3cb0a..5bb9e05325dd4999ee366eb90df287cf6784cce2 100644
--- a/ui/events/ozone/evdev/event_converter_evdev.h
+++ b/ui/events/ozone/evdev/event_converter_evdev.h
@@ -8,6 +8,7 @@
#include "base/callback.h"
#include "base/files/file_path.h"
#include "base/message_loop/message_loop.h"
+#include "ui/events/devices/input_device.h"
#include "ui/events/ozone/evdev/event_dispatch_callback.h"
#include "ui/events/ozone/evdev/events_ozone_evdev_export.h"
#include "ui/gfx/geometry/size.h"
@@ -17,13 +18,18 @@ namespace ui {
class EVENTS_OZONE_EVDEV_EXPORT EventConverterEvdev
: public base::MessagePumpLibevent::Watcher {
public:
- EventConverterEvdev(int fd, const base::FilePath& path, int id);
+ EventConverterEvdev(int fd,
+ const base::FilePath& path,
+ int id,
+ InputDeviceType type);
~EventConverterEvdev() override;
int id() const { return id_; }
const base::FilePath& path() const { return path_; }
+ InputDeviceType type() const { return type_; }
+
// Start reading events.
void Start();
@@ -37,9 +43,6 @@ class EVENTS_OZONE_EVDEV_EXPORT EventConverterEvdev
// touchscreen device.
virtual gfx::Size GetTouchscreenSize() const;
- // Returns true if the converter is used with an internal device.
- virtual bool IsInternal() const;
-
protected:
// base::MessagePumpLibevent::Watcher:
void OnFileCanWriteWithoutBlocking(int fd) override;
@@ -53,6 +56,9 @@ class EVENTS_OZONE_EVDEV_EXPORT EventConverterEvdev
// Uniquely identifies an event converter.
int id_;
+ // Type (internal or external).
+ InputDeviceType type_;
+
// Controller for watching the input fd.
base::MessagePumpLibevent::FileDescriptorWatcher controller_;
« no previous file with comments | « no previous file | ui/events/ozone/evdev/event_converter_evdev.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698