Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(132)

Issue 1824183002: Mash: Show app icons in shelf based on the Widget's app icon (Closed)

Created:
4 years, 9 months ago by James Cook
Modified:
4 years, 9 months ago
Reviewers:
sky
CC:
chromium-reviews, rjkroege, sadrul, qsr+mojo_chromium.org, viettrungluu+watch_chromium.org, tfarina, tdresser+watch_chromium.org, yzshen+watch_chromium.org, abarth-chromium, Aaron Boodman, kalyank, darin (slow to review), ben+mojo_chromium.org, msw
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

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 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 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+446 lines, -21 lines) Patch
M ash/mus/shelf_delegate_mus.h View 1 2 1 chunk +2 lines, -0 lines 0 comments Download
M ash/mus/shelf_delegate_mus.cc View 1 2 3 4 5 6 7 4 chunks +37 lines, -3 lines 0 comments Download
M components/mus/public/cpp/lib/property_type_converters.cc View 1 2 3 4 5 6 7 8 9 3 chunks +82 lines, -2 lines 0 comments Download
M components/mus/public/cpp/property_type_converters.h View 1 2 3 4 5 6 3 chunks +15 lines, -0 lines 0 comments Download
M components/mus/public/cpp/tests/BUILD.gn View 1 2 3 4 5 6 1 chunk +1 line, -0 lines 0 comments Download
A components/mus/public/cpp/tests/property_type_converters_unittest.cc View 1 2 3 4 5 6 7 8 9 1 chunk +89 lines, -0 lines 0 comments Download
M components/mus/public/interfaces/window_manager.mojom View 1 2 3 4 5 6 1 chunk +3 lines, -0 lines 0 comments Download
M mash/task_viewer/BUILD.gn View 1 2 3 4 5 6 7 1 chunk +1 line, -0 lines 0 comments Download
M mash/task_viewer/task_viewer.cc View 1 2 3 4 5 6 2 chunks +9 lines, -0 lines 0 comments Download
M mash/wm/non_client_frame_controller.cc View 1 2 3 4 5 6 1 chunk +8 lines, -0 lines 0 comments Download
M mash/wm/public/interfaces/user_window_controller.mojom View 1 2 3 2 chunks +4 lines, -0 lines 0 comments Download
M mash/wm/user_window_controller_impl.h View 1 2 2 chunks +2 lines, -2 lines 0 comments Download
M mash/wm/user_window_controller_impl.cc View 1 2 3 8 chunks +32 lines, -13 lines 0 comments Download
M mash/wm/window_manager.cc View 1 2 3 4 5 6 1 chunk +1 line, -0 lines 0 comments Download
M ui/views/mus/BUILD.gn View 1 2 3 4 5 6 7 8 2 chunks +3 lines, -0 lines 0 comments Download
M ui/views/mus/native_widget_mus.cc View 1 2 3 4 5 6 7 8 3 chunks +29 lines, -1 line 0 comments Download
A ui/views/mus/native_widget_mus_unittest.cc View 1 2 3 4 5 6 7 8 9 1 chunk +128 lines, -0 lines 0 comments Download

Messages

Total messages: 22 (10 generated)
James Cook
Scott, PTAL Mike, just FYI
4 years, 9 months ago (2016-03-23 22:09:37 UTC) #3
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1824183002/100001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1824183002/100001
4 years, 9 months ago (2016-03-23 23:04:09 UTC) #5
sky
Test coverage would be nice too. https://codereview.chromium.org/1824183002/diff/100001/components/mus/public/cpp/lib/property_type_converters.cc File components/mus/public/cpp/lib/property_type_converters.cc (right): https://codereview.chromium.org/1824183002/diff/100001/components/mus/public/cpp/lib/property_type_converters.cc#newcode154 components/mus/public/cpp/lib/property_type_converters.cc:154: std::vector<uint8_t> vec(8 + ...
4 years, 9 months ago (2016-03-23 23:30:40 UTC) #6
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 9 months ago (2016-03-23 23:46:38 UTC) #8
msw
Nice patch! https://codereview.chromium.org/1824183002/diff/100001/ash/mus/shelf_delegate_mus.cc File ash/mus/shelf_delegate_mus.cc (right): https://codereview.chromium.org/1824183002/diff/100001/ash/mus/shelf_delegate_mus.cc#newcode229 ash/mus/shelf_delegate_mus.cc:229: if (index == -1) optional nit: DCHECK ...
4 years, 9 months ago (2016-03-24 17:40:55 UTC) #10
James Cook
Scott, please take another look. https://codereview.chromium.org/1824183002/diff/100001/ash/mus/shelf_delegate_mus.cc File ash/mus/shelf_delegate_mus.cc (right): https://codereview.chromium.org/1824183002/diff/100001/ash/mus/shelf_delegate_mus.cc#newcode229 ash/mus/shelf_delegate_mus.cc:229: if (index == -1) ...
4 years, 9 months ago (2016-03-25 15:39:29 UTC) #13
sky
https://codereview.chromium.org/1824183002/diff/160001/components/mus/public/cpp/lib/property_type_converters.cc File components/mus/public/cpp/lib/property_type_converters.cc (right): https://codereview.chromium.org/1824183002/diff/160001/components/mus/public/cpp/lib/property_type_converters.cc#newcode197 components/mus/public/cpp/lib/property_type_converters.cc:197: memcpy(bitmap.getPixels(), &input[4], bitmap.getSize()); Do you need to lock and ...
4 years, 9 months ago (2016-03-25 15:56:35 UTC) #14
James Cook
Scott, please take another look. (And thanks for the quick review!) https://codereview.chromium.org/1824183002/diff/160001/components/mus/public/cpp/lib/property_type_converters.cc File components/mus/public/cpp/lib/property_type_converters.cc (right): ...
4 years, 9 months ago (2016-03-25 16:52:39 UTC) #15
sky
LGTM
4 years, 9 months ago (2016-03-25 17:35:22 UTC) #16
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1824183002/180001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1824183002/180001
4 years, 9 months ago (2016-03-25 17:36:02 UTC) #18
commit-bot: I haz the power
Committed patchset #10 (id:180001)
4 years, 9 months ago (2016-03-25 18:12:03 UTC) #20
commit-bot: I haz the power
4 years, 9 months ago (2016-03-25 18:13:35 UTC) #22
Message was sent while issue was closed.
Patchset 10 (id:??) landed as
https://crrev.com/cac8709a0d06fee9d9f048b9e779ce59902673a5
Cr-Commit-Position: refs/heads/master@{#383312}

Powered by Google App Engine
This is Rietveld 408576698