OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/input_device_factory_evdev.h" | 5 #include "ui/events/ozone/evdev/input_device_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/stl_util.h" | 10 #include "base/stl_util.h" |
(...skipping 349 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
360 } | 360 } |
361 } | 361 } |
362 | 362 |
363 bool InputDeviceFactoryEvdev::IsDeviceEnabled( | 363 bool InputDeviceFactoryEvdev::IsDeviceEnabled( |
364 const EventConverterEvdev* converter) { | 364 const EventConverterEvdev* converter) { |
365 if (!input_device_settings_.enable_internal_touchpad && | 365 if (!input_device_settings_.enable_internal_touchpad && |
366 converter->type() == InputDeviceType::INPUT_DEVICE_INTERNAL && | 366 converter->type() == InputDeviceType::INPUT_DEVICE_INTERNAL && |
367 converter->HasTouchpad()) | 367 converter->HasTouchpad()) |
368 return false; | 368 return false; |
369 | 369 |
| 370 if (!input_device_settings_.enable_touch_screens && |
| 371 converter->HasTouchscreen()) |
| 372 return false; |
| 373 |
370 return input_device_settings_.enable_devices; | 374 return input_device_settings_.enable_devices; |
371 } | 375 } |
372 | 376 |
373 void InputDeviceFactoryEvdev::UpdateDirtyFlags( | 377 void InputDeviceFactoryEvdev::UpdateDirtyFlags( |
374 const EventConverterEvdev* converter) { | 378 const EventConverterEvdev* converter) { |
375 if (converter->HasTouchscreen()) | 379 if (converter->HasTouchscreen()) |
376 touchscreen_list_dirty_ = true; | 380 touchscreen_list_dirty_ = true; |
377 | 381 |
378 if (converter->HasKeyboard()) | 382 if (converter->HasKeyboard()) |
379 keyboard_list_dirty_ = true; | 383 keyboard_list_dirty_ = true; |
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
476 std::vector<int> ids; | 480 std::vector<int> ids; |
477 gesture_property_provider_->GetDeviceIdsByType(type, &ids); | 481 gesture_property_provider_->GetDeviceIdsByType(type, &ids); |
478 for (size_t i = 0; i < ids.size(); ++i) { | 482 for (size_t i = 0; i < ids.size(); ++i) { |
479 SetGestureBoolProperty(gesture_property_provider_.get(), ids[i], name, | 483 SetGestureBoolProperty(gesture_property_provider_.get(), ids[i], name, |
480 value); | 484 value); |
481 } | 485 } |
482 #endif | 486 #endif |
483 } | 487 } |
484 | 488 |
485 } // namespace ui | 489 } // namespace ui |
OLD | NEW |