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

Unified Diff: ui/events/ozone/evdev/event_factory_evdev.cc

Issue 868043003: [PATCH 8/11] ozone: evdev: Plumb device changes to EventFactoryEvdev (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: updates for events_unittests Created 5 years, 11 months 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 side-by-side diff with in-line comments
Download patch
Index: ui/events/ozone/evdev/event_factory_evdev.cc
diff --git a/ui/events/ozone/evdev/event_factory_evdev.cc b/ui/events/ozone/evdev/event_factory_evdev.cc
index 79b81a81aa47821f734c9b2dad5cb7e5e4253aa5..e3b1caa876b94b038e189a5a644b6e76afa31886 100644
--- a/ui/events/ozone/evdev/event_factory_evdev.cc
+++ b/ui/events/ozone/evdev/event_factory_evdev.cc
@@ -159,6 +159,30 @@ void EventFactoryEvdev::PostUiEvent(scoped_ptr<Event> event) {
base::Passed(&event)));
}
+void EventFactoryEvdev::DispatchKeyboardDevicesUpdated(
+ const std::vector<KeyboardDevice>& devices) {
+ DeviceHotplugEventObserver* observer = DeviceDataManager::GetInstance();
+ observer->OnKeyboardDevicesUpdated(devices);
+}
+
+void EventFactoryEvdev::DispatchTouchscreenDevicesUpdated(
+ const std::vector<TouchscreenDevice>& devices) {
+ DeviceHotplugEventObserver* observer = DeviceDataManager::GetInstance();
+ observer->OnTouchscreenDevicesUpdated(devices);
+}
+
+void EventFactoryEvdev::DispatchMouseDevicesUpdated(
+ const std::vector<InputDevice>& devices) {
+ // There's no list of mice in DeviceDataManager.
+ input_controller_.SetHasMouse(devices.size() != 0);
+}
+
+void EventFactoryEvdev::DispatchTouchpadDevicesUpdated(
+ const std::vector<InputDevice>& devices) {
+ // There's no list of touchpads in DeviceDataManager.
+ input_controller_.SetHasTouchpad(devices.size() != 0);
+}
+
void EventFactoryEvdev::DispatchUiEventTask(scoped_ptr<Event> event) {
DispatchEvent(event.get());
}

Powered by Google App Engine
This is Rietveld 408576698