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

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

Issue 875513005: [PATCH 10/11] ozone: evdev: Add a device factory proxy that forwards to device thread (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 dea1c34167f90fdeb8681ab72710defbbfa32571..fcf4d34a8b1ca989a528e996d39181c5afe9c5bc 100644
--- a/ui/events/ozone/evdev/event_factory_evdev.cc
+++ b/ui/events/ozone/evdev/event_factory_evdev.cc
@@ -17,6 +17,7 @@
#include "ui/events/ozone/evdev/cursor_delegate_evdev.h"
#include "ui/events/ozone/evdev/input_controller_evdev.h"
#include "ui/events/ozone/evdev/input_device_factory_evdev.h"
+#include "ui/events/ozone/evdev/input_device_factory_evdev_proxy.h"
#include "ui/events/ozone/evdev/input_injector_evdev.h"
namespace ui {
@@ -133,9 +134,12 @@ void EventFactoryEvdev::Init() {
weak_ptr_factory_.GetWeakPtr()));
input_device_factory_.reset(
new InputDeviceFactoryEvdev(dispatcher.Pass(), cursor_));
+ input_device_factory_proxy_.reset(
+ new InputDeviceFactoryEvdevProxy(base::ThreadTaskRunnerHandle::Get(),
+ input_device_factory_->GetWeakPtr()));
// TODO(spang): This settings interface is really broken. crbug.com/450899
- input_controller_.SetInputDeviceFactory(input_device_factory_.get());
+ input_controller_.SetInputDeviceFactory(input_device_factory_proxy_.get());
// Scan & monitor devices.
device_manager_->AddObserver(this);
@@ -279,12 +283,12 @@ void EventFactoryEvdev::OnDeviceEvent(const DeviceEvent& event) {
case DeviceEvent::ADD:
case DeviceEvent::CHANGE: {
TRACE_EVENT1("ozone", "OnDeviceAdded", "path", event.path().value());
- input_device_factory_->AddInputDevice(NextDeviceId(), event.path());
+ input_device_factory_proxy_->AddInputDevice(NextDeviceId(), event.path());
break;
}
case DeviceEvent::REMOVE: {
TRACE_EVENT1("ozone", "OnDeviceRemoved", "path", event.path().value());
- input_device_factory_->RemoveInputDevice(event.path());
+ input_device_factory_proxy_->RemoveInputDevice(event.path());
break;
}
}
« 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