| 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 UI_EVENTS_OZONE_EVDEV_EVENT_FACTORY_EVDEV_H_ | 5 #ifndef UI_EVENTS_OZONE_EVDEV_EVENT_FACTORY_EVDEV_H_ |
| 6 #define UI_EVENTS_OZONE_EVDEV_EVENT_FACTORY_EVDEV_H_ | 6 #define UI_EVENTS_OZONE_EVDEV_EVENT_FACTORY_EVDEV_H_ |
| 7 | 7 |
| 8 #include <set> | 8 #include <set> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 71 void DisableInternalKeyboardExceptKeys( | 71 void DisableInternalKeyboardExceptKeys( |
| 72 scoped_ptr<std::set<DomCode>> excepted_keys); | 72 scoped_ptr<std::set<DomCode>> excepted_keys); |
| 73 | 73 |
| 74 // Enables all keys on the internal keyboard. | 74 // Enables all keys on the internal keyboard. |
| 75 void EnableInternalKeyboard(); | 75 void EnableInternalKeyboard(); |
| 76 | 76 |
| 77 scoped_ptr<SystemInputInjector> CreateSystemInputInjector(); | 77 scoped_ptr<SystemInputInjector> CreateSystemInputInjector(); |
| 78 | 78 |
| 79 InputController* input_controller() { return &input_controller_; } | 79 InputController* input_controller() { return &input_controller_; } |
| 80 | 80 |
| 81 // Post a key event to the unified keyboard (KeyboardEvdev). |
| 82 void PostKeyEvent(int device_id, unsigned int code, bool down); |
| 83 |
| 81 // Post a touch event to UI. | 84 // Post a touch event to UI. |
| 82 void PostTouchEvent(const TouchEventParams& params); | 85 void PostTouchEvent(const TouchEventParams& params); |
| 83 | 86 |
| 84 protected: | 87 protected: |
| 85 // DeviceEventObserver overrides: | 88 // DeviceEventObserver overrides: |
| 86 // | 89 // |
| 87 // Callback for device add (on UI thread). | 90 // Callback for device add (on UI thread). |
| 88 void OnDeviceEvent(const DeviceEvent& event) override; | 91 void OnDeviceEvent(const DeviceEvent& event) override; |
| 89 | 92 |
| 90 // PlatformEventSource: | 93 // PlatformEventSource: |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 147 | 150 |
| 148 // Support weak pointers for attach & detach callbacks. | 151 // Support weak pointers for attach & detach callbacks. |
| 149 base::WeakPtrFactory<EventFactoryEvdev> weak_ptr_factory_; | 152 base::WeakPtrFactory<EventFactoryEvdev> weak_ptr_factory_; |
| 150 | 153 |
| 151 DISALLOW_COPY_AND_ASSIGN(EventFactoryEvdev); | 154 DISALLOW_COPY_AND_ASSIGN(EventFactoryEvdev); |
| 152 }; | 155 }; |
| 153 | 156 |
| 154 } // namespace ui | 157 } // namespace ui |
| 155 | 158 |
| 156 #endif // UI_EVENTS_OZONE_EVDEV_EVENT_FACTORY_EVDEV_H_ | 159 #endif // UI_EVENTS_OZONE_EVDEV_EVENT_FACTORY_EVDEV_H_ |
| OLD | NEW |