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


CrOS-Libchrome-Original-Commit: 9a2e75dde876521fdd1f39c9646902aade1f8c89
6 files changed
tree: e9195a2af46136b0218ca541be029102ffa1dbb6
  1. base/
  2. build/
  3. components/
  4. dbus/
  5. device/
  6. ipc/
  7. mojo/
  8. testing/
  9. third_party/
  10. ui/