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/debug/trace_event.h" | 10 #include "base/debug/trace_event.h" |
(...skipping 396 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
407 | 407 |
408 void InputDeviceFactoryEvdev::GetTouchDeviceStatus( | 408 void InputDeviceFactoryEvdev::GetTouchDeviceStatus( |
409 const GetTouchDeviceStatusReply& reply) { | 409 const GetTouchDeviceStatusReply& reply) { |
410 scoped_ptr<std::string> status(new std::string); | 410 scoped_ptr<std::string> status(new std::string); |
411 #if defined(USE_EVDEV_GESTURES) | 411 #if defined(USE_EVDEV_GESTURES) |
412 DumpTouchDeviceStatus(gesture_property_provider_.get(), status.get()); | 412 DumpTouchDeviceStatus(gesture_property_provider_.get(), status.get()); |
413 #endif | 413 #endif |
414 reply.Run(status.Pass()); | 414 reply.Run(status.Pass()); |
415 } | 415 } |
416 | 416 |
| 417 base::WeakPtr<InputDeviceFactoryEvdev> InputDeviceFactoryEvdev::GetWeakPtr() { |
| 418 return weak_ptr_factory_.GetWeakPtr(); |
| 419 } |
| 420 |
417 void InputDeviceFactoryEvdev::NotifyDeviceChange( | 421 void InputDeviceFactoryEvdev::NotifyDeviceChange( |
418 const EventConverterEvdev& converter) { | 422 const EventConverterEvdev& converter) { |
419 if (converter.HasTouchscreen()) | 423 if (converter.HasTouchscreen()) |
420 NotifyTouchscreensUpdated(); | 424 NotifyTouchscreensUpdated(); |
421 | 425 |
422 if (converter.HasKeyboard()) | 426 if (converter.HasKeyboard()) |
423 NotifyKeyboardsUpdated(); | 427 NotifyKeyboardsUpdated(); |
424 | 428 |
425 if (converter.HasMouse()) | 429 if (converter.HasMouse()) |
426 NotifyMouseDevicesUpdated(); | 430 NotifyMouseDevicesUpdated(); |
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
506 std::vector<int> ids; | 510 std::vector<int> ids; |
507 gesture_property_provider_->GetDeviceIdsByType(type, &ids); | 511 gesture_property_provider_->GetDeviceIdsByType(type, &ids); |
508 for (size_t i = 0; i < ids.size(); ++i) { | 512 for (size_t i = 0; i < ids.size(); ++i) { |
509 SetGestureBoolProperty(gesture_property_provider_.get(), ids[i], name, | 513 SetGestureBoolProperty(gesture_property_provider_.get(), ids[i], name, |
510 value); | 514 value); |
511 } | 515 } |
512 #endif | 516 #endif |
513 } | 517 } |
514 | 518 |
515 } // namespace ui | 519 } // namespace ui |
OLD | NEW |