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 #include "ui/events/devices/device_data_manager.h" | 5 #include "ui/events/devices/device_data_manager.h" |
6 | 6 |
7 #include "base/at_exit.h" | 7 #include "base/at_exit.h" |
8 #include "base/bind.h" | 8 #include "base/bind.h" |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "ui/display/display.h" | 10 #include "ui/display/display.h" |
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
144 devices.end(), | 144 devices.end(), |
145 touchscreen_devices_.begin(), | 145 touchscreen_devices_.begin(), |
146 InputDeviceEquals)) { | 146 InputDeviceEquals)) { |
147 return; | 147 return; |
148 } | 148 } |
149 touchscreen_devices_ = devices; | 149 touchscreen_devices_ = devices; |
150 NotifyObserversTouchscreenDeviceConfigurationChanged(); | 150 NotifyObserversTouchscreenDeviceConfigurationChanged(); |
151 } | 151 } |
152 | 152 |
153 void DeviceDataManager::OnKeyboardDevicesUpdated( | 153 void DeviceDataManager::OnKeyboardDevicesUpdated( |
154 const std::vector<KeyboardDevice>& devices) { | 154 const std::vector<InputDevice>& devices) { |
155 if (devices.size() == keyboard_devices_.size() && | 155 if (devices.size() == keyboard_devices_.size() && |
156 std::equal(devices.begin(), | 156 std::equal(devices.begin(), |
157 devices.end(), | 157 devices.end(), |
158 keyboard_devices_.begin(), | 158 keyboard_devices_.begin(), |
159 InputDeviceEquals)) { | 159 InputDeviceEquals)) { |
160 return; | 160 return; |
161 } | 161 } |
162 keyboard_devices_ = devices; | 162 keyboard_devices_ = devices; |
163 NotifyObserversKeyboardDeviceConfigurationChanged(); | 163 NotifyObserversKeyboardDeviceConfigurationChanged(); |
164 } | 164 } |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
220 | 220 |
221 void DeviceDataManager::SetTouchscreensEnabled(bool enabled) { | 221 void DeviceDataManager::SetTouchscreensEnabled(bool enabled) { |
222 touch_screens_enabled_ = enabled; | 222 touch_screens_enabled_ = enabled; |
223 } | 223 } |
224 | 224 |
225 bool DeviceDataManager::AreTouchscreensEnabled() const { | 225 bool DeviceDataManager::AreTouchscreensEnabled() const { |
226 return touch_screens_enabled_; | 226 return touch_screens_enabled_; |
227 } | 227 } |
228 | 228 |
229 } // namespace ui | 229 } // namespace ui |
OLD | NEW |