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

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

Issue 806693009: Port ScopedDisableInternalMouseAndKeyboardX11 to Ozone (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years 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_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 <vector> 9 #include <vector>
9 10
10 #include "base/callback.h" 11 #include "base/callback.h"
11 #include "base/compiler_specific.h" 12 #include "base/compiler_specific.h"
12 #include "base/files/file_path.h" 13 #include "base/files/file_path.h"
13 #include "base/memory/ref_counted.h" 14 #include "base/memory/ref_counted.h"
14 #include "base/task_runner.h" 15 #include "base/task_runner.h"
16 #include "ui/events/keycodes/keyboard_codes.h"
15 #include "ui/events/ozone/device/device_event_observer.h" 17 #include "ui/events/ozone/device/device_event_observer.h"
16 #include "ui/events/ozone/evdev/event_converter_evdev.h" 18 #include "ui/events/ozone/evdev/event_converter_evdev.h"
17 #include "ui/events/ozone/evdev/event_device_info.h" 19 #include "ui/events/ozone/evdev/event_device_info.h"
18 #include "ui/events/ozone/evdev/event_modifiers_evdev.h" 20 #include "ui/events/ozone/evdev/event_modifiers_evdev.h"
19 #include "ui/events/ozone/evdev/events_ozone_evdev_export.h" 21 #include "ui/events/ozone/evdev/events_ozone_evdev_export.h"
20 #include "ui/events/ozone/evdev/input_controller_evdev.h" 22 #include "ui/events/ozone/evdev/input_controller_evdev.h"
21 #include "ui/events/ozone/evdev/keyboard_evdev.h" 23 #include "ui/events/ozone/evdev/keyboard_evdev.h"
22 #include "ui/events/ozone/evdev/mouse_button_map_evdev.h" 24 #include "ui/events/ozone/evdev/mouse_button_map_evdev.h"
23 #include "ui/events/platform/platform_event_source.h" 25 #include "ui/events/platform/platform_event_source.h"
24 #include "ui/gfx/native_widget_types.h" 26 #include "ui/gfx/native_widget_types.h"
(...skipping 26 matching lines...) Expand all
51 ~EventFactoryEvdev() override; 53 ~EventFactoryEvdev() override;
52 54
53 // Get a list of device ids that matches a device type. Return true if the 55 // Get a list of device ids that matches a device type. Return true if the
54 // list is not empty. |device_ids| can be NULL. 56 // list is not empty. |device_ids| can be NULL.
55 bool GetDeviceIdsByType(const EventDeviceType type, 57 bool GetDeviceIdsByType(const EventDeviceType type,
56 std::vector<int>* device_ids); 58 std::vector<int>* device_ids);
57 59
58 void WarpCursorTo(gfx::AcceleratedWidget widget, 60 void WarpCursorTo(gfx::AcceleratedWidget widget,
59 const gfx::PointF& location); 61 const gfx::PointF& location);
60 62
63 // Disables the internal touchpad.
64 void DisableInternalTouchpad();
65
66 // Enables the internal touchpad.
67 void EnableInternalTouchpad();
68
69 // Disables all keys on the internal keyboard except |excepted_keys|.
70 void DisableInternalKeyboardExceptKeys(
71 scoped_ptr<std::set<KeyboardCode>> excepted_keys);
72
73 // Enables all keys on the internal keyboard.
74 void EnableInternalKeyboard();
75
61 scoped_ptr<SystemInputInjector> CreateSystemInputInjector(); 76 scoped_ptr<SystemInputInjector> CreateSystemInputInjector();
62 77
63 InputController* input_controller() { return &input_controller_; } 78 InputController* input_controller() { return &input_controller_; }
64 79
65 protected: 80 protected:
66 // DeviceEventObserver overrides: 81 // DeviceEventObserver overrides:
67 // 82 //
68 // Callback for device add (on UI thread). 83 // Callback for device add (on UI thread).
69 void OnDeviceEvent(const DeviceEvent& event) override; 84 void OnDeviceEvent(const DeviceEvent& event) override;
70 85
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 143
129 // Support weak pointers for attach & detach callbacks. 144 // Support weak pointers for attach & detach callbacks.
130 base::WeakPtrFactory<EventFactoryEvdev> weak_ptr_factory_; 145 base::WeakPtrFactory<EventFactoryEvdev> weak_ptr_factory_;
131 146
132 DISALLOW_COPY_AND_ASSIGN(EventFactoryEvdev); 147 DISALLOW_COPY_AND_ASSIGN(EventFactoryEvdev);
133 }; 148 };
134 149
135 } // namespace ui 150 } // namespace ui
136 151
137 #endif // UI_EVENTS_OZONE_EVDEV_EVENT_FACTORY_EVDEV_H_ 152 #endif // UI_EVENTS_OZONE_EVDEV_EVENT_FACTORY_EVDEV_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698