[go: nahoru, domu]

Reland "X11 and Ozone: Make DWTHX11 subclass DWTHPlatform and use PWD."

This is a reland of a1b5aec5523fc23c24c8b9a9547304043f15ccd0

Fix: initialize state_ in X11Window and fix component build by adding
//ui/platform_window into deps in chrome/browser/ui/BUILD.gn

Original change's description:
> X11 and Ozone: Make DWTHX11 subclass DWTHPlatform and use PWD.
>
> This CL makes the DWTHX11 subclass the DWTHPlatform and use
> the X11Window, which subclasses the XWindow. Also, DWTHX11
> uses PlatformWindowDelegate instead of ui::XWindow::Delegate now.
>
> That is, to migrate X11 to Ozone, we need to make sure DWTHPlatform
> is mature enough. To avoid code duplicate, it was decided to
> make DWTHX11 subclass DWTHPlatform and move its code to DWTHPlatform
> step by step ensuring nothing is broken.
>
> However, it was not enough to just make DWTHX11 a subclass of DWTHPlatform.
> The way how we communicate with XWindow has had to be changed as well.
>
> The plan is to move all the code to DWTHPlatform and make the
> WTHPlatform create the X11Window. However, there are many intermediate
> steps to be done before doing it. As described before, first, DWTHX11
> subclasses the DWTHPlatform and starts to receive messages and
> events from the XWindow through the PlatformWindowDelegate.
>
> It was ensured that the DWTHX11 intercepts all the calls to DWTH,
> WTH and PWD and does everything as it was doing previously. In the
> follow up CLs, I will start to move the code slowly to DWTHPlatform
> and WTHPlatform so that DWTHX11 no longer implements PDW and DWTH
> methods and the DWTHPlatform manages everything on its own
> for both Ozone and non-Ozone builds.
>
> Bug: 990756
> Change-Id: If45b05d09609cf8aa826cc4894ec559f210dc0b7
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1771397
> Reviewed-by: Scott Violet <sky@chromium.org>
> Reviewed-by: Thomas Anderson <thomasanderson@chromium.org>
> Commit-Queue: Maksim Sisov <msisov@igalia.com>
> Cr-Commit-Position: refs/heads/master@{#691944}

TBR=sky@chromium.org

Bug: 990756
Change-Id: I6d029491d0ba7408dd1613edc6a547e2d070715c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1774637
Commit-Queue: Maksim Sisov <msisov@igalia.com>
Auto-Submit: Maksim Sisov <msisov@igalia.com>
Reviewed-by: Sadrul Chowdhury <sadrul@chromium.org>
Cr-Commit-Position: refs/heads/master@{#692626}
65 files changed