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

Unified Diff: ui/events/devices/device_data_manager.h

Issue 2028593004: Add new InputDeviceManager interface. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@remove_keyboard
Patch Set: Fix windows compile error. Created 4 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/events/devices/BUILD.gn ('k') | ui/events/devices/device_data_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/events/devices/device_data_manager.h
diff --git a/ui/events/devices/device_data_manager.h b/ui/events/devices/device_data_manager.h
index ddf400945c5ac30c6d16f045a3799f24a69fd5e8..fc441c12f86a0faaba70a840429ea21926f63a68 100644
--- a/ui/events/devices/device_data_manager.h
+++ b/ui/events/devices/device_data_manager.h
@@ -15,6 +15,7 @@
#include "base/observer_list.h"
#include "ui/events/devices/device_hotplug_event_observer.h"
#include "ui/events/devices/events_devices_export.h"
+#include "ui/events/devices/input_device_manager.h"
#include "ui/events/devices/touchscreen_device.h"
#include "ui/gfx/transform.h"
@@ -28,7 +29,8 @@ class InputDeviceEventObserver;
// Keeps track of device mappings and event transformations.
class EVENTS_DEVICES_EXPORT DeviceDataManager
- : public DeviceHotplugEventObserver {
+ : public InputDeviceManager,
+ public DeviceHotplugEventObserver {
public:
static const int kMaxDeviceNum = 128;
~DeviceDataManager() override;
@@ -50,29 +52,18 @@ class EVENTS_DEVICES_EXPORT DeviceDataManager
void UpdateTouchRadiusScale(int touch_device_id, double scale);
void ApplyTouchRadiusScale(int touch_device_id, double* radius);
- const std::vector<TouchscreenDevice>& touchscreen_devices() const {
- return touchscreen_devices_;
- }
-
- const std::vector<InputDevice>& keyboard_devices() const {
- return keyboard_devices_;
- }
-
- const std::vector<InputDevice>& mouse_devices() const {
- return mouse_devices_;
- }
-
- const std::vector<InputDevice>& touchpad_devices() const {
- return touchpad_devices_;
- }
-
- bool device_lists_complete() const { return device_lists_complete_; }
+ void SetTouchscreensEnabled(bool enabled);
- void AddObserver(InputDeviceEventObserver* observer);
- void RemoveObserver(InputDeviceEventObserver* observer);
+ // InputDeviceManager:
+ const std::vector<TouchscreenDevice>& GetTouchscreenDevices() const override;
+ const std::vector<InputDevice>& GetKeyboardDevices() const override;
+ const std::vector<InputDevice>& GetMouseDevices() const override;
+ const std::vector<InputDevice>& GetTouchpadDevices() const override;
+ bool AreDeviceListsComplete() const override;
+ bool AreTouchscreensEnabled() const override;
- void SetTouchscreensEnabled(bool enabled);
- bool AreTouchscreensEnabled() const;
+ void AddObserver(InputDeviceEventObserver* observer) override;
+ void RemoveObserver(InputDeviceEventObserver* observer) override;
protected:
DeviceDataManager();
« no previous file with comments | « ui/events/devices/BUILD.gn ('k') | ui/events/devices/device_data_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698