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

Side by Side Diff: ui/events/devices/device_data_manager.cc

Issue 2019413002: Remove KeyboardDevice class. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixes for comments. Created 4 years, 6 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 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 #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
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
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
OLDNEW
« no previous file with comments | « ui/events/devices/device_data_manager.h ('k') | ui/events/devices/device_hotplug_event_observer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698