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

Side by Side Diff: ui/events/ozone/evdev/libgestures_glue/event_reader_libevdev_cros.h

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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef UI_EVENTS_OZONE_EVDEV_LIBGESTURES_GLUE_EVENT_READER_LIBEVDEV_CROS_H_ 5 #ifndef UI_EVENTS_OZONE_EVDEV_LIBGESTURES_GLUE_EVENT_READER_LIBEVDEV_CROS_H_
6 #define UI_EVENTS_OZONE_EVDEV_LIBGESTURES_GLUE_EVENT_READER_LIBEVDEV_CROS_H_ 6 #define UI_EVENTS_OZONE_EVDEV_LIBGESTURES_GLUE_EVENT_READER_LIBEVDEV_CROS_H_
7 7
8 #include <libevdev/libevdev.h> 8 #include <libevdev/libevdev.h>
9 9
10 #include "base/files/file_path.h" 10 #include "base/files/file_path.h"
(...skipping 19 matching lines...) Expand all
30 // Notifier for open. This is called with the initial event state. 30 // Notifier for open. This is called with the initial event state.
31 virtual void OnLibEvdevCrosOpen(Evdev* evdev, EventStateRec* evstate) = 0; 31 virtual void OnLibEvdevCrosOpen(Evdev* evdev, EventStateRec* evstate) = 0;
32 32
33 // Notifier for event. This is called with the updated event state. 33 // Notifier for event. This is called with the updated event state.
34 virtual void OnLibEvdevCrosEvent(Evdev* evdev, 34 virtual void OnLibEvdevCrosEvent(Evdev* evdev,
35 EventStateRec* state, 35 EventStateRec* state,
36 const timeval& time) = 0; 36 const timeval& time) = 0;
37 37
38 // Notifier for stop. This is called with the final event state. 38 // Notifier for stop. This is called with the final event state.
39 virtual void OnLibEvdevCrosStopped(Evdev* evdev, EventStateRec* state) = 0; 39 virtual void OnLibEvdevCrosStopped(Evdev* evdev, EventStateRec* state) = 0;
40
41 // Sets which keyboard keys should be processed.
42 virtual void SetAllowedKeys(scoped_ptr<std::set<DomCode>> allowed_keys) = 0;
43
44 // Allows all keys to be processed.
45 virtual void AllowAllKeys() = 0;
46 }; 40 };
47 41
48 EventReaderLibevdevCros(int fd, 42 EventReaderLibevdevCros(int fd,
49 const base::FilePath& path, 43 const base::FilePath& path,
50 int id, 44 int id,
51 InputDeviceType type, 45 InputDeviceType type,
52 const EventDeviceInfo& devinfo, 46 const EventDeviceInfo& devinfo,
53 scoped_ptr<Delegate> delegate); 47 scoped_ptr<Delegate> delegate);
54 ~EventReaderLibevdevCros() override; 48 ~EventReaderLibevdevCros() override;
55 49
56 // EventConverterEvdev: 50 // EventConverterEvdev:
57 void OnFileCanReadWithoutBlocking(int fd) override; 51 void OnFileCanReadWithoutBlocking(int fd) override;
58 bool HasKeyboard() const override; 52 bool HasKeyboard() const override;
59 bool HasMouse() const override; 53 bool HasMouse() const override;
60 bool HasTouchpad() const override; 54 bool HasTouchpad() const override;
61 bool HasCapsLockLed() const override; 55 bool HasCapsLockLed() const override;
62 void SetAllowedKeys(scoped_ptr<std::set<DomCode>> allowed_keys) override;
63 void AllowAllKeys() override;
64 void OnStopped() override; 56 void OnStopped() override;
65 57
66 private: 58 private:
67 static void OnSynReport(void* data, 59 static void OnSynReport(void* data,
68 EventStateRec* evstate, 60 EventStateRec* evstate,
69 struct timeval* tv); 61 struct timeval* tv);
70 static void OnLogMessage(void*, int level, const char*, ...); 62 static void OnLogMessage(void*, int level, const char*, ...);
71 63
72 // Input modalities for this device. 64 // Input modalities for this device.
73 bool has_keyboard_; 65 bool has_keyboard_;
(...skipping 14 matching lines...) Expand all
88 80
89 // Delegate for event processing. 81 // Delegate for event processing.
90 scoped_ptr<Delegate> delegate_; 82 scoped_ptr<Delegate> delegate_;
91 83
92 DISALLOW_COPY_AND_ASSIGN(EventReaderLibevdevCros); 84 DISALLOW_COPY_AND_ASSIGN(EventReaderLibevdevCros);
93 }; 85 };
94 86
95 } // namspace ui 87 } // namspace ui
96 88
97 #endif // UI_EVENTS_OZONE_EVDEV_LIBGESTURES_GLUE_EVENT_READER_LIBEVDEV_CROS_H_ 89 #endif // UI_EVENTS_OZONE_EVDEV_LIBGESTURES_GLUE_EVENT_READER_LIBEVDEV_CROS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698