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

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: rebase 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
« no previous file with comments | « ui/events/ozone/evdev/event_factory_evdev.h ('k') | ui/events/ozone/evdev/input_controller_evdev.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 b1350984d1786119d2691246792bd1968a4afcce..261b95ba925d78fa4944d72bfe1330f50e1cea1f 100644
--- a/ui/events/ozone/evdev/event_factory_evdev.cc
+++ b/ui/events/ozone/evdev/event_factory_evdev.cc
@@ -155,6 +155,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_.set_has_mouse(devices.size() != 0);
+}
+
+void EventFactoryEvdev::DispatchTouchpadDevicesUpdated(
+ const std::vector<InputDevice>& devices) {
+ // There's no list of touchpads in DeviceDataManager.
+ input_controller_.set_has_touchpad(devices.size() != 0);
+}
+
void EventFactoryEvdev::DispatchUiEventTask(scoped_ptr<Event> event) {
DispatchEvent(event.get());
}
« no previous file with comments | « ui/events/ozone/evdev/event_factory_evdev.h ('k') | ui/events/ozone/evdev/input_controller_evdev.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698