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

Issue 1602173005: Add PlatformWindow/Event related code for Ozone X11. (Closed)

Created:
4 years, 11 months ago by kylechar
Modified:
4 years, 10 months ago
CC:
chromium-reviews, feature-media-reviews_chromium.org, kalyank, ozone-reviews_chromium.org, rjkroege
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Add PlatformWindow/Event related code for Ozone X11. The bigger changes here are to X11EventSource and X11Window. For both classes the current implementation is for PlatformEvent=XEvent* but with Ozone PlatformEvent=void*=ui::Event*. Most of the implementation will be the same between X11 and Ozone X11 otherwise. Both classes have been split into a shared base class and compile specific implementation. X11EventSource is now the base class. There were two possible listener implementations, Glib vs Libevent, with Libevent being unused so far. The X11 implementation is X11EventSourceGlib and uses Glib. The Ozone X11 implementation is X11EventSourceLibevent and uses Libevent. Since the Ozone X11 implementation is dispatching ui::Events there is a separate dispatcher list for XEventDispatchers added to send XEvents where necessary. X11WindowBase is now the base class. The X11 implementation is still called X11Window. The X11 Ozone implementation is X11WindowOzone. The X11 Ozone version registers itself as both a PlatformEventDispatcher and XEventDispatcher. Compile with the following gn args: use_ozone = true ozone_platform_x11 = true target_os = "chromeos" TBR=rockot@chromium.org BUG=361137 Committed: https://crrev.com/456fe8e2a64b676531e9d4f24a5268e2523a4d22 Cr-Commit-Position: refs/heads/master@{#374502}

Patch Set 1 #

Patch Set 2 : Small fixes. #

Total comments: 15

Patch Set 3 : Fixes for comments from spang. #

Total comments: 12

Patch Set 4 : Intermediate CL. #

Patch Set 5 : XEventDispatcher added. #

Total comments: 8

Patch Set 6 : Split X11EventSource and X11Window. #

Total comments: 8

Patch Set 7 : Fixes for comments. #

Patch Set 8 : Fix deps problem. #

Total comments: 6

Patch Set 9 : Fixes for comments. #

Total comments: 24

Patch Set 10 : More fixes for comments. #

Patch Set 11 : Rebase. #

Total comments: 7

Patch Set 12 : Final fixes for comments + tests. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+894 lines, -544 lines) Patch
M chrome/browser/extensions/global_shortcut_listener_x11.cc View 1 2 3 4 5 6 7 8 3 chunks +3 lines, -3 lines 0 comments Download
M ui/aura/window_tree_host_x11.cc View 1 2 3 4 5 6 7 8 1 chunk +1 line, -0 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 2 chunks +2 lines, -2 lines 0 comments Download
M ui/events/platform/x11/BUILD.gn View 1 2 3 4 5 6 7 8 9 4 chunks +12 lines, -6 lines 0 comments Download
M ui/events/platform/x11/x11_event_source.h View 1 2 3 4 5 6 7 8 9 3 chunks +33 lines, -17 lines 0 comments Download
M ui/events/platform/x11/x11_event_source.cc View 1 2 3 4 5 6 7 8 4 chunks +20 lines, -46 lines 0 comments Download
A ui/events/platform/x11/x11_event_source_glib.h View 1 2 3 4 5 6 7 8 9 1 chunk +53 lines, -0 lines 0 comments Download
M ui/events/platform/x11/x11_event_source_glib.cc View 1 2 3 4 5 6 7 8 9 2 chunks +45 lines, -46 lines 0 comments Download
A ui/events/platform/x11/x11_event_source_libevent.h View 1 2 3 4 5 6 7 8 9 1 chunk +79 lines, -0 lines 0 comments Download
M ui/events/platform/x11/x11_event_source_libevent.cc View 1 2 3 4 5 6 7 8 9 1 chunk +169 lines, -39 lines 0 comments Download
M ui/events/platform/x11/x11_events_platform.gyp View 1 2 3 4 5 6 7 8 2 chunks +7 lines, -6 lines 0 comments Download
M ui/events/x/BUILD.gn View 1 2 3 1 chunk +1 line, -4 lines 0 comments Download
M ui/events/x/events_x_utils.h View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +4 lines, -4 lines 0 comments Download
M ui/ozone/platform/x11/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 1 chunk +2 lines, -0 lines 0 comments Download
M ui/ozone/platform/x11/ozone_platform_x11.cc View 1 2 3 4 5 6 7 8 9 10 5 chunks +9 lines, -4 lines 0 comments Download
M ui/platform_window/x11/BUILD.gn View 1 2 3 4 5 8 9 10 11 2 chunks +16 lines, -3 lines 0 comments Download
M ui/platform_window/x11/x11_window.h View 1 2 3 4 5 6 7 8 9 1 chunk +6 lines, -59 lines 0 comments Download
M ui/platform_window/x11/x11_window.cc View 1 2 3 4 5 6 7 8 9 10 11 9 chunks +21 lines, -284 lines 0 comments Download
M ui/platform_window/x11/x11_window.gyp View 1 2 3 4 5 8 9 10 11 1 chunk +2 lines, -0 lines 0 comments Download
A + ui/platform_window/x11/x11_window_base.h View 1 2 3 4 5 6 7 8 9 10 11 5 chunks +30 lines, -20 lines 0 comments Download
A ui/platform_window/x11/x11_window_base.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +284 lines, -0 lines 0 comments Download
A ui/platform_window/x11/x11_window_ozone.h View 1 2 3 4 5 6 7 8 9 1 chunk +42 lines, -0 lines 0 comments Download
A ui/platform_window/x11/x11_window_ozone.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +51 lines, -0 lines 0 comments Download
M ui/views/widget/desktop_aura/desktop_window_tree_host_x11_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +1 line, -1 line 0 comments Download
M ui/views/widget/desktop_aura/x11_whole_screen_move_loop.cc View 1 2 3 4 5 6 7 8 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 47 (14 generated)
kylechar
4 years, 11 months ago (2016-01-19 21:59:42 UTC) #2
spang
Looks very promising! +sadrul especially for comments on how much code copying we can get ...
4 years, 11 months ago (2016-01-20 19:53:31 UTC) #4
kylechar
Added fixes for comments (except one) and moved XInput2/XKB event stuff into a separate CL ...
4 years, 11 months ago (2016-01-20 21:46:16 UTC) #5
spang
https://codereview.chromium.org/1602173005/diff/20001/ui/ozone/platform/x11/BUILD.gn File ui/ozone/platform/x11/BUILD.gn (right): https://codereview.chromium.org/1602173005/diff/20001/ui/ozone/platform/x11/BUILD.gn#newcode45 ui/ozone/platform/x11/BUILD.gn:45: "//build/config/linux:glib", What's using glib? https://codereview.chromium.org/1602173005/diff/20001/ui/ozone/platform/x11/ozone_platform_x11.cc File ui/ozone/platform/x11/ozone_platform_x11.cc (right): https://codereview.chromium.org/1602173005/diff/20001/ui/ozone/platform/x11/ozone_platform_x11.cc#newcode72 ...
4 years, 11 months ago (2016-01-20 22:32:53 UTC) #6
kylechar
https://codereview.chromium.org/1602173005/diff/20001/ui/ozone/platform/x11/BUILD.gn File ui/ozone/platform/x11/BUILD.gn (right): https://codereview.chromium.org/1602173005/diff/20001/ui/ozone/platform/x11/BUILD.gn#newcode45 ui/ozone/platform/x11/BUILD.gn:45: "//build/config/linux:glib", On 2016/01/20 at 22:32:53, spang wrote: > What's ...
4 years, 11 months ago (2016-01-21 14:14:52 UTC) #8
sadrul
We are dup'ing way too much code. We shouldn't. https://codereview.chromium.org/1602173005/diff/40001/ui/ozone/platform/x11/x11_event_factory.cc File ui/ozone/platform/x11/x11_event_factory.cc (right): https://codereview.chromium.org/1602173005/diff/40001/ui/ozone/platform/x11/x11_event_factory.cc#newcode145 ui/ozone/platform/x11/x11_event_factory.cc:145: ...
4 years, 11 months ago (2016-01-21 14:53:01 UTC) #9
spang
https://codereview.chromium.org/1602173005/diff/40001/ui/ozone/platform/x11/x11_window_ozone.h File ui/ozone/platform/x11/x11_window_ozone.h (right): https://codereview.chromium.org/1602173005/diff/40001/ui/ozone/platform/x11/x11_window_ozone.h#newcode23 ui/ozone/platform/x11/x11_window_ozone.h:23: class X11WindowOzone : public PlatformWindow, public PlatformEventDispatcher { On ...
4 years, 11 months ago (2016-01-21 15:07:33 UTC) #10
kylechar
https://codereview.chromium.org/1602173005/diff/40001/ui/ozone/platform/x11/x11_event_factory.h File ui/ozone/platform/x11/x11_event_factory.h (right): https://codereview.chromium.org/1602173005/diff/40001/ui/ozone/platform/x11/x11_event_factory.h#newcode28 ui/ozone/platform/x11/x11_event_factory.h:28: class EVENTS_EXPORT X11EventFactory On 2016/01/21 at 14:53:01, sadrul wrote: ...
4 years, 11 months ago (2016-01-21 15:13:35 UTC) #11
spang
On 2016/01/21 15:13:35, kylechar wrote: > https://codereview.chromium.org/1602173005/diff/40001/ui/ozone/platform/x11/x11_event_factory.h > File ui/ozone/platform/x11/x11_event_factory.h (right): > > https://codereview.chromium.org/1602173005/diff/40001/ui/ozone/platform/x11/x11_event_factory.h#newcode28 > ...
4 years, 11 months ago (2016-01-21 15:27:52 UTC) #12
sadrul
On 2016/01/21 15:27:52, spang wrote: > On 2016/01/21 15:13:35, kylechar wrote: > > > https://codereview.chromium.org/1602173005/diff/40001/ui/ozone/platform/x11/x11_event_factory.h ...
4 years, 11 months ago (2016-01-22 15:30:54 UTC) #13
kylechar
On 2016/01/22 at 15:30:54, sadrul wrote: > On 2016/01/21 15:27:52, spang wrote: > > On ...
4 years, 11 months ago (2016-01-22 16:50:15 UTC) #14
spang
On 2016/01/22 16:50:15, kylechar wrote: > On 2016/01/22 at 15:30:54, sadrul wrote: > > On ...
4 years, 11 months ago (2016-01-26 00:13:00 UTC) #15
kylechar
I've uploaded a draft CL with all the small items fixed. It runs fine but ...
4 years, 11 months ago (2016-01-26 15:24:25 UTC) #16
spang
On 2016/01/26 15:24:25, kylechar wrote: > I've uploaded a draft CL with all the small ...
4 years, 11 months ago (2016-01-26 18:30:40 UTC) #17
kylechar
I've uploaded a new patch that dispatches ui::Event using the existing infrastructure and adds a ...
4 years, 11 months ago (2016-01-26 20:27:25 UTC) #18
spang
Couple of comments, but let's get some feedback from sadrul before getting too deep into ...
4 years, 11 months ago (2016-01-26 21:37:40 UTC) #19
kylechar
https://codereview.chromium.org/1602173005/diff/80001/ui/events/platform/x11/x11_event_source.cc File ui/events/platform/x11/x11_event_source.cc (right): https://codereview.chromium.org/1602173005/diff/80001/ui/events/platform/x11/x11_event_source.cc#newcode98 ui/events/platform/x11/x11_event_source.cc:98: CHECK(dispatcher); On 2016/01/26 at 21:37:40, spang wrote: > CHECK ...
4 years, 11 months ago (2016-01-27 15:39:26 UTC) #20
kylechar
After talking with Sadrul I've split X11EventSource and X11Window into a two classes each. X11EventSource ...
4 years, 10 months ago (2016-02-01 16:44:28 UTC) #22
sadrul
Some comments about the X11Window changes. Looking at the X11EventSource changes now. https://codereview.chromium.org/1602173005/diff/120001/ui/platform_window/x11/x11_window_base.h File ui/platform_window/x11/x11_window_base.h ...
4 years, 10 months ago (2016-02-02 16:33:54 UTC) #23
kylechar
I've made the fixes requested. I'll wait for the rest of your comments before uploading ...
4 years, 10 months ago (2016-02-02 19:01:42 UTC) #24
kylechar
I've uploaded some newer patches with fixes for the comments thus far and a few ...
4 years, 10 months ago (2016-02-04 16:12:10 UTC) #26
sadrul
https://codereview.chromium.org/1602173005/diff/160001/ui/events/platform/x11/x11_event_source.cc File ui/events/platform/x11/x11_event_source.cc (left): https://codereview.chromium.org/1602173005/diff/160001/ui/events/platform/x11/x11_event_source.cc#oldcode89 ui/events/platform/x11/x11_event_source.cc:89: // static keep this https://codereview.chromium.org/1602173005/diff/160001/ui/events/platform/x11/x11_event_source_ozone.cc File ui/events/platform/x11/x11_event_source_ozone.cc (right): https://codereview.chromium.org/1602173005/diff/160001/ui/events/platform/x11/x11_event_source_ozone.cc#newcode148 ...
4 years, 10 months ago (2016-02-04 22:29:32 UTC) #27
kylechar
https://codereview.chromium.org/1602173005/diff/160001/ui/events/platform/x11/x11_event_source.cc File ui/events/platform/x11/x11_event_source.cc (left): https://codereview.chromium.org/1602173005/diff/160001/ui/events/platform/x11/x11_event_source.cc#oldcode89 ui/events/platform/x11/x11_event_source.cc:89: // static On 2016/02/04 at 22:29:32, sadrul wrote: > ...
4 years, 10 months ago (2016-02-05 18:21:46 UTC) #29
sadrul
I think we are really close! Just a few more comments and nits. *exciting*! https://codereview.chromium.org/1602173005/diff/200001/ui/events/platform/x11/BUILD.gn ...
4 years, 10 months ago (2016-02-08 17:28:33 UTC) #31
kylechar
I've added fixes for all of the comments in the latest round. https://codereview.chromium.org/1602173005/diff/200001/ui/events/platform/x11/BUILD.gn File ui/events/platform/x11/BUILD.gn ...
4 years, 10 months ago (2016-02-08 19:08:10 UTC) #32
sadrul
A small nit, but other than that, ui/aura/ ui/events/ ui/platform_window/ lgtm!! I will leave ui/ozone ...
4 years, 10 months ago (2016-02-09 19:34:40 UTC) #35
spang
ui/ozone lgtm
4 years, 10 months ago (2016-02-09 19:53:54 UTC) #36
kylechar
Thanks! Changes made for the last comments and two more X11EventSource -> X11EventSourceGlib changes were ...
4 years, 10 months ago (2016-02-09 21:31:54 UTC) #40
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1602173005/300001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1602173005/300001
4 years, 10 months ago (2016-02-09 21:34:51 UTC) #41
commit-bot: I haz the power
Committed patchset #12 (id:300001)
4 years, 10 months ago (2016-02-09 22:38:41 UTC) #42
commit-bot: I haz the power
Patchset 12 (id:??) landed as https://crrev.com/456fe8e2a64b676531e9d4f24a5268e2523a4d22 Cr-Commit-Position: refs/heads/master@{#374502}
4 years, 10 months ago (2016-02-09 22:40:00 UTC) #44
kylechar
Hi rockot@, can you look at the 3 modified lines in chrome/browser/extensions/global_shortcut_listener_x11.cc as TBR? They ...
4 years, 10 months ago (2016-02-09 22:44:32 UTC) #46
Ken Rockot(use gerrit already)
4 years, 10 months ago (2016-02-09 22:50:05 UTC) #47
Message was sent while issue was closed.
lgtm

Powered by Google App Engine
This is Rietveld 408576698