| 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 e67d36d32338c0144c2a2acd0c7becd1e3698635..be155b4613d517ad1b8ef1408d6672d5aebbe359 100644
|
| --- a/ui/events/ozone/evdev/event_converter_evdev.h
|
| +++ b/ui/events/ozone/evdev/event_converter_evdev.h
|
| @@ -5,6 +5,8 @@
|
| #ifndef UI_EVENTS_OZONE_EVDEV_EVENT_CONVERTER_EVDEV_H_
|
| #define UI_EVENTS_OZONE_EVDEV_EVENT_CONVERTER_EVDEV_H_
|
|
|
| +#include <set>
|
| +
|
| #include "base/callback.h"
|
| #include "base/files/file_path.h"
|
| #include "base/message_loop/message_loop.h"
|
| @@ -14,6 +16,7 @@
|
| #include "ui/gfx/geometry/size.h"
|
|
|
| namespace ui {
|
| +enum class DomCode;
|
|
|
| class EVENTS_OZONE_EVDEV_EXPORT EventConverterEvdev
|
| : public base::MessagePumpLibevent::Watcher {
|
| @@ -30,22 +33,33 @@ class EVENTS_OZONE_EVDEV_EXPORT EventConverterEvdev
|
|
|
| InputDeviceType type() const { return type_; }
|
|
|
| + void set_ignore_events(bool ignore_events) { ignore_events_ = ignore_events; }
|
| +
|
| // Start reading events.
|
| void Start();
|
|
|
| // Stop reading events.
|
| void Stop();
|
|
|
| - // Returns true of the converter is used for a keyboard device.
|
| + // Returns true if the converter is used for a keyboard device.
|
| virtual bool HasKeyboard() const;
|
|
|
| - // Returns true of the converter is used for a touchscreen device.
|
| + // Returns true if the converter is used for a touchpad device.
|
| + virtual bool HasTouchpad() const;
|
| +
|
| + // Returns true if the converter is used for a touchscreen device.
|
| virtual bool HasTouchscreen() const;
|
|
|
| // Returns the size of the touchscreen device if the converter is used for a
|
| // touchscreen device.
|
| virtual gfx::Size GetTouchscreenSize() const;
|
|
|
| + // Sets which keyboard keys should be processed.
|
| + virtual void SetAllowedKeys(scoped_ptr<std::set<DomCode>> allowed_keys);
|
| +
|
| + // Allows all keys to be processed.
|
| + virtual void AllowAllKeys();
|
| +
|
| protected:
|
| // base::MessagePumpLibevent::Watcher:
|
| void OnFileCanWriteWithoutBlocking(int fd) override;
|
| @@ -62,6 +76,9 @@ class EVENTS_OZONE_EVDEV_EXPORT EventConverterEvdev
|
| // Type (internal or external).
|
| InputDeviceType type_;
|
|
|
| + // Whether events from the device should be ignored.
|
| + bool ignore_events_;
|
| +
|
| // Controller for watching the input fd.
|
| base::MessagePumpLibevent::FileDescriptorWatcher controller_;
|
|
|
|
|