| Index: ui/events/devices/device_data_manager.cc
|
| diff --git a/ui/events/devices/device_data_manager.cc b/ui/events/devices/device_data_manager.cc
|
| index 38a184cf91c40a18ddfa533b055dac5aba3fa4b9..9f0fe8eb2a01b660d091751b37a6a2006ad22fbe 100644
|
| --- a/ui/events/devices/device_data_manager.cc
|
| +++ b/ui/events/devices/device_data_manager.cc
|
| @@ -151,6 +151,10 @@ const std::vector<InputDevice>& DeviceDataManager::GetTouchpadDevices() const {
|
| return touchpad_devices_;
|
| }
|
|
|
| +const std::vector<InputDevice>& DeviceDataManager::GetGamepadDevices() const {
|
| + return gamepad_devices_;
|
| +}
|
| +
|
| bool DeviceDataManager::AreDeviceListsComplete() const {
|
| return device_lists_complete_;
|
| }
|
| @@ -214,6 +218,17 @@ void DeviceDataManager::OnTouchpadDevicesUpdated(
|
| NotifyObserversTouchpadDeviceConfigurationChanged();
|
| }
|
|
|
| +void DeviceDataManager::OnGamepadDevicesUpdated(
|
| + const std::vector<InputDevice>& devices) {
|
| + if (devices.size() == gamepad_devices_.size() &&
|
| + std::equal(devices.begin(), devices.end(), gamepad_devices_.begin(),
|
| + InputDeviceEquals)) {
|
| + return;
|
| + }
|
| + gamepad_devices_ = devices;
|
| + NotifyObserversGamepadDeviceConfigurationChanged();
|
| +}
|
| +
|
| void DeviceDataManager::OnDeviceListsComplete() {
|
| if (!device_lists_complete_) {
|
| device_lists_complete_ = true;
|
| @@ -237,6 +252,9 @@ NOTIFY_OBSERVERS(NotifyObserversMouseDeviceConfigurationChanged(),
|
| NOTIFY_OBSERVERS(NotifyObserversTouchpadDeviceConfigurationChanged(),
|
| OnTouchpadDeviceConfigurationChanged());
|
|
|
| +NOTIFY_OBSERVERS(NotifyObserversGamepadDeviceConfigurationChanged(),
|
| + OnGamepadDeviceConfigurationChanged());
|
| +
|
| NOTIFY_OBSERVERS(NotifyObserversDeviceListsComplete(), OnDeviceListsComplete());
|
|
|
| NOTIFY_OBSERVERS(NotifyObserversStylusStateChanged(StylusState state),
|
|
|