-
Notifications
You must be signed in to change notification settings - Fork 653
Don't use DesktopRootWindowHost init factory #468
Don't use DesktopRootWindowHost init factory #468
Conversation
Trybot DashboardThe building Status of PATCH Thu Aug 29 2013 17:13:21 GMT+0800 (CST) [xwalk_linux] Passed LOGS: build successful |
@luxtella @darktears This would make the changes in Chromium Crosswalk unnecessary. What do you think? |
I refer to one of the patches in crosswalk-project/chromium-crosswalk#42 There are other patches there, I'm trying whether subclassing DesktopRootWindowHostX11 ends up being a better choice (we may have to change it slightly to allow that). |
very nice! we should remove InitDesktopRootWindowHostFactory in Chromium's side then. |
excellent! I could not imagine that it is possible. Perfectly satisfy our requirement. |
This patch brings the special case for OnBeforeWidgetInit() function to our own class which is the only thing we used from DesktopTestViewsDelegate. This is a first step to inherit directly from ViewsDelegate instead of relying in testing infrastructure. Also removed g_views_delegate since views::ViewsDelegate already provide a place to store it's application-wide instance.
Add just the necessary stubs like the TestViewsDelegate had. We still don't make use of those hooks. One difference is that TestViewsDelegate has the SetUseTransparentWindows, but we never called it, so it's OK to keep the virtual UseTransparentWindows() always false until we have some use for it.
When using DesktopNativeWidgetAura, we can provide our own DesktopRootWindowHost via the Widget::InitParams struct. The function OnBeforeWidgetInit() provides a way to identify and create the hook at the right time. This removes the usage of the extra patch to add a Factory to DesktopRootWindowHost.
lgtm |
@luxtella I'm using the XWalk version on the desktop, so I won't include the ifdef change. Since when GTK is enable Aura isn't, this won't cause problems (things should keep working as they are today). I frequently build the Aura version in Linux Desktop. I hope at some point we converge Linux to use only one variant. |
Thanks for the review folks, I'll wait our trybots do their job before landing. |
Trybot seems to be using old version of the patch. I fixed the style issue :/ |
Don't use DesktopRootWindowHost init factory
We were using a views::ViewsDelegate created for testing, it didn't provide much. By using our own implementation, we can hook DesktopRootWindowHostXWalk without needing to patch Chromium.
This series ends up cleaning some unused / redundant code as well.