DescriptionMash: Show app icons in shelf based on the Widget's app icon
* Use the large icon from WidgetDelegate::GetWindowAppIcon().
* In the mojo app's NativeWidgetMus, serialize the icon's SkBitmap as a vector of bytes and set it as a shared window property.
* In the window manager, pass the serialized icon to any UserWindowObservers.
* In the system UI, deserialize the icon and use it on the shelf.
* Set an icon in task_viewer as a demonstration.
The window property serialization is handled by a custom TypeConverter for vector<uint8>, SkBitmap. In the future it would be nice to use the serialized form of the Skia Mojom struct skia.Bitmap, but that will require Mojo to generate a public API to read the serialized bytes.
Also fixed an issue where the app's primary widget and the window manager's non-client-frame widget would fight over window titles.
A screenshot of the shelf is attached to the bug.
BUG=595850
TEST=launch mash, run mojo:task_viewer, note QuickLaunch shelf icon is default but TaskViewer icon is a gear
Committed: https://crrev.com/cac8709a0d06fee9d9f048b9e779ce59902673a5
Cr-Commit-Position: refs/heads/master@{#383312}
Patch Set 1 #Patch Set 2 : brute force array copies #Patch Set 3 : it works #Patch Set 4 : cleanup #Patch Set 5 : fix native_widget_mus dep #Patch Set 6 : //ui/resources #
Total comments: 20
Patch Set 7 : review comments #Patch Set 8 : rebase #Patch Set 9 : added unit tests #
Total comments: 6
Patch Set 10 : more review comments #Messages
Total messages: 22 (10 generated)
|