There is a fair amount of boilerplate code necessary to get properties sent over the wire. This code spans a number of places and is not particularly extensible. By that I mean you have to change PropertyConverter itself for any new type. This approach doesn't work for structures that are not known to aura as well.
In my ideal world we would extend the macros already in place to deal with this. For example, kAlwaysOnTopKey is currently defined as:
DEFINE_UI_CLASS_PROPERTY_KEY(bool, kAlwaysOnTopKey, false);
It would be created if all you needed to make this go over mojom is:
DEFINE_UI_CLASS_PROPERTY_KEY(bool, kAlwaysOnTopKey, false, ws::mojom::WindowManager::kAlwaysOnTop_Property);
?
When setting up the mapping between window constant and serialization we need to add how the types are converted, and potentially any validation. So, for non-core types something like:
DEFINE_UI_CLASS_PROPERTY_KEY(CustomType,
kKey,
defaultValue,
mojom-string-name,
encode_function,
decode_function,
validating_function);
Comment 1 by msw@chromium.org
, Oct 1