New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 610909 link

Starred by 2 users

Issue metadata

Status: WontFix
Owner:
inactive
Closed: Nov 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 3
Type: Bug
mus



Sign in to add a comment

Add Mus Window properties to views::Widget::InitParams, setup NativeWidgetFactory in AuraInit

Project Member Reported by mfomitchev@chromium.org, May 11 2016

Issue description

Currently 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.
 

Comment 1 by msw@chromium.org, May 11 2016

I just recently added std::map<std::string, std::vector<uint8_t>> mus_properties; to views::Widget::InitParams in https://codereview.chromium.org/1953183002/, does that help?
https://code.google.com/p/chromium/codesearch#chromium/src/ui/views/widget/widget.h&l=295
Yes, it does. Thanks!
I guess the only remaining thing is to setup NativeWidgetFactory in AuraInit.

Comment 3 by sky@chromium.org, 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.
This makes sense. MusAuraInit? MusUiInit?
MusUiStartup?

Comment 6 by sky@chromium.org, May 12 2016

My vote is for MusUiInit.
Labels: mus
Components: MUS
Components: Internals>MUS
Labels: Proj-Mustash
Status: WontFix (was: Untriaged)
oboslete
Components: -Internals>MUS Internals>Services>WindowService
Components: -MUS

Sign in to add a comment