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

Issue 2791463002: mash: Remove ShelfDelegate; move functions to ShelfModel. (Closed)

Created:
3 years, 8 months ago by msw
Modified:
3 years, 8 months ago
Reviewers:
James Cook, sky
CC:
chromium-reviews, kalyank, sadrul
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

mash: Remove ShelfDelegate; move functions to ShelfModel. Remove ShelfDelegate, subclasses, accessors, etc. Move ShelfDelegate responsibilities to ash::ShelfModel, add tests. Move ChromeLauncherControllerImpl ownership to ChromeShellDelegate. Add lifetime management functions: ShelfInit() and ShelfShutdown(). Apply similar ownership changes in tests; expose an AshTestHelper. Remove ShelfDelegate responsibilities from ChromeLauncherController: * Apply chrome-specific item info/delegates in ShelfItemAdded. - Support ShelfModel::SetItem calls amid ShelfItemAdded in ShelfView. - Register some item delegates early to avoid a default one. * Cleanup chrome-side item info in ShelfItemRemoved. TODO: Make ChromeLauncherControllerImpl lifetime more flexible. TODO: Move functions to (or add accessors on) ash::[mojom::]ShelfController. BUG=557406, 698887 TEST=No Chrome OS shelf behavior changes. R=jamescook@chromium.org,sky@chromium.org Review-Url: https://codereview.chromium.org/2791463002 Cr-Commit-Position: refs/heads/master@{#465821} Committed: https://chromium.googlesource.com/chromium/src/+/5138f3dd861b75ce64e9186b126c5fa8774a03e7

Patch Set 1 : Building... #

Patch Set 2 : Fix ash_unittests. #

Patch Set 3 : Revert ctor and init changes; use ShellDelegate::Shelf[Init|Shutdown]. #

Patch Set 4 : Use ShelfWindowWatcher for panel shelf item testing; remove TestShelfItemDelegate. #

Patch Set 5 : Debugging unit tests... panel windows minimized? #

Patch Set 6 : Fix unit tests. #

Patch Set 7 : Cleanup; only update items as needed when added. #

Patch Set 8 : Sync and rebase; cleanup. #

Total comments: 19

Patch Set 9 : Address comments. #

Patch Set 10 : Sync and rebase. #

Total comments: 4

Patch Set 11 : Address comment. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+699 lines, -859 lines) Patch
M ash/BUILD.gn View 1 2 3 4 5 6 7 8 9 1 chunk +0 lines, -1 line 0 comments Download
M ash/mus/BUILD.gn View 1 1 chunk +0 lines, -2 lines 0 comments Download
D ash/mus/shelf_delegate_mus.h View 1 chunk +0 lines, -37 lines 0 comments Download
D ash/mus/shelf_delegate_mus.cc View 1 chunk +0 lines, -51 lines 0 comments Download
M ash/mus/shell_delegate_mus.h View 1 2 3 4 5 6 7 8 1 chunk +2 lines, -1 line 0 comments Download
M ash/mus/shell_delegate_mus.cc View 1 2 3 4 5 6 7 8 2 chunks +6 lines, -3 lines 0 comments Download
M ash/root_window_controller.cc View 1 2 3 4 5 6 7 1 chunk +0 lines, -1 line 0 comments Download
D ash/shelf/shelf_delegate.h View 1 chunk +0 lines, -53 lines 0 comments Download
M ash/shelf/shelf_model.h View 1 2 3 4 5 6 7 8 3 chunks +30 lines, -3 lines 0 comments Download
M ash/shelf/shelf_model.cc View 1 2 3 4 5 6 7 8 2 chunks +106 lines, -0 lines 0 comments Download
M ash/shelf/shelf_model_unittest.cc View 1 2 3 4 5 6 7 8 9 10 2 chunks +145 lines, -10 lines 0 comments Download
M ash/shelf/shelf_view.h View 1 2 3 4 5 6 7 3 chunks +0 lines, -5 lines 0 comments Download
M ash/shelf/shelf_view.cc View 1 2 3 4 5 6 7 8 9 10 chunks +19 lines, -20 lines 0 comments Download
M ash/shelf/shelf_widget.cc View 1 2 3 4 5 6 7 2 chunks +1 line, -4 lines 0 comments Download
M ash/shell.h View 1 2 3 4 5 6 7 8 9 4 chunks +0 lines, -5 lines 0 comments Download
M ash/shell.cc View 1 2 3 4 5 6 7 8 9 4 chunks +9 lines, -17 lines 0 comments Download
M ash/shell/shell_delegate_impl.h View 1 2 3 4 5 6 7 8 1 chunk +2 lines, -1 line 0 comments Download
M ash/shell/shell_delegate_impl.cc View 1 2 3 4 5 6 7 8 9 2 chunks +3 lines, -4 lines 0 comments Download
M ash/shell_delegate.h View 1 2 3 4 5 6 7 8 2 chunks +4 lines, -4 lines 0 comments Download
M ash/test/BUILD.gn View 1 2 3 1 chunk +0 lines, -4 lines 0 comments Download
M ash/test/shelf_view_test_api.h View 2 chunks +0 lines, -4 lines 0 comments Download
M ash/test/shelf_view_test_api.cc View 1 chunk +0 lines, -4 lines 0 comments Download
M ash/test/shell_test_api.h View 2 chunks +0 lines, -2 lines 0 comments Download
M ash/test/shell_test_api.cc View 2 chunks +0 lines, -6 lines 0 comments Download
D ash/test/test_shelf_delegate.h View 1 2 3 4 5 6 7 1 chunk +0 lines, -42 lines 0 comments Download
D ash/test/test_shelf_delegate.cc View 1 2 3 4 5 6 7 1 chunk +0 lines, -99 lines 0 comments Download
M ash/test/test_shelf_item_delegate.h View 1 2 3 1 chunk +0 lines, -40 lines 0 comments Download
M ash/test/test_shelf_item_delegate.cc View 1 2 3 1 chunk +0 lines, -42 lines 0 comments Download
M ash/test/test_shell_delegate.h View 1 2 3 4 5 6 7 8 1 chunk +2 lines, -1 line 0 comments Download
M ash/test/test_shell_delegate.cc View 1 2 3 4 5 6 7 8 2 chunks +5 lines, -4 lines 0 comments Download
M chrome/browser/chromeos/arc/arc_play_store_enabled_preference_handler.cc View 1 2 3 4 5 6 2 chunks +6 lines, -6 lines 0 comments Download
M chrome/browser/extensions/bookmark_app_helper.cc View 1 2 3 4 5 6 7 2 chunks +3 lines, -5 lines 0 comments Download
M chrome/browser/ui/ash/app_list/app_list_controller_ash.cc View 1 2 chunks +5 lines, -5 lines 0 comments Download
M chrome/browser/ui/ash/chrome_shell_delegate.h View 1 2 2 chunks +3 lines, -2 lines 0 comments Download
M chrome/browser/ui/ash/chrome_shell_delegate.cc View 1 2 3 4 5 6 7 8 4 chunks +20 lines, -18 lines 0 comments Download
M chrome/browser/ui/ash/launcher/arc_app_launcher_browsertest.cc View 9 chunks +43 lines, -46 lines 0 comments Download
M chrome/browser/ui/ash/launcher/arc_app_window_launcher_controller.h View 1 2 3 4 5 6 7 3 chunks +1 line, -8 lines 0 comments Download
M chrome/browser/ui/ash/launcher/arc_app_window_launcher_controller.cc View 1 2 3 4 5 6 7 4 chunks +8 lines, -9 lines 0 comments Download
M chrome/browser/ui/ash/launcher/browser_shortcut_launcher_item_controller.cc View 1 2 3 4 5 6 7 8 2 chunks +3 lines, -4 lines 0 comments Download
M chrome/browser/ui/ash/launcher/chrome_launcher_controller_impl.h View 1 2 3 chunks +9 lines, -18 lines 0 comments Download
M chrome/browser/ui/ash/launcher/chrome_launcher_controller_impl.cc View 1 2 3 4 5 6 7 6 chunks +64 lines, -98 lines 0 comments Download
M chrome/browser/ui/ash/launcher/chrome_launcher_controller_impl_unittest.cc View 1 2 3 4 5 6 7 8 11 chunks +135 lines, -116 lines 0 comments Download
M chrome/browser/ui/ash/launcher/extension_app_window_launcher_controller.cc View 1 2 3 4 5 6 3 chunks +3 lines, -18 lines 0 comments Download
M chrome/browser/ui/ash/launcher/launcher_context_menu_unittest.cc View 1 2 3 4 5 6 7 5 chunks +43 lines, -19 lines 0 comments Download
M chrome/browser/ui/views/apps/app_info_dialog/app_info_footer_panel.cc View 1 2 3 4 5 6 3 chunks +7 lines, -8 lines 0 comments Download
M chrome/test/base/browser_with_test_window_test.h View 1 2 3 4 5 6 7 1 chunk +4 lines, -0 lines 0 comments Download
M chrome/test/base/browser_with_test_window_test.cc View 1 2 3 4 5 6 7 1 chunk +8 lines, -9 lines 0 comments Download

Messages

Total messages: 56 (48 generated)
msw
Hey James, please take a look; thanks!
3 years, 8 months ago (2017-04-18 22:53:48 UTC) #31
James Cook
I like it. Mostly questions. https://codereview.chromium.org/2791463002/diff/320001/ash/shelf/shelf_model.cc File ash/shelf/shelf_model.cc (right): https://codereview.chromium.org/2791463002/diff/320001/ash/shelf/shelf_model.cc#newcode112 ash/shelf/shelf_model.cc:112: } It would be ...
3 years, 8 months ago (2017-04-19 00:23:47 UTC) #34
msw
Comments addressed; please take another look; thanks! https://codereview.chromium.org/2791463002/diff/320001/ash/shelf/shelf_model.cc File ash/shelf/shelf_model.cc (right): https://codereview.chromium.org/2791463002/diff/320001/ash/shelf/shelf_model.cc#newcode112 ash/shelf/shelf_model.cc:112: } On ...
3 years, 8 months ago (2017-04-19 20:56:07 UTC) #35
James Cook
LGTM! https://codereview.chromium.org/2791463002/diff/320001/chrome/browser/ui/ash/launcher/chrome_launcher_controller_impl_unittest.cc File chrome/browser/ui/ash/launcher/chrome_launcher_controller_impl_unittest.cc (right): https://codereview.chromium.org/2791463002/diff/320001/chrome/browser/ui/ash/launcher/chrome_launcher_controller_impl_unittest.cc#newcode393 chrome/browser/ui/ash/launcher/chrome_launcher_controller_impl_unittest.cc:393: // ash::test::TestShellDelegate: On 2017/04/19 20:56:07, msw wrote: > ...
3 years, 8 months ago (2017-04-19 21:17:55 UTC) #42
msw
Scott, please take a look for missing chrome subdir OWNERS review: -chrome/browser/chromeos/arc/arc_play_store_enabled_preference_handler.cc -chrome/browser/extensions/bookmark_app_helper.cc -chrome/test/base/browser_with_test_window_test.* Feel ...
3 years, 8 months ago (2017-04-19 21:33:18 UTC) #45
sky
LGTM - I only looked at the miscellaneous files James isn't an owner of.
3 years, 8 months ago (2017-04-19 23:54:25 UTC) #50
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/2791463002/380001
3 years, 8 months ago (2017-04-20 00:13:25 UTC) #53
commit-bot: I haz the power
3 years, 8 months ago (2017-04-20 00:23:23 UTC) #56
Message was sent while issue was closed.
Committed patchset #11 (id:380001) as
https://chromium.googlesource.com/chromium/src/+/5138f3dd861b75ce64e9186b126c...

Powered by Google App Engine
This is Rietveld 408576698