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

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

Issue 873833002: [PATCH 11/11] ozone: evdev: Add dedicated events thread (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.h
diff --git a/ui/events/ozone/evdev/event_factory_evdev.h b/ui/events/ozone/evdev/event_factory_evdev.h
index 9985664f2f6dd3fa607a543c5eb4086a41ae7be5..7628dd01be47f2a2a485f842d74b459212f78a6e 100644
--- a/ui/events/ozone/evdev/event_factory_evdev.h
+++ b/ui/events/ozone/evdev/event_factory_evdev.h
@@ -13,6 +13,7 @@
#include "ui/events/ozone/device/device_event_observer.h"
#include "ui/events/ozone/evdev/device_event_dispatcher_evdev.h"
#include "ui/events/ozone/evdev/event_modifiers_evdev.h"
+#include "ui/events/ozone/evdev/event_thread_evdev.h"
#include "ui/events/ozone/evdev/events_ozone_evdev_export.h"
#include "ui/events/ozone/evdev/input_controller_evdev.h"
#include "ui/events/ozone/evdev/keyboard_evdev.h"
@@ -97,6 +98,11 @@ class EVENTS_OZONE_EVDEV_EXPORT EventFactoryEvdev : public DeviceEventObserver,
int NextDeviceId();
+ // Device thread initialization.
+ void StartThread();
+ void OnThreadStarted(
+ scoped_ptr<InputDeviceFactoryProxyEvdev> input_device_factory);
+
// Used to uniquely identify input devices.
int last_device_id_;
@@ -104,7 +110,6 @@ class EVENTS_OZONE_EVDEV_EXPORT EventFactoryEvdev : public DeviceEventObserver,
DeviceManager* device_manager_; // Not owned.
// Factory for per-device objects.
- scoped_ptr<InputDeviceFactoryEvdev> input_device_factory_;
scoped_ptr<InputDeviceFactoryProxyEvdev> input_device_factory_proxy_;
// Dispatch callback for events.
@@ -125,9 +130,12 @@ class EVENTS_OZONE_EVDEV_EXPORT EventFactoryEvdev : public DeviceEventObserver,
// Object for controlling input devices.
InputControllerEvdev input_controller_;
- // Whether we've set up the device factory & done initial scan.
+ // Whether we've set up the device factory.
bool initialized_;
+ // Thread for device I/O.
+ EventThreadEvdev thread_;
+
// Support weak pointers for attach & detach callbacks.
base::WeakPtrFactory<EventFactoryEvdev> weak_ptr_factory_;

Powered by Google App Engine
This is Rietveld 408576698