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

Issue 2860503002: mash: Replace int ShelfIDs with AppLaunchID strings. (Closed)

Created:
3 years, 7 months ago by msw
Modified:
3 years, 7 months ago
CC:
Aaron Boodman, abarth-chromium, chromium-apps-reviews_chromium.org, chromium-reviews, darin (slow to review), extensions-reviews_chromium.org, kalyank, khmel, Matt Giuca, qsr+mojo_chromium.org, sadrul, sky, tfarina, viettrungluu+watch_chromium.org, yzshen+watch_chromium.org
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

mash: Replace int ShelfIDs with AppLaunchID strings. Map ShelfID to AppLaunchId and use that instead of uint32_t. ShelfModel no longer assigns int ids, clients supply unique strings. ShelfID/ShelfItem/ShelfModel: -Add comparison operators and IsNull() helper function. -Add a corresponding ShelfID mojo struct with traits and test. -Allow empty app_id strings (iff the launch_id string is also empty). -Nix ShelfItem's AppLaunchId, use its ShelfID |id| instead. -DCHECK unique non-empty ShelfIDs (avoid odd ShelfModel behavior). Properties: -Remove aura::client::kAppIdKey, use ash::kShelfIdKey instead. -Move kShelfIDKey to ash/public/cpp to approve Chrome usage. -Register kShelfIdKey for mus/mash conversion and mirroring. -Require a kShelfIDKey property for ShelfWindowWatcher item creation. Misc/Chrome: -Set non-empty ShelfIDs for AppList, Task Manager, Settings. -Apply ExtensionWindow* ShelfIDs for panel windows too. -Use ShelfID in ExtensionAppWindowLauncherController maps. TODO: Rename AppLaunchId to ShelfID (can do in this CL if desired) TODO: Remove ShelfModel id conversion functions; audit users. (also used to check item presence in ShelfModel, map ARC ids...) OPTIONAL: Keep kShelfIDKey in ash/wm/window_properties for now? OPTIONAL: CHECK in ShelfModel for prod/arc? Loosen checks for tests? BUG=557406 TEST=No Chrome OS shelf or app regressions. R=jamescook@chromium.org,sky@chromium.org,tsepez@chromium.org,reveman@chromium.org Review-Url: https://codereview.chromium.org/2860503002 Cr-Commit-Position: refs/heads/master@{#469537} Committed: https://chromium.googlesource.com/chromium/src/+/84b8a5f1c2f1c62aadd4c943f3f093860cdc470d

Patch Set 1 #

Patch Set 2 : Fixing ShelfID assignment, crashes, etc. #

Patch Set 3 : Move property to ash/public/cpp/window_properties.h; cleanup. #

Patch Set 4 : Fix ash_unittests and unit_tests. #

Patch Set 5 : Review pass; refinements, cleanup, tests build. #

Patch Set 6 : Revert panel kShelfItemTypeKey init, test fixes. #

Patch Set 7 : Sync and rebase. #

Patch Set 8 : Restore AppLaunchId class via using ShelfID = AppLaunchId; cleanup. #

Total comments: 60

Patch Set 9 : Address comments. #

Patch Set 10 : Address comments. #

Total comments: 2

Patch Set 11 : Fix indent and format (against git cl format...). #

Patch Set 12 : Fix struct traits typo. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+759 lines, -821 lines) Patch
M ash/metrics/user_metrics_recorder_unittest.cc View 1 2 3 1 chunk +5 lines, -5 lines 0 comments Download
M ash/mus/window_manager.cc View 1 2 3 4 5 6 1 chunk +3 lines, -0 lines 0 comments Download
M ash/mus_property_mirror_ash_unittest.cc View 1 2 3 4 5 6 7 1 chunk +3 lines, -13 lines 0 comments Download
D ash/public/cpp/app_launch_id.h View 1 2 3 4 5 6 7 8 9 1 chunk +11 lines, -8 lines 0 comments Download
D ash/public/cpp/app_launch_id.cc View 1 2 3 4 5 6 7 8 9 1 chunk +27 lines, -6 lines 0 comments Download
M ash/public/cpp/mus_property_mirror_ash.cc View 1 2 1 chunk +2 lines, -2 lines 0 comments Download
M ash/public/cpp/shelf_item.h View 1 2 3 4 5 6 7 2 chunks +1 line, -5 lines 0 comments Download
M ash/public/cpp/shelf_item_delegate.h View 1 2 3 4 5 6 7 8 9 3 chunks +10 lines, -15 lines 0 comments Download
M ash/public/cpp/shelf_item_delegate.cc View 1 1 chunk +2 lines, -4 lines 0 comments Download
M ash/public/cpp/shelf_struct_traits.h View 1 2 3 4 5 6 7 8 9 1 chunk +11 lines, -7 lines 0 comments Download
M ash/public/cpp/shelf_struct_traits.cc View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +12 lines, -6 lines 0 comments Download
M ash/public/cpp/shelf_struct_traits_unittest.cc View 1 2 3 4 5 6 7 8 9 2 chunks +13 lines, -5 lines 0 comments Download
M ash/public/cpp/shelf_types.h View 1 2 3 4 5 6 7 8 2 chunks +3 lines, -4 lines 0 comments Download
M ash/public/cpp/window_properties.h View 1 2 1 chunk +4 lines, -0 lines 0 comments Download
M ash/public/cpp/window_properties.cc View 1 2 1 chunk +2 lines, -0 lines 0 comments Download
M ash/public/interfaces/shelf.mojom View 1 2 3 4 5 6 7 8 1 chunk +10 lines, -4 lines 0 comments Download
M ash/shelf/app_list_shelf_item_delegate.cc View 1 2 3 4 5 6 7 8 1 chunk +11 lines, -4 lines 0 comments Download
M ash/shelf/shelf_model.h View 1 2 3 4 5 6 7 6 chunks +10 lines, -16 lines 0 comments Download
M ash/shelf/shelf_model.cc View 1 2 3 4 5 6 7 8 9 10 chunks +24 lines, -29 lines 0 comments Download
M ash/shelf/shelf_model_unittest.cc View 1 2 3 4 5 6 7 8 9 12 chunks +96 lines, -97 lines 0 comments Download
M ash/shelf/shelf_tooltip_manager_unittest.cc View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M ash/shelf/shelf_unittest.cc View 1 2 3 4 5 6 7 4 chunks +11 lines, -10 lines 0 comments Download
M ash/shelf/shelf_view.h View 1 2 3 4 5 6 3 chunks +5 lines, -6 lines 0 comments Download
M ash/shelf/shelf_view.cc View 1 2 3 4 5 6 7 8 9 10 chunks +11 lines, -11 lines 0 comments Download
M ash/shelf/shelf_view_unittest.cc View 1 2 3 4 5 6 7 7 chunks +13 lines, -11 lines 0 comments Download
M ash/shelf/shelf_widget.cc View 1 2 3 chunks +8 lines, -8 lines 0 comments Download
M ash/shelf/shelf_window_watcher.cc View 1 2 3 4 5 6 7 8 9 6 chunks +15 lines, -17 lines 0 comments Download
M ash/shelf/shelf_window_watcher_item_delegate.h View 1 2 chunks +1 line, -2 lines 0 comments Download
M ash/shelf/shelf_window_watcher_item_delegate.cc View 1 2 3 4 5 6 7 8 9 3 chunks +7 lines, -6 lines 0 comments Download
M ash/shelf/shelf_window_watcher_unittest.cc View 1 2 3 5 chunks +9 lines, -2 lines 0 comments Download
M ash/shell/window_watcher.h View 1 2 3 4 5 6 7 8 2 chunks +2 lines, -2 lines 0 comments Download
M ash/shell/window_watcher.cc View 1 2 3 4 5 6 7 8 6 chunks +14 lines, -13 lines 0 comments Download
M ash/shell/window_watcher_shelf_item_delegate.h View 1 2 3 1 chunk +0 lines, -1 line 0 comments Download
M ash/shell/window_watcher_shelf_item_delegate.cc View 1 2 3 4 5 6 7 8 9 2 chunks +3 lines, -3 lines 0 comments Download
M ash/wm/overview/window_selector_unittest.cc View 1 2 3 4 3 chunks +4 lines, -0 lines 0 comments Download
M ash/wm/panels/panel_layout_manager_unittest.cc View 1 2 3 4 chunks +8 lines, -6 lines 0 comments Download
M ash/wm/panels/panel_window_resizer_unittest.cc View 1 2 3 2 chunks +3 lines, -0 lines 0 comments Download
M ash/wm/window_properties.h View 1 2 2 chunks +0 lines, -6 lines 0 comments Download
M ash/wm/window_properties.cc View 1 2 1 chunk +0 lines, -2 lines 0 comments Download
M chrome/browser/ui/ash/app_list/app_list_controller_ash.cc View 1 2 3 4 5 6 7 8 9 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/ui/ash/chrome_launcher_prefs.h View 1 2 chunks +15 lines, -19 lines 0 comments Download
M chrome/browser/ui/ash/chrome_launcher_prefs.cc View 1 2 3 4 5 6 7 8 9 7 chunks +24 lines, -27 lines 0 comments Download
M chrome/browser/ui/ash/launcher/app_shortcut_launcher_item_controller.h View 1 2 3 4 2 chunks +2 lines, -3 lines 0 comments Download
M chrome/browser/ui/ash/launcher/app_shortcut_launcher_item_controller.cc View 1 2 3 4 5 6 7 8 9 2 chunks +10 lines, -11 lines 0 comments Download
M chrome/browser/ui/ash/launcher/app_window_launcher_item_controller.h View 1 2 3 4 1 chunk +1 line, -2 lines 0 comments Download
M chrome/browser/ui/ash/launcher/app_window_launcher_item_controller.cc View 1 2 3 4 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/browser/ui/ash/launcher/arc_app_deferred_launcher_controller.cc View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/ash/launcher/arc_app_deferred_launcher_item_controller.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/ash/launcher/arc_app_launcher_browsertest.cc View 1 2 3 4 5 6 7 8 9 10 5 chunks +15 lines, -23 lines 0 comments Download
M chrome/browser/ui/ash/launcher/arc_app_window_launcher_controller.cc View 1 2 3 4 5 6 7 8 9 6 chunks +8 lines, -7 lines 0 comments Download
M chrome/browser/ui/ash/launcher/arc_app_window_launcher_item_controller.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/ash/launcher/arc_playstore_shortcut_launcher_item_controller.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/ash/launcher/browser_shortcut_launcher_item_controller.cc View 1 2 3 4 5 6 7 8 9 4 chunks +9 lines, -7 lines 0 comments Download
M chrome/browser/ui/ash/launcher/chrome_launcher_controller.h View 1 2 3 4 12 chunks +22 lines, -23 lines 0 comments Download
M chrome/browser/ui/ash/launcher/chrome_launcher_controller.cc View 1 2 3 4 5 6 7 8 9 31 chunks +74 lines, -91 lines 0 comments Download
M chrome/browser/ui/ash/launcher/chrome_launcher_controller_browsertest.cc View 1 2 3 4 5 6 7 8 9 17 chunks +21 lines, -21 lines 0 comments Download
M chrome/browser/ui/ash/launcher/chrome_launcher_controller_unittest.cc View 1 2 3 4 5 6 7 8 9 43 chunks +93 lines, -129 lines 0 comments Download
M chrome/browser/ui/ash/launcher/extension_app_window_launcher_controller.h View 1 2 3 4 5 6 7 2 chunks +5 lines, -5 lines 0 comments Download
M chrome/browser/ui/ash/launcher/extension_app_window_launcher_controller.cc View 1 2 3 4 5 6 7 8 9 9 chunks +40 lines, -64 lines 0 comments Download
M chrome/browser/ui/ash/launcher/extension_app_window_launcher_item_controller.h View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/ash/launcher/extension_app_window_launcher_item_controller.cc View 1 2 3 4 1 chunk +2 lines, -3 lines 0 comments Download
M chrome/browser/ui/ash/launcher/extension_launcher_context_menu.cc View 1 2 3 4 5 6 7 8 9 2 chunks +3 lines, -4 lines 0 comments Download
M chrome/browser/ui/ash/launcher/launcher_context_menu.cc View 1 2 3 4 5 6 7 8 9 3 chunks +6 lines, -6 lines 0 comments Download
M chrome/browser/ui/ash/launcher/launcher_context_menu_unittest.cc View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/ash/launcher/launcher_controller_helper.h View 1 2 chunks +1 line, -2 lines 0 comments Download
M chrome/browser/ui/ash/launcher/launcher_controller_helper.cc View 1 2 3 4 5 6 7 8 9 3 chunks +4 lines, -4 lines 0 comments Download
M chrome/browser/ui/ash/launcher/settings_window_observer.cc View 1 2 3 4 5 6 7 8 1 chunk +3 lines, -0 lines 0 comments Download
M chrome/browser/ui/views/apps/chrome_native_app_window_views_aura_ash.cc View 1 2 3 4 5 1 chunk +0 lines, -2 lines 0 comments Download
M chrome/browser/ui/views/frame/browser_frame_mus.cc View 1 2 1 chunk +0 lines, -2 lines 0 comments Download
M chrome/browser/ui/views/task_manager_view.cc View 1 2 3 4 5 6 7 8 1 chunk +3 lines, -0 lines 0 comments Download
M components/exo/shell_surface.cc View 1 2 3 4 5 6 7 8 9 1 chunk +3 lines, -3 lines 0 comments Download
M services/ui/public/interfaces/window_manager.mojom View 1 2 3 4 5 6 2 chunks +3 lines, -4 lines 0 comments Download
M ui/aura/client/aura_constants.h View 1 2 3 4 5 6 1 chunk +0 lines, -3 lines 0 comments Download
M ui/aura/client/aura_constants.cc View 1 2 3 4 5 6 1 chunk +0 lines, -1 line 0 comments Download
M ui/aura/mus/property_converter.cc View 1 2 1 chunk +0 lines, -2 lines 0 comments Download
M ui/aura/mus/window_tree_client_unittest.cc View 1 2 3 4 5 6 7 1 chunk +7 lines, -7 lines 0 comments Download

Messages

Total messages: 48 (36 generated)
msw
Hey James, please take a look, thanks! https://codereview.chromium.org/2860503002/diff/150001/ash/public/cpp/shelf_types.cc File ash/public/cpp/shelf_types.cc (right): https://codereview.chromium.org/2860503002/diff/150001/ash/public/cpp/shelf_types.cc#newcode7 ash/public/cpp/shelf_types.cc:7: #include "base/logging.h" ...
3 years, 7 months ago (2017-05-04 14:17:30 UTC) #19
James Cook
This is a big step forward. Thanks for tackling it. https://codereview.chromium.org/2860503002/diff/150001/ash/public/cpp/app_launch_id.cc File ash/public/cpp/app_launch_id.cc (right): https://codereview.chromium.org/2860503002/diff/150001/ash/public/cpp/app_launch_id.cc#newcode17 ...
3 years, 7 months ago (2017-05-04 16:38:50 UTC) #20
msw
Comments addressed, please take another look; thanks! Tom, please take a look at shelf.mojom. Sadrul, ...
3 years, 7 months ago (2017-05-04 19:05:58 UTC) #24
sky
ui/aura LGTM
3 years, 7 months ago (2017-05-04 19:28:46 UTC) #26
James Cook
LGTM with nits. Epic CL - thanks for fixing this. https://codereview.chromium.org/2860503002/diff/150001/ash/public/cpp/app_launch_id.h File ash/public/cpp/app_launch_id.h (right): https://codereview.chromium.org/2860503002/diff/150001/ash/public/cpp/app_launch_id.h#newcode36 ...
3 years, 7 months ago (2017-05-04 19:45:08 UTC) #27
msw
tsepez, please review shelf.mojom (and shelf_struct_traits*?) reveman, please review components/exo/shell_surface.cc https://codereview.chromium.org/2860503002/diff/150001/ash/public/cpp/app_launch_id.h File ash/public/cpp/app_launch_id.h (right): https://codereview.chromium.org/2860503002/diff/150001/ash/public/cpp/app_launch_id.h#newcode36 ...
3 years, 7 months ago (2017-05-04 20:39:08 UTC) #33
reveman
components/exo lgtm
3 years, 7 months ago (2017-05-04 20:40:09 UTC) #36
Tom Sepez
lgtm
3 years, 7 months ago (2017-05-04 22:09:35 UTC) #39
James Cook
https://codereview.chromium.org/2860503002/diff/180001/ash/public/cpp/shelf_struct_traits.cc File ash/public/cpp/shelf_struct_traits.cc (right): https://codereview.chromium.org/2860503002/diff/180001/ash/public/cpp/shelf_struct_traits.cc#newcode21 ash/public/cpp/shelf_struct_traits.cc:21: return data.ReadAppId(&out->app_id) && !data.ReadLaunchId(&out->launch_id) && extra "!" here? Also, ...
3 years, 7 months ago (2017-05-04 22:14:09 UTC) #40
msw
Thanks! Landing https://codereview.chromium.org/2860503002/diff/180001/ash/public/cpp/shelf_struct_traits.cc File ash/public/cpp/shelf_struct_traits.cc (right): https://codereview.chromium.org/2860503002/diff/180001/ash/public/cpp/shelf_struct_traits.cc#newcode21 ash/public/cpp/shelf_struct_traits.cc:21: return data.ReadAppId(&out->app_id) && !data.ReadLaunchId(&out->launch_id) && On 2017/05/04 ...
3 years, 7 months ago (2017-05-04 23:06:50 UTC) #41
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2860503002/220001
3 years, 7 months ago (2017-05-04 23:07:42 UTC) #44
commit-bot: I haz the power
3 years, 7 months ago (2017-05-05 00:14:25 UTC) #48
Message was sent while issue was closed.
Committed patchset #12 (id:220001) as
https://chromium.googlesource.com/chromium/src/+/84b8a5f1c2f1c62aadd4c943f3f0...

Powered by Google App Engine
This is Rietveld 408576698