Add Mus Window properties to views::Widget::InitParams, setup NativeWidgetFactory in AuraInit |
|||||||
Issue descriptionCurrently there's no way to configure mus::Window and NativeWidgetMus via InitParams. One has to create the mus::Window and then views::NativeWidgetMus by hand before calling Widget::Init(). E.g. see https://code.google.com/p/chromium/codesearch#chromium/src/mash/login/login.cc&l=56 This seems like a pretty common thing to do, and it would be nice to centralize this code in one place. We could create a default implementation of NativeWidgetFactory on the ViewsDelegate in views::AuraInit, which would use the Mus Window properties passed with InitParams, and create the mus::Window and views::NativeWidgetMus based on those. The properties set in InitParams can be std::map<std::string, std::vector<uint8_t>> - i.e. the same type as what is passed to WindowManagerConnection::NewWindow(). Note sys_ui aslready does something similar (see NativeWidgetFactory::InitNativeWidget()), except it constructs the properties itself, but it probably makes sense to do this in all Mus clients.
,
May 12 2016
Yes, it does. Thanks! I guess the only remaining thing is to setup NativeWidgetFactory in AuraInit.
,
May 12 2016
The factory is set by WindowManagerConnection. We should make AuraInit create the WindowManagerConnection and avoid having call sites create the WindowManagerConnection as well. AuraInit should likely be renamed as well.
,
May 12 2016
This makes sense. MusAuraInit? MusUiInit?
,
May 12 2016
MusUiStartup?
,
May 12 2016
My vote is for MusUiInit.
,
May 12 2016
,
Sep 2 2016
,
Oct 4 2016
,
Nov 8 2016
oboslete
,
Feb 26 2018
,
Feb 26 2018
|
|||||||
►
Sign in to add a comment |
|||||||
Comment 1 by msw@chromium.org
, May 11 2016