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

Issue 205253003: [master] x11: Move X event handling out of the message-pump.

Created:
6 years, 9 months ago by sadrul
Modified:
6 years, 8 months ago
Reviewers:
CC:
chromium-reviews, extensions-reviews_chromium.org, sadrul, viettrungluu+watch_chromium.org, stevenjb+watch_chromium.org, ben+aura_chromium.org, abarth-chromium, Aaron Boodman, oshima+watch_chromium.org, kalyank, chromium-apps-reviews_chromium.org, darin (slow to review), erikwright+watch_chromium.org, ben+mojo_chromium.org
Visibility:
Public.

Description

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. * Create a PlatformEventSource for ash-shell and the tests that need it. //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: * Create a PlatformEventSource for the binaries that need it (e.g. chrome, content-shell, some tests, etc.). * 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

Patch Set 1 #

Patch Set 2 : . #

Patch Set 3 : . #

Patch Set 4 : . #

Patch Set 5 : . #

Patch Set 6 : all #

Patch Set 7 : diff #

Patch Set 8 : all-win-fix #

Patch Set 9 : moar-win-fix #

Patch Set 10 : win-moar-fix #

Patch Set 11 : . #

Patch Set 12 : tot-merge #

Patch Set 13 : . #

Patch Set 14 : . #

Patch Set 15 : tot-merge-runloop #

Patch Set 16 : . #

Patch Set 17 : tot-merge #

Patch Set 18 : . #

Patch Set 19 : tot-merge #

Patch Set 20 : ... #

Patch Set 21 : fix-non-aura #

Patch Set 22 : fix-linux-build #

Patch Set 23 : merge-r260540 #

Patch Set 24 : fix-merge #

Unified diffs Side-by-side diffs Delta from patch set Stats (+778 lines, -674 lines) Patch
M ash/accelerators/accelerator_dispatcher.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 2 chunks +29 lines, -8 lines 0 comments Download
M ash/accelerators/accelerator_dispatcher.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 3 chunks +26 lines, -67 lines 0 comments Download
A ash/accelerators/accelerator_dispatcher_linux.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 1 chunk +90 lines, -0 lines 0 comments Download
A ash/accelerators/accelerator_dispatcher_win.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 1 chunk +64 lines, -0 lines 0 comments Download
M ash/accelerators/nested_dispatcher_controller.h View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +3 lines, -0 lines 0 comments Download
M ash/accelerators/nested_dispatcher_controller.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 1 chunk +8 lines, -4 lines 0 comments Download
M ash/accelerators/nested_dispatcher_controller_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 2 chunks +17 lines, -1 line 0 comments Download
M ash/ash.gyp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 1 chunk +2 lines, -0 lines 0 comments Download
M ash/drag_drop/drag_drop_interactive_uitest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 2 chunks +7 lines, -0 lines 0 comments Download
M ash/shell/content_client/shell_browser_main_parts.h View 1 2 chunks +5 lines, -0 lines 0 comments Download
M ash/shell/content_client/shell_browser_main_parts.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 2 chunks +3 lines, -0 lines 0 comments Download
M ash/shell_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 2 chunks +3 lines, -0 lines 0 comments Download
M ash/wm/ash_native_cursor_manager_interactive_uitest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 3 chunks +7 lines, -0 lines 0 comments Download
M base/message_loop/message_loop.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +1 line, -1 line 0 comments Download
M base/message_loop/message_pump_x11.h View 3 chunks +2 lines, -61 lines 0 comments Download
M base/message_loop/message_pump_x11.cc View 5 chunks +8 lines, -237 lines 0 comments Download
M base/run_loop.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 2 chunks +2 lines, -2 lines 0 comments Download
M base/run_loop.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/browser/bookmarks/bookmark_node_data_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 4 chunks +4 lines, -0 lines 0 comments Download
M chrome/browser/extensions/global_shortcut_listener_x11.h View 1 2 3 4 5 2 chunks +9 lines, -7 lines 0 comments Download
M chrome/browser/extensions/global_shortcut_listener_x11.cc View 1 2 3 4 5 3 chunks +13 lines, -7 lines 0 comments Download
M chrome/browser/ui/aura/chrome_browser_main_extra_parts_aura.h View 1 2 2 chunks +5 lines, -0 lines 0 comments Download
M chrome/browser/ui/aura/chrome_browser_main_extra_parts_aura.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 2 chunks +3 lines, -0 lines 0 comments Download
M chrome/browser/ui/views/bookmarks/bookmark_context_menu_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 3 chunks +4 lines, -0 lines 0 comments Download
M chrome/test/base/view_event_test_base.h View 1 2 2 chunks +5 lines, -2 lines 0 comments Download
M chrome/test/base/view_event_test_base.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 5 chunks +11 lines, -20 lines 0 comments Download
M content/shell/browser/shell_views.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +1 line, -0 lines 0 comments Download
M mojo/services/native_viewport/native_viewport_x11.cc View 1 2 3 4 5 4 chunks +16 lines, -19 lines 0 comments Download
M ui/aura/window_tree_host_x11.h View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +6 lines, -5 lines 0 comments Download
M ui/aura/window_tree_host_x11.cc View 1 2 3 4 5 6 7 8 9 10 11 8 chunks +19 lines, -14 lines 0 comments Download
M ui/aura/window_tree_host_x11_unittest.cc View 8 chunks +16 lines, -16 lines 0 comments Download
M ui/base/clipboard/clipboard_aurax11.cc View 1 2 3 4 5 6 7 8 9 10 11 5 chunks +14 lines, -7 lines 0 comments Download
M ui/base/clipboard/clipboard_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 3 chunks +13 lines, -0 lines 0 comments Download
M ui/base/dragdrop/os_exchange_data_provider_aurax11.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 3 chunks +5 lines, -3 lines 0 comments Download
M ui/base/dragdrop/os_exchange_data_provider_aurax11.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 5 chunks +11 lines, -6 lines 0 comments Download
M ui/base/dragdrop/os_exchange_data_provider_aurax11_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 3 chunks +3 lines, -1 line 0 comments Download
M ui/base/dragdrop/os_exchange_data_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +6 lines, -0 lines 0 comments Download
M ui/display/chromeos/x11/DEPS View 1 chunk +1 line, -0 lines 0 comments Download
M ui/display/chromeos/x11/native_display_delegate_x11.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +1 line, -1 line 0 comments Download
M ui/display/chromeos/x11/native_display_delegate_x11.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 3 chunks +10 lines, -5 lines 0 comments Download
M ui/display/chromeos/x11/native_display_event_dispatcher_x11.h View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +9 lines, -10 lines 0 comments Download
M ui/display/chromeos/x11/native_display_event_dispatcher_x11.cc View 1 2 3 4 5 6 7 8 9 10 11 4 chunks +15 lines, -8 lines 0 comments Download
M ui/display/chromeos/x11/native_display_event_dispatcher_x11_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +2 lines, -2 lines 0 comments Download
M ui/events/events.gyp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 2 chunks +4 lines, -0 lines 0 comments Download
M ui/events/platform/platform_event_source.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +2 lines, -0 lines 0 comments Download
A + ui/events/platform/platform_event_source_stub.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +3 lines, -7 lines 0 comments Download
M ui/events/platform/x11/x11_event_source.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 2 chunks +15 lines, -1 line 0 comments Download
M ui/views/controls/menu/menu_controller.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 6 chunks +12 lines, -0 lines 0 comments Download
M ui/views/controls/menu/menu_controller.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 7 chunks +34 lines, -1 line 0 comments Download
A ui/views/controls/menu/menu_event_dispatcher_linux.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +32 lines, -0 lines 0 comments Download
A + ui/views/controls/menu/menu_event_dispatcher_linux.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 3 chunks +19 lines, -10 lines 0 comments Download
D ui/views/controls/menu/menu_message_pump_dispatcher.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 1 chunk +0 lines, -36 lines 0 comments Download
D ui/views/controls/menu/menu_message_pump_dispatcher.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 1 chunk +0 lines, -16 lines 0 comments Download
A + ui/views/controls/menu/menu_message_pump_dispatcher_win.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 2 chunks +3 lines, -3 lines 0 comments Download
M ui/views/controls/menu/menu_message_pump_dispatcher_win.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 2 chunks +6 lines, -1 line 0 comments Download
M ui/views/controls/textfield/textfield_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 7 chunks +25 lines, -5 lines 0 comments Download
M ui/views/views.gyp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 1 chunk +3 lines, -3 lines 0 comments Download
M ui/views/widget/desktop_aura/desktop_dispatcher_client.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +5 lines, -0 lines 0 comments Download
M ui/views/widget/desktop_aura/desktop_drag_drop_client_aurax11.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 6 chunks +16 lines, -11 lines 0 comments Download
M ui/views/widget/desktop_aura/desktop_screen_x11.h View 1 2 3 4 5 3 chunks +5 lines, -4 lines 0 comments Download
M ui/views/widget/desktop_aura/desktop_screen_x11.cc View 1 2 3 4 5 6 7 8 9 10 11 5 chunks +12 lines, -5 lines 0 comments Download
M ui/views/widget/desktop_aura/desktop_screen_x11_unittest.cc View 1 2 3 4 5 5 chunks +19 lines, -8 lines 0 comments Download
M ui/views/widget/desktop_aura/desktop_window_tree_host_x11.h View 1 2 3 4 5 6 7 8 9 10 11 3 chunks +9 lines, -7 lines 0 comments Download
M ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc View 1 2 3 4 5 6 7 8 9 10 11 5 chunks +19 lines, -6 lines 0 comments Download
M ui/views/widget/desktop_aura/x11_desktop_handler.h View 1 2 3 4 5 3 chunks +6 lines, -5 lines 0 comments Download
M ui/views/widget/desktop_aura/x11_desktop_handler.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 7 chunks +21 lines, -12 lines 0 comments Download
M ui/views/widget/desktop_aura/x11_whole_screen_move_loop.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 2 chunks +5 lines, -4 lines 0 comments Download
M ui/views/widget/desktop_aura/x11_whole_screen_move_loop.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 7 chunks +13 lines, -10 lines 0 comments Download
M ui/wm/DEPS View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M ui/wm/test/wm_test_helper.h View 1 2 2 chunks +6 lines, -3 lines 0 comments Download
M ui/wm/test/wm_test_helper.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 2 chunks +2 lines, -0 lines 0 comments Download

Powered by Google App Engine
This is Rietveld 408576698