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

Issue 2171813004: mash: Fold ShelfItemDelegateManager into ShelfModel (Closed)

Created:
4 years, 5 months ago by James Cook
Modified:
4 years, 5 months ago
CC:
chromium-reviews, kalyank, sadrul, yiyix
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

mash: Fold ShelfItemDelegateManager into ShelfModel This eliminates some accesses of ash::Shell inside the shelf code, which is necessary for porting the shelf to mus/mustash. * ShelfModel now owns the ShelfItemDelegates * Explicitly delete the ShelfItemDelegates during shutdown, because some of the subclasses reach into ShelfModel during their destructors * Move AppListShelfItemDelegate earlier, to WmShell::Initialize phase * Fix ShelfAppBrowserTest.LauncherContextMenuVerifyCloseItemAppearance to use the actual shelf ID of the browser shortcut, rather than using the magic number "1" that can sometimes mean the app list item. This also simplifies some of the unit tests for ChromeLauncherController because they don't need to construct their own ShelfItemDelegateManager. BUG=629990, 429870 TEST=ash_unittests, chrome unit_tests, manually test shelf pin/unpin/etc. Committed: https://crrev.com/b5974f28ede18239045b4e3c17324e05b5a0c8fa Cr-Commit-Position: refs/heads/master@{#407199}

Patch Set 1 #

Patch Set 2 : bug number in comment #

Patch Set 3 : cleanup #

Total comments: 22

Patch Set 4 : fix browser test, review comments #

Patch Set 5 : rebase #

Patch Set 6 : move shelf item delegate destruction into ~WmShell destructor #

Patch Set 7 : explicitly destroy ShelfItemDelegates #

Unified diffs Side-by-side diffs Delta from patch set Stats (+183 lines, -490 lines) Patch
M ash/ash.gyp View 1 2 3 4 2 chunks +0 lines, -4 lines 0 comments Download
M ash/common/shelf/app_list_shelf_item_delegate.h View 1 chunk +5 lines, -1 line 0 comments Download
M ash/common/shelf/app_list_shelf_item_delegate.cc View 1 2 3 1 chunk +16 lines, -5 lines 0 comments Download
D ash/common/shelf/shelf_item_delegate_manager.h View 1 chunk +0 lines, -84 lines 0 comments Download
D ash/common/shelf/shelf_item_delegate_manager.cc View 1 chunk +0 lines, -80 lines 0 comments Download
M ash/common/shelf/shelf_model.h View 1 2 3 6 6 chunks +22 lines, -1 line 0 comments Download
M ash/common/shelf/shelf_model.cc View 1 2 3 6 5 chunks +36 lines, -0 lines 0 comments Download
M ash/common/shelf/shelf_model_observer.h View 1 2 chunks +8 lines, -0 lines 0 comments Download
M ash/common/shelf/shelf_model_unittest.cc View 1 2 3 4 5 1 chunk +2 lines, -0 lines 0 comments Download
M ash/common/wm_shell.cc View 1 2 3 4 5 6 3 chunks +9 lines, -2 lines 0 comments Download
M ash/shelf/shelf.cc View 2 chunks +1 line, -3 lines 0 comments Download
M ash/shelf/shelf_tooltip_manager_unittest.cc View 2 chunks +1 line, -2 lines 0 comments Download
M ash/shelf/shelf_unittest.cc View 1 2 5 chunks +7 lines, -23 lines 0 comments Download
M ash/shelf/shelf_view.h View 1 2 3 3 chunks +2 lines, -4 lines 0 comments Download
M ash/shelf/shelf_view.cc View 11 chunks +14 lines, -16 lines 0 comments Download
M ash/shelf/shelf_view_unittest.cc View 12 chunks +11 lines, -20 lines 0 comments Download
M ash/shelf/shelf_window_watcher.h View 3 chunks +1 line, -4 lines 0 comments Download
M ash/shelf/shelf_window_watcher.cc View 3 chunks +2 lines, -7 lines 0 comments Download
M ash/shell.h View 1 2 3 4 3 chunks +0 lines, -6 lines 0 comments Download
M ash/shell.cc View 1 2 3 4 3 chunks +1 line, -20 lines 0 comments Download
M ash/shell/window_watcher.cc View 2 chunks +1 line, -4 lines 0 comments Download
M ash/sysui/shelf_delegate_mus.cc View 4 chunks +4 lines, -8 lines 0 comments Download
D ash/test/shelf_item_delegate_manager_test_api.h View 1 chunk +0 lines, -33 lines 0 comments Download
D ash/test/shelf_item_delegate_manager_test_api.cc View 1 chunk +0 lines, -28 lines 0 comments Download
M ash/test/test_shelf_delegate.cc View 1 2 3 2 chunks +1 line, -6 lines 0 comments Download
M chrome/browser/ui/ash/launcher/app_window_launcher_item_controller.h View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/ash/launcher/chrome_launcher_controller.h View 1 2 3 1 chunk +1 line, -2 lines 0 comments Download
M chrome/browser/ui/ash/launcher/chrome_launcher_controller_impl.h View 1 2 3 6 chunks +3 lines, -15 lines 0 comments Download
M chrome/browser/ui/ash/launcher/chrome_launcher_controller_impl.cc View 1 2 3 9 chunks +17 lines, -43 lines 0 comments Download
M chrome/browser/ui/ash/launcher/chrome_launcher_controller_impl_browsertest.cc View 1 2 3 2 chunks +9 lines, -15 lines 0 comments Download
M chrome/browser/ui/ash/launcher/chrome_launcher_controller_impl_unittest.cc View 1 2 3 12 chunks +5 lines, -49 lines 0 comments Download
M chrome/browser/ui/ash/launcher/launcher_context_menu.cc View 2 chunks +2 lines, -3 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

Messages

Total messages: 29 (19 generated)
James Cook
Please take a look: msw, the whole thing skuhne, chrome/browser/ui/ash/launcher/* skuhne, can you also comment ...
4 years, 5 months ago (2016-07-21 20:33:31 UTC) #4
msw
Nice cleanup! https://codereview.chromium.org/2171813004/diff/40001/ash/common/shelf/app_list_shelf_item_delegate.cc File ash/common/shelf/app_list_shelf_item_delegate.cc (right): https://codereview.chromium.org/2171813004/diff/40001/ash/common/shelf/app_list_shelf_item_delegate.cc#newcode19 ash/common/shelf/app_list_shelf_item_delegate.cc:19: // Add the app list item to ...
4 years, 5 months ago (2016-07-21 21:30:54 UTC) #7
James Cook
msw, skuhne please take another look +CC yiyix, just FYI I had to change ShelfAppBrowserTest.LauncherContextMenuVerifyCloseItemAppearance. ...
4 years, 5 months ago (2016-07-22 01:20:08 UTC) #9
msw
lgtm with an open question about the need for DestroyItemDelegates. https://codereview.chromium.org/2171813004/diff/40001/ash/common/shelf/shelf_model.cc File ash/common/shelf/shelf_model.cc (right): https://codereview.chromium.org/2171813004/diff/40001/ash/common/shelf/shelf_model.cc#newcode54 ...
4 years, 5 months ago (2016-07-22 01:49:52 UTC) #14
James Cook
On 2016/07/22 01:49:52, msw wrote: > lgtm with an open question about the need for ...
4 years, 5 months ago (2016-07-22 16:15:30 UTC) #17
msw
On 2016/07/22 16:15:30, James Cook wrote: > Do you think it's worth the risk? No, ...
4 years, 5 months ago (2016-07-22 17:11:22 UTC) #22
James Cook
I just spent some time talking to khmel@ who works on ARC UI and wrote ...
4 years, 5 months ago (2016-07-22 17:18:55 UTC) #23
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/2171813004/120001
4 years, 5 months ago (2016-07-22 17:19:38 UTC) #26
commit-bot: I haz the power
Committed patchset #7 (id:120001)
4 years, 5 months ago (2016-07-22 17:59:52 UTC) #27
commit-bot: I haz the power
4 years, 5 months ago (2016-07-22 18:03:14 UTC) #29
Message was sent while issue was closed.
Patchset 7 (id:??) landed as
https://crrev.com/b5974f28ede18239045b4e3c17324e05b5a0c8fa
Cr-Commit-Position: refs/heads/master@{#407199}

Powered by Google App Engine
This is Rietveld 408576698