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

Side by Side Diff: ui/events/ozone/evdev/event_factory_evdev.cc

Issue 618283003: Adds special support to the device manager for keyboards devices. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase to master. Created 6 years, 1 month 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
« no previous file with comments | « ui/events/keyboard_device.cc ('k') | ui/events/touchscreen_device.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/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 277 matching lines...) Expand 10 before | Expand all | Expand 10 after
288 const EventConverterEvdev& converter) { 288 const EventConverterEvdev& converter) {
289 // For now the only information propagated is related to touchscreens. Ignore 289 // For now the only information propagated is related to touchscreens. Ignore
290 // events for everything but touchscreens. 290 // events for everything but touchscreens.
291 if (!converter.HasTouchscreen()) 291 if (!converter.HasTouchscreen())
292 return; 292 return;
293 293
294 DeviceHotplugEventObserver* observer = DeviceDataManager::GetInstance(); 294 DeviceHotplugEventObserver* observer = DeviceDataManager::GetInstance();
295 std::vector<TouchscreenDevice> touchscreens; 295 std::vector<TouchscreenDevice> touchscreens;
296 for (auto it = converters_.begin(); it != converters_.end(); ++it) { 296 for (auto it = converters_.begin(); it != converters_.end(); ++it) {
297 if (it->second->HasTouchscreen()) { 297 if (it->second->HasTouchscreen()) {
298 touchscreens.push_back(TouchscreenDevice(it->second->id(), 298 touchscreens.push_back(
299 it->second->GetTouchscreenSize(), 299 TouchscreenDevice(it->second->id(),
300 false /* is_internal */)); 300 InputDeviceType::INPUT_DEVICE_EXTERNAL,
301 std::string(), /* Device name */
302 it->second->GetTouchscreenSize()));
301 } 303 }
302 } 304 }
303 305
304 observer->OnTouchscreenDevicesUpdated(touchscreens); 306 observer->OnTouchscreenDevicesUpdated(touchscreens);
305 } 307 }
306 308
307 int EventFactoryEvdev::NextDeviceId() { 309 int EventFactoryEvdev::NextDeviceId() {
308 return ++last_device_id_; 310 return ++last_device_id_;
309 } 311 }
310 312
311 } // namespace ui 313 } // namespace ui
OLDNEW
« no previous file with comments | « ui/events/keyboard_device.cc ('k') | ui/events/touchscreen_device.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698