Mash Shell Shelf Item Icons The mash shelf uses a placeholder for item icons; it should use real icons. See parent Issue 557406
I'm going to take a stab at this, mostly to familiarize myself with the shelf code. I can't promise something pretty.
Screenshot of it working with a new icon for task viewer.
https://codereview.chromium.org/1824183002/ under review
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/cac8709a0d06fee9d9f048b9e779ce59902673a5 commit cac8709a0d06fee9d9f048b9e779ce59902673a5 Author: jamescook <jamescook@chromium.org> Date: Fri Mar 25 18:11:53 2016 Mash: 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 Review URL: https://codereview.chromium.org/1824183002 Cr-Commit-Position: refs/heads/master@{#383312} [modify] https://crrev.com/cac8709a0d06fee9d9f048b9e779ce59902673a5/ash/mus/shelf_delegate_mus.cc [modify] https://crrev.com/cac8709a0d06fee9d9f048b9e779ce59902673a5/ash/mus/shelf_delegate_mus.h [modify] https://crrev.com/cac8709a0d06fee9d9f048b9e779ce59902673a5/components/mus/public/cpp/lib/property_type_converters.cc [modify] https://crrev.com/cac8709a0d06fee9d9f048b9e779ce59902673a5/components/mus/public/cpp/property_type_converters.h [modify] https://crrev.com/cac8709a0d06fee9d9f048b9e779ce59902673a5/components/mus/public/cpp/tests/BUILD.gn [add] https://crrev.com/cac8709a0d06fee9d9f048b9e779ce59902673a5/components/mus/public/cpp/tests/property_type_converters_unittest.cc [modify] https://crrev.com/cac8709a0d06fee9d9f048b9e779ce59902673a5/components/mus/public/interfaces/window_manager.mojom [modify] https://crrev.com/cac8709a0d06fee9d9f048b9e779ce59902673a5/mash/task_viewer/BUILD.gn [modify] https://crrev.com/cac8709a0d06fee9d9f048b9e779ce59902673a5/mash/task_viewer/task_viewer.cc [modify] https://crrev.com/cac8709a0d06fee9d9f048b9e779ce59902673a5/mash/wm/non_client_frame_controller.cc [modify] https://crrev.com/cac8709a0d06fee9d9f048b9e779ce59902673a5/mash/wm/public/interfaces/user_window_controller.mojom [modify] https://crrev.com/cac8709a0d06fee9d9f048b9e779ce59902673a5/mash/wm/user_window_controller_impl.cc [modify] https://crrev.com/cac8709a0d06fee9d9f048b9e779ce59902673a5/mash/wm/user_window_controller_impl.h [modify] https://crrev.com/cac8709a0d06fee9d9f048b9e779ce59902673a5/mash/wm/window_manager.cc [modify] https://crrev.com/cac8709a0d06fee9d9f048b9e779ce59902673a5/ui/views/mus/BUILD.gn [modify] https://crrev.com/cac8709a0d06fee9d9f048b9e779ce59902673a5/ui/views/mus/native_widget_mus.cc [add] https://crrev.com/cac8709a0d06fee9d9f048b9e779ce59902673a5/ui/views/mus/native_widget_mus_unittest.cc
Back into the pile until we start working on pinned icons.
Also fixed for profile pinned items https://codereview.chromium.org/1921403002 I'd say this is generally fixed; we can tackle bugs as needed.
Comment 1 by jamescook@chromium.org
, Mar 21 2016Status: Started (was: Untriaged)