summaryrefslogtreecommitdiffstats
path: root/ui/events/platform/platform_event_source_stub.cc
diff options
context:
space:
mode:
authorsadrul@chromium.org <sadrul@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-04-05 15:24:03 +0000
committersadrul@chromium.org <sadrul@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-04-05 15:24:03 +0000
commit9a2e75dde876521fdd1f39c9646902aade1f8c89 (patch)
treeeb35e3f9c005694a7e929fbe8b8bbb3b7f3976d6 /ui/events/platform/platform_event_source_stub.cc
parentb390cd8541458f9c87053de63873860f72566a52 (diff)
downloadchromium_src-9a2e75dde876521fdd1f39c9646902aade1f8c89.zip
chromium_src-9a2e75dde876521fdd1f39c9646902aade1f8c89.tar.gz
chromium_src-9a2e75dde876521fdd1f39c9646902aade1f8c89.tar.bz2
x11: Move X event handling out of the message-pump.
This change moves the X11 event handling out of the X11 message-pump, and uses the X11 event dispatch code from X11EventSource instead. Overview of the changes: * Remove all X event handling code from the message-pump. The X11 message-pump only opens the connection to the X11 server. This too will be moved out of here in subsequent patches. * The X11EventSource sends an XEvent it receives from the X11 server back to the X11 message-pump, which triggers the MessagePumpObservers, before sending the event to the dispatchers. This is a short-term workaround until the message-pump observers are converted into PlatformEventObservers. * The MessagePumpDispatcher implementations that deal with X11 events are converted into PlatformEventDispatchers. * Remove support for starting a nested message-loop with a custom dispatcher on non-Windows. Changes in components: //ash: * Split AcceleratorDispatcher into platform-specific AcceleratorDispatcherWin, which remains a MessagePumpDispatcher, and AcceleratorDispatcherLinux, which is a PlatformEventDispatcher. It may be possible to do some cleanup in this, depending on the outcome of http://crbug.com/357777 and http://crbug.com/357733. //base: * Remove support for providing a custom MessagePumpDispatcher when starting a nested message-loop on non-Windows platforms. * Remove most of the event-dispatch code from MessagePumpX11. The only remaining bits are for triggering MessagePumpObservers, which will be replaced by the newer PlatformEventObservers in subsequent patches. //chrome, //content, //mojo, //ui/aura, //ui/base, //ui/wm: * Convert MessagePumpDispatchers that deal with X11 events into PlatformEventDispatchers. //ui/events: * Allow creating a 'default' PlatformEventSource. On X11, it creates X11EventSource, and on other platforms, it doesn't create an event-source. * A temporary measure in X11EventSource to send the event to the message-pump so that the message-pump observers can be triggered. This will be removed once the MessagePumpObservers that deal with X11 events are turned into PlatformEventObservers. //ui/views: * Remove the linux implementation of MenuMessagePumpDispatcher, and replace it with MenuEventDispatcherLinux. * Platform specific implementation for MenuController::RunMessageLoop(): the Windows implementation uses the MessagePumpDispatcher, and the non-windows implementation uses the PlatformEventDispatcher. This is somewhat unfortunate, and I am going to look for something better for this. But the code duplication here is relatively small, I don't want to make this patch any larger. BUG=354062 R=darin@chromium.org, sky@chromium.org Review URL: https://codereview.chromium.org/219743002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@262008 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui/events/platform/platform_event_source_stub.cc')
-rw-r--r--ui/events/platform/platform_event_source_stub.cc13
1 files changed, 13 insertions, 0 deletions
diff --git a/ui/events/platform/platform_event_source_stub.cc b/ui/events/platform/platform_event_source_stub.cc
new file mode 100644
index 0000000..57e2a61
--- /dev/null
+++ b/ui/events/platform/platform_event_source_stub.cc
@@ -0,0 +1,13 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "ui/events/platform/platform_event_source.h"
+
+namespace ui {
+
+scoped_ptr<PlatformEventSource> PlatformEventSource::CreateDefault() {
+ return scoped_ptr<PlatformEventSource>();
+}
+
+} // namespace ui