| 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 254 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 265 const EventConverterEvdev& converter) { | 265 const EventConverterEvdev& converter) { |
| 266 // For now the only information propagated is related to touchscreens. Ignore | 266 // For now the only information propagated is related to touchscreens. Ignore |
| 267 // events for everything but touchscreens. | 267 // events for everything but touchscreens. |
| 268 if (!converter.HasTouchscreen()) | 268 if (!converter.HasTouchscreen()) |
| 269 return; | 269 return; |
| 270 | 270 |
| 271 DeviceHotplugEventObserver* observer = DeviceDataManager::GetInstance(); | 271 DeviceHotplugEventObserver* observer = DeviceDataManager::GetInstance(); |
| 272 std::vector<TouchscreenDevice> touchscreens; | 272 std::vector<TouchscreenDevice> touchscreens; |
| 273 for (auto it = converters_.begin(); it != converters_.end(); ++it) { | 273 for (auto it = converters_.begin(); it != converters_.end(); ++it) { |
| 274 if (it->second->HasTouchscreen()) { | 274 if (it->second->HasTouchscreen()) { |
| 275 touchscreens.push_back(TouchscreenDevice(it->second->id(), | 275 touchscreens.push_back( |
| 276 it->second->GetTouchscreenSize(), | 276 TouchscreenDevice(it->second->id(), |
| 277 false /* is_internal */)); | 277 InputDeviceType::INPUT_DEVICE_EXTERNAL, |
| 278 std::string(), /* Device name */ |
| 279 it->second->GetTouchscreenSize())); |
| 278 } | 280 } |
| 279 } | 281 } |
| 280 | 282 |
| 281 observer->OnTouchscreenDevicesUpdated(touchscreens); | 283 observer->OnTouchscreenDevicesUpdated(touchscreens); |
| 282 } | 284 } |
| 283 | 285 |
| 284 int EventFactoryEvdev::NextDeviceId() { | 286 int EventFactoryEvdev::NextDeviceId() { |
| 285 return ++last_device_id_; | 287 return ++last_device_id_; |
| 286 } | 288 } |
| 287 | 289 |
| 288 } // namespace ui | 290 } // namespace ui |
| OLD | NEW |