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

Side by Side Diff: ui/events/ozone/evdev/event_converter_evdev.h

Issue 971753006: ozone: evdev: Sync caps lock LED state to evdev (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: s/PLOG/LOG/ for short write. errno is not set in this case 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
« no previous file with comments | « no previous file | ui/events/ozone/evdev/event_converter_evdev.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_EVENT_CONVERTER_EVDEV_H_ 5 #ifndef UI_EVENTS_OZONE_EVDEV_EVENT_CONVERTER_EVDEV_H_
6 #define UI_EVENTS_OZONE_EVDEV_EVENT_CONVERTER_EVDEV_H_ 6 #define UI_EVENTS_OZONE_EVDEV_EVENT_CONVERTER_EVDEV_H_
7 7
8 #include <set> 8 #include <set>
9 9
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 48
49 // Returns true if the converter is used for a mouse device; 49 // Returns true if the converter is used for a mouse device;
50 virtual bool HasMouse() const; 50 virtual bool HasMouse() const;
51 51
52 // Returns true if the converter is used for a touchpad device. 52 // Returns true if the converter is used for a touchpad device.
53 virtual bool HasTouchpad() const; 53 virtual bool HasTouchpad() const;
54 54
55 // Returns true if the converter is used for a touchscreen device. 55 // Returns true if the converter is used for a touchscreen device.
56 virtual bool HasTouchscreen() const; 56 virtual bool HasTouchscreen() const;
57 57
58 // Returns true if the converter is used for a device with a caps lock LED.
59 virtual bool HasCapsLockLed() const;
60
58 // Returns the size of the touchscreen device if the converter is used for a 61 // Returns the size of the touchscreen device if the converter is used for a
59 // touchscreen device. 62 // touchscreen device.
60 virtual gfx::Size GetTouchscreenSize() const; 63 virtual gfx::Size GetTouchscreenSize() const;
61 64
62 // Returns the number of touch points this device supports. Should not be 65 // Returns the number of touch points this device supports. Should not be
63 // called unless HasTouchscreen() returns true 66 // called unless HasTouchscreen() returns true
64 virtual int GetTouchPoints() const; 67 virtual int GetTouchPoints() const;
65 68
66 // Sets which keyboard keys should be processed. 69 // Sets which keyboard keys should be processed.
67 virtual void SetAllowedKeys(scoped_ptr<std::set<DomCode>> allowed_keys); 70 virtual void SetAllowedKeys(scoped_ptr<std::set<DomCode>> allowed_keys);
68 71
69 // Allows all keys to be processed. 72 // Allows all keys to be processed.
70 virtual void AllowAllKeys(); 73 virtual void AllowAllKeys();
71 74
75 // Update caps lock LED state.
76 virtual void SetCapsLockLed(bool enabled);
77
72 // Helper to generate a base::TimeDelta from an input_event's time 78 // Helper to generate a base::TimeDelta from an input_event's time
73 static base::TimeDelta TimeDeltaFromInputEvent(const input_event& event); 79 static base::TimeDelta TimeDeltaFromInputEvent(const input_event& event);
74 80
75 protected: 81 protected:
76 // base::MessagePumpLibevent::Watcher: 82 // base::MessagePumpLibevent::Watcher:
77 void OnFileCanWriteWithoutBlocking(int fd) override; 83 void OnFileCanWriteWithoutBlocking(int fd) override;
78 84
79 // File descriptor to read. 85 // File descriptor to read.
80 int fd_; 86 int fd_;
81 87
(...skipping 12 matching lines...) Expand all
94 // Controller for watching the input fd. 100 // Controller for watching the input fd.
95 base::MessagePumpLibevent::FileDescriptorWatcher controller_; 101 base::MessagePumpLibevent::FileDescriptorWatcher controller_;
96 102
97 private: 103 private:
98 DISALLOW_COPY_AND_ASSIGN(EventConverterEvdev); 104 DISALLOW_COPY_AND_ASSIGN(EventConverterEvdev);
99 }; 105 };
100 106
101 } // namespace ui 107 } // namespace ui
102 108
103 #endif // UI_EVENTS_OZONE_EVDEV_EVENT_CONVERTER_EVDEV_H_ 109 #endif // UI_EVENTS_OZONE_EVDEV_EVENT_CONVERTER_EVDEV_H_
OLDNEW
« no previous file with comments | « no previous file | ui/events/ozone/evdev/event_converter_evdev.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698