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

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 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
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..6b2056b09731bc2e3dabb1812c0271f5446bd457 100644
--- a/ui/events/ozone/evdev/event_converter_evdev_impl.h
+++ b/ui/events/ozone/evdev/event_converter_evdev_impl.h
@@ -5,10 +5,13 @@
#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"
#include "ui/events/event.h"
+#include "ui/events/keycodes/keyboard_codes.h"
#include "ui/events/ozone/evdev/cursor_delegate_evdev.h"
#include "ui/events/ozone/evdev/event_converter_evdev.h"
#include "ui/events/ozone/evdev/event_device_info.h"
@@ -38,7 +41,10 @@ class EVENTS_OZONE_EVDEV_EXPORT EventConverterEvdevImpl
// EventConverterEvdev:
void OnFileCanReadWithoutBlocking(int fd) override;
+ void SetAllowedKeys(scoped_ptr<std::set<KeyboardCode>> allowed_keys) override;
+ void AllowAllKeys() override;
bool HasKeyboard() const override;
+ bool HasTouchpad() const override;
void ProcessEvents(const struct input_event* inputs, int count);
@@ -55,6 +61,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 +72,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<KeyboardCode>> allowed_keys_;
+
// Shared cursor state.
CursorDelegateEvdev* cursor_;

Powered by Google App Engine
This is Rietveld 408576698