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

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

Issue 806693009: Port ScopedDisableInternalMouseAndKeyboardX11 to Ozone (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/events/ozone/evdev/event_converter_evdev.cc ('k') | ui/events/ozone/evdev/event_converter_evdev_impl.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_impl.h
diff --git a/ui/events/ozone/evdev/event_converter_evdev_impl.h b/ui/events/ozone/evdev/event_converter_evdev_impl.h
index c7e66fe983b384cf62855599cc72effeed388675..c9ab9d4bae3650de97f8afc59a0ce1ccac2910c0 100644
--- a/ui/events/ozone/evdev/event_converter_evdev_impl.h
+++ b/ui/events/ozone/evdev/event_converter_evdev_impl.h
@@ -5,6 +5,8 @@
#ifndef UI_EVENTS_OZONE_EVDEV_EVENT_CONVERTER_EVDEV_IMPL_H_
#define UI_EVENTS_OZONE_EVDEV_EVENT_CONVERTER_EVDEV_IMPL_H_
+#include <set>
+
#include "base/files/file_path.h"
#include "base/message_loop/message_pump_libevent.h"
#include "ui/events/devices/input_device.h"
@@ -39,6 +41,9 @@ class EVENTS_OZONE_EVDEV_EXPORT EventConverterEvdevImpl
// EventConverterEvdev:
void OnFileCanReadWithoutBlocking(int fd) override;
bool HasKeyboard() const override;
+ bool HasTouchpad() const override;
+ void SetAllowedKeys(scoped_ptr<std::set<DomCode>> allowed_keys) override;
+ void AllowAllKeys() override;
void ProcessEvents(const struct input_event* inputs, int count);
@@ -55,6 +60,7 @@ class EVENTS_OZONE_EVDEV_EXPORT EventConverterEvdevImpl
// Input modalities for this device.
bool has_keyboard_;
+ bool has_touchpad_;
// Save x-axis events of relative devices to be flushed at EV_SYN time.
int x_offset_;
@@ -65,6 +71,10 @@ class EVENTS_OZONE_EVDEV_EXPORT EventConverterEvdevImpl
// Controller for watching the input fd.
base::MessagePumpLibevent::FileDescriptorWatcher controller_;
+ // The keys which should be processed. nullptr if all keys should be
+ // processed.
+ scoped_ptr<std::set<DomCode>> allowed_keys_;
+
// Shared cursor state.
CursorDelegateEvdev* cursor_;
« no previous file with comments | « ui/events/ozone/evdev/event_converter_evdev.cc ('k') | ui/events/ozone/evdev/event_converter_evdev_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698