diff options
author | sadrul@chromium.org <sadrul@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-05-16 16:56:20 +0000 |
---|---|---|
committer | sadrul@chromium.org <sadrul@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-05-16 16:56:20 +0000 |
commit | 885fe5dc0508fa7973397d2414049ba2f4b9bf9d (patch) | |
tree | 85e47f6c95822e2592f753c9c4dfb71762913278 /ui/ozone | |
parent | 60c86b06ecb35404f9bdde6255dd66505d4bb160 (diff) | |
download | chromium_src-885fe5dc0508fa7973397d2414049ba2f4b9bf9d.zip chromium_src-885fe5dc0508fa7973397d2414049ba2f4b9bf9d.tar.gz chromium_src-885fe5dc0508fa7973397d2414049ba2f4b9bf9d.tar.bz2 |
ozone: Remove the explicit call to start listening for events.
It is not necessary for WindowTreeHostOzone to call into the event-factory
to explicitly request it to start receiving events. The evdev implementation
can start listening to the events immediately, and the canca implementation
can start listening for events when the dispatcher list changes (this is the
same we do for the libevent based x11 event-source).
BUG=361137
R=spang@chromium.org
Review URL: https://codereview.chromium.org/285303004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@271036 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui/ozone')
-rw-r--r-- | ui/ozone/platform/caca/caca_event_factory.cc | 8 | ||||
-rw-r--r-- | ui/ozone/platform/caca/caca_event_factory.h | 9 |
2 files changed, 10 insertions, 7 deletions
diff --git a/ui/ozone/platform/caca/caca_event_factory.cc b/ui/ozone/platform/caca/caca_event_factory.cc index dd8bfc2..c17e5a4 100644 --- a/ui/ozone/platform/caca/caca_event_factory.cc +++ b/ui/ozone/platform/caca/caca_event_factory.cc @@ -146,15 +146,15 @@ CacaEventFactory::CacaEventFactory(CacaConnection* connection) CacaEventFactory::~CacaEventFactory() { } -void CacaEventFactory::StartProcessingEvents() { - ScheduleEventProcessing(); -} - void CacaEventFactory::WarpCursorTo(gfx::AcceleratedWidget widget, const gfx::PointF& location) { NOTIMPLEMENTED(); } +void CacaEventFactory::OnDispatcherListChanged() { + ScheduleEventProcessing(); +} + void CacaEventFactory::ScheduleEventProcessing() { // Caca uses a poll based event retrieval. Since we don't want to block we'd // either need to spin up a new thread or just poll. For simplicity just poll diff --git a/ui/ozone/platform/caca/caca_event_factory.h b/ui/ozone/platform/caca/caca_event_factory.h index 18afe35..b3f13d1 100644 --- a/ui/ozone/platform/caca/caca_event_factory.h +++ b/ui/ozone/platform/caca/caca_event_factory.h @@ -15,17 +15,20 @@ namespace ui { class CacaConnection; -class CacaEventFactory : public EventFactoryOzone, PlatformEventSource { +class CacaEventFactory : public EventFactoryOzone, + public PlatformEventSource { public: CacaEventFactory(CacaConnection* connection); virtual ~CacaEventFactory(); - // ui::EventFactoryOzone overrides: - virtual void StartProcessingEvents() OVERRIDE; + // ui::EventFactoryOzone: virtual void WarpCursorTo(gfx::AcceleratedWidget widget, const gfx::PointF& location) OVERRIDE; private: + // PlatformEventSource: + virtual void OnDispatcherListChanged() OVERRIDE; + void ScheduleEventProcessing(); void TryProcessingEvent(); |