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

Unified Diff: ui/events/ozone/evdev/libgestures_glue/gesture_interpreter_libevdev_cros.cc

Issue 1003523004: Remove GestureInterpreterLibevdevCros::SetAllowedKeys() because it is a no-op (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 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
Index: ui/events/ozone/evdev/libgestures_glue/gesture_interpreter_libevdev_cros.cc
diff --git a/ui/events/ozone/evdev/libgestures_glue/gesture_interpreter_libevdev_cros.cc b/ui/events/ozone/evdev/libgestures_glue/gesture_interpreter_libevdev_cros.cc
index 7a0f8c918a4832f53334f807c0ffff5c377f2657..98bf5feec15ac61987e4b623fe19fd8c5f5cf1e7 100644
--- a/ui/events/ozone/evdev/libgestures_glue/gesture_interpreter_libevdev_cros.cc
+++ b/ui/events/ozone/evdev/libgestures_glue/gesture_interpreter_libevdev_cros.cc
@@ -214,25 +214,6 @@ void GestureInterpreterLibevdevCros::OnLibEvdevCrosStopped(
ReleaseMouseButtons(timestamp);
}
-void GestureInterpreterLibevdevCros::SetAllowedKeys(
- scoped_ptr<std::set<DomCode>> allowed_keys) {
- if (!allowed_keys) {
- allowed_keys_.reset();
- return;
- }
-
- allowed_keys_.reset(new std::set<int>());
- for (const auto& it : *allowed_keys) {
- int evdev_code =
- NativeCodeToEvdevCode(KeycodeConverter::DomCodeToNativeKeycode(it));
- allowed_keys_->insert(evdev_code);
- }
-}
-
-void GestureInterpreterLibevdevCros::AllowAllKeys() {
- allowed_keys_.reset();
-}
-
void GestureInterpreterLibevdevCros::OnGestureReady(const Gesture* gesture) {
switch (gesture->type) {
case kGestureTypeMove:
@@ -453,9 +434,6 @@ void GestureInterpreterLibevdevCros::DispatchChangedKeys(
if (key >= BTN_DIGI && key < BTN_WHEEL)
continue;
- if (allowed_keys_ && !allowed_keys_->count(key))
- continue;
-
// Dispatch key press or release to keyboard.
dispatcher_->DispatchKeyEvent(
KeyEventParams(id_, key, value, StimeToTimedelta(timestamp)));

Powered by Google App Engine
This is Rietveld 408576698