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/ozone/evdev/event_factory_evdev.h" | 5 #include "ui/events/ozone/evdev/event_factory_evdev.h" |
6 | 6 |
7 #include <fcntl.h> | 7 #include <fcntl.h> |
8 #include <linux/input.h> | 8 #include <linux/input.h> |
9 | 9 |
10 #include "base/debug/trace_event.h" | 10 #include "base/debug/trace_event.h" |
(...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
253 const EventConverterEvdev& converter) { | 253 const EventConverterEvdev& converter) { |
254 // For now the only information propagated is related to touchscreens. Ignore | 254 // For now the only information propagated is related to touchscreens. Ignore |
255 // events for everything but touchscreens. | 255 // events for everything but touchscreens. |
256 if (!converter.HasTouchscreen()) | 256 if (!converter.HasTouchscreen()) |
257 return; | 257 return; |
258 | 258 |
259 DeviceHotplugEventObserver* observer = DeviceDataManager::GetInstance(); | 259 DeviceHotplugEventObserver* observer = DeviceDataManager::GetInstance(); |
260 std::vector<TouchscreenDevice> touchscreens; | 260 std::vector<TouchscreenDevice> touchscreens; |
261 for (auto it = converters_.begin(); it != converters_.end(); ++it) { | 261 for (auto it = converters_.begin(); it != converters_.end(); ++it) { |
262 if (it->second->HasTouchscreen()) { | 262 if (it->second->HasTouchscreen()) { |
263 touchscreens.push_back(TouchscreenDevice(it->second->id(), | 263 touchscreens.push_back(TouchscreenDevice( |
264 it->second->GetTouchscreenSize(), | 264 it->second->id(), |
265 false /* is_internal */)); | 265 InputDeviceType::EXTERNAL, |
| 266 "", /* Device name */ |
| 267 it->second->GetTouchscreenSize())); |
266 } | 268 } |
267 } | 269 } |
268 | 270 |
269 observer->OnTouchscreenDevicesUpdated(touchscreens); | 271 observer->OnTouchscreenDevicesUpdated(touchscreens); |
270 } | 272 } |
271 | 273 |
272 int EventFactoryEvdev::NextDeviceId() { | 274 int EventFactoryEvdev::NextDeviceId() { |
273 return ++last_device_id_; | 275 return ++last_device_id_; |
274 } | 276 } |
275 | 277 |
276 } // namespace ui | 278 } // namespace ui |
OLD | NEW |