OLD | NEW |
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 CHROME_BROWSER_CHROMEOS_EVENTS_EVENT_REWRITER_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_EVENTS_EVENT_REWRITER_H_ |
6 #define CHROME_BROWSER_CHROMEOS_EVENTS_EVENT_REWRITER_H_ | 6 #define CHROME_BROWSER_CHROMEOS_EVENTS_EVENT_REWRITER_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <set> | 9 #include <set> |
10 #include <string> | 10 #include <string> |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
59 // Gets DeviceType from the |device_name|. | 59 // Gets DeviceType from the |device_name|. |
60 static DeviceType GetDeviceType(const std::string& device_name); | 60 static DeviceType GetDeviceType(const std::string& device_name); |
61 | 61 |
62 private: | 62 private: |
63 friend class EventRewriterAshTest; | 63 friend class EventRewriterAshTest; |
64 friend class EventRewriterTest; | 64 friend class EventRewriterTest; |
65 | 65 |
66 void DeviceKeyPressedOrReleased(int device_id); | 66 void DeviceKeyPressedOrReleased(int device_id); |
67 | 67 |
68 // base::MessagePumpObserver overrides: | 68 // base::MessagePumpObserver overrides: |
69 virtual base::EventStatus WillProcessEvent( | 69 virtual void WillProcessEvent(const base::NativeEvent& event) OVERRIDE; |
70 const base::NativeEvent& event) OVERRIDE; | |
71 virtual void DidProcessEvent(const base::NativeEvent& event) OVERRIDE; | 70 virtual void DidProcessEvent(const base::NativeEvent& event) OVERRIDE; |
72 | 71 |
73 // DeviceHierarchyObserver overrides: | 72 // DeviceHierarchyObserver overrides: |
74 virtual void DeviceHierarchyChanged() OVERRIDE; | 73 virtual void DeviceHierarchyChanged() OVERRIDE; |
75 virtual void DeviceAdded(int device_id) OVERRIDE; | 74 virtual void DeviceAdded(int device_id) OVERRIDE; |
76 virtual void DeviceRemoved(int device_id) OVERRIDE; | 75 virtual void DeviceRemoved(int device_id) OVERRIDE; |
77 | 76 |
78 // We don't want to include Xlib.h here since it has polluting macros, so | 77 // We don't want to include Xlib.h here since it has polluting macros, so |
79 // define these locally. | 78 // define these locally. |
80 typedef unsigned long KeySym; | 79 typedef unsigned long KeySym; |
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
197 keyboard_driven_event_rewriter_; | 196 keyboard_driven_event_rewriter_; |
198 | 197 |
199 const PrefService* pref_service_for_testing_; | 198 const PrefService* pref_service_for_testing_; |
200 | 199 |
201 DISALLOW_COPY_AND_ASSIGN(EventRewriter); | 200 DISALLOW_COPY_AND_ASSIGN(EventRewriter); |
202 }; | 201 }; |
203 | 202 |
204 } // namespace chromeos | 203 } // namespace chromeos |
205 | 204 |
206 #endif // CHROME_BROWSER_CHROMEOS_EVENTS_EVENT_REWRITER_H_ | 205 #endif // CHROME_BROWSER_CHROMEOS_EVENTS_EVENT_REWRITER_H_ |
OLD | NEW |