Commit 1fc2b963 authored by sadrul@chromium.org's avatar sadrul@chromium.org

ozone: Make the evdev implementation a PlatformEventSource.

Instead of using the EventFactoryOzone as the PlatformEventSource, allow
ozone's platform implementation to decide what to use as the event-source.
For the evdev ozone-platform, the event-factory (EventFactoryEvdev) remains
as the event source. In the case of X11 ozone-platform, it will create the
X11EventSource (currently used on chromeos and linux-aura) as the
event-source.

BUG=361137
R=spang@chromium.org

Review URL: https://codereview.chromium.org/280033002

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@269808 0039d316-1c4b-4281-b951-d872f2087c98
parent 5c4f9938
......@@ -156,7 +156,7 @@ EventFactoryEvdev::EventFactoryEvdev(
EventFactoryEvdev::~EventFactoryEvdev() { STLDeleteValues(&converters_); }
void EventFactoryEvdev::DispatchUiEvent(Event* event) {
EventFactoryOzone::DispatchEvent(event);
DispatchEvent(event);
}
void EventFactoryEvdev::AttachInputDevice(
......
......@@ -15,6 +15,7 @@
#include "ui/events/ozone/evdev/event_converter_evdev.h"
#include "ui/events/ozone/evdev/event_modifiers_evdev.h"
#include "ui/events/ozone/event_factory_ozone.h"
#include "ui/events/platform/platform_event_source.h"
namespace ui {
......@@ -22,8 +23,9 @@ class CursorDelegateEvdev;
class DeviceManager;
// Ozone events implementation for the Linux input subsystem ("evdev").
class EVENTS_EXPORT EventFactoryEvdev
: public EventFactoryOzone, DeviceEventObserver {
class EVENTS_EXPORT EventFactoryEvdev : public EventFactoryOzone,
public DeviceEventObserver,
public PlatformEventSource {
public:
EventFactoryEvdev();
EventFactoryEvdev(CursorDelegateEvdev* cursor,
......
......@@ -11,7 +11,6 @@
#include "base/message_loop/message_pump_libevent.h"
#include "base/task_runner.h"
#include "ui/events/events_export.h"
#include "ui/events/platform/platform_event_source.h"
#include "ui/gfx/native_widget_types.h"
namespace gfx {
......@@ -27,7 +26,7 @@ class Event;
// Ozone presumes that the set of file desctiprtors can vary at runtime so this
// class supports dynamically adding and removing |EventConverterOzone|
// instances as necessary.
class EVENTS_EXPORT EventFactoryOzone : public ui::PlatformEventSource {
class EVENTS_EXPORT EventFactoryOzone {
public:
EventFactoryOzone();
virtual ~EventFactoryOzone();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment