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

Issue 1770993002: wip: Refactoring Ash's AppListController, moving the bulk of the logic to chrome/browser/ui/ash/app…

Created:
4 years, 9 months ago by mfomitchev
Modified:
4 years, 8 months ago
Reviewers:
xiyuan, Matt Giuca, sky
CC:
chromium-reviews, kalyank, sadrul, Matt Giuca, tapted, tfarina
Base URL:
https://chromium.googlesource.com/chromium/src.git@small_5_apps
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

wip: Refactoring Ash's AppListController, moving the bulk of the logic to chrome/browser/ui/ash/app_list/ The CL is incomplete. Unit tests are not done, and configurations other than chrome+ash (no mus) are not taken care of. Looking only for general feedback about the design at this point. This is in preparation for the Mus implementation of the app list. Here is the gist of the refactoring: - a new interface app_list::AppListController is introduced for ash to manipulate the app list. - ash::AppListController (formerly in ash/wm) is split up into AppListShowerAsh (in chrome/browser/ui/ash/app_list) and AppListLayoutDelegate (in ash/wm). AppListLayoutDelegate contains ash-y type of functionality, such as updating the shelf launcher icon. - AppListShowerAsh communicates with AppListLayoutDelegate via app_list::AppListLayoutDelegate. - Chrome no longer calls into ash::Shell for app-list functionality. Instead it uses AppListShowerAsh directly. Also see a rough design doc here: https://docs.google.com/document/d/1M9vqTTuprMssRXs8UIVaFjQUq3lUxSzwrWoPjPvca6Q In Mus+ash world, there will be a Mojo interface for app_list::AppListController and a different implementation of app_list::AppListLayoutDelegate, which will (at least initially) do less and will not communicate with Ash directly. Known issues with the current implementation: - AppListShowerAsh is a bit of an awkward class in the presence of AppListServiceAsh and AppListControllerDelegateAsh. There is src/chrome/browser/ui/app_list/app_list_shower_views.h, which is similar, but different. - AppListShowerAsh depends on AppListController for AppListViewDelegate, but AppListController and AppListServiceAsh depend on AppListShowerAsh for manipulating the app list. This leads to an awkward PostTask in AppListServiceAsh constructor. - ash::AppListLayoutDelegate does more than layout: e.g. it dismisses the app list on a UI event outside the app list window. BUG=557408

Patch Set 1 #

Patch Set 2 : --similarity 30 #

Patch Set 3 : Rename LayoutDelegate to AppListLayoutDelegate #

Patch Set 4 : Undo mus BUILD.gn changes #

Patch Set 5 : Added a comment for PostTask in AppListServiceAsh. #

Total comments: 10

Patch Set 6 : AppListController -> AppListShower, AppListLayoutDelegate -> AppListShowerDelegate. #

Patch Set 7 : Updated implementation plus tests. #

Patch Set 8 : Rebase #

Patch Set 9 : Getting rid of PostTask in AppListServiceAsh ctor. #

Patch Set 10 : Rebase #

Patch Set 11 : --similarity 30 #

Patch Set 12 : Updating with changes from crrev.com/1830293002 #

Patch Set 13 : Fixes, +AppListShowerDelegateFactory #

Patch Set 14 : switch fix #

Patch Set 15 : Linux fixes #

Patch Set 16 : Keyboard stuff to delegate #

Patch Set 17 : Moving app_list impl to ui/app_list/shower #

Patch Set 18 : events gyp dependency in shower #

Patch Set 19 : AppListShower to new component: //ui/app_list/shower, GetViewDelegate() in GetViewDelegate(), test … #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1913 lines, -1159 lines) Patch
M .gn View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +1 line, -0 lines 0 comments Download
M BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +1 line, -0 lines 0 comments Download
M ash/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 4 chunks +4 lines, -4 lines 0 comments Download
M ash/ash.gyp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 7 chunks +10 lines, -5 lines 0 comments Download
M ash/mus/shell_delegate_mus.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +1 line, -1 line 0 comments Download
M ash/mus/shell_delegate_mus.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +1 line, -1 line 0 comments Download
M ash/shell.h View 1 2 3 4 5 6 7 2 chunks +0 lines, -8 lines 0 comments Download
M ash/shell.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 5 chunks +5 lines, -25 lines 0 comments Download
M ash/shell/shell_delegate_impl.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 3 chunks +9 lines, -2 lines 0 comments Download
M ash/shell/shell_delegate_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 3 chunks +31 lines, -5 lines 0 comments Download
M ash/shell_delegate.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 2 chunks +3 lines, -3 lines 0 comments Download
D ash/test/app_list_controller_test_api.h View 1 2 3 4 5 6 1 chunk +0 lines, -47 lines 0 comments Download
D ash/test/app_list_controller_test_api.cc View 1 2 3 4 5 6 1 chunk +0 lines, -40 lines 0 comments Download
M ash/test/shell_test_api.h View 1 2 3 4 5 6 2 chunks +5 lines, -2 lines 0 comments Download
M ash/test/shell_test_api.cc View 1 2 3 4 5 6 2 chunks +3 lines, -2 lines 0 comments Download
M ash/test/test_shell_delegate.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 4 chunks +13 lines, -2 lines 0 comments Download
M ash/test/test_shell_delegate.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 3 chunks +33 lines, -7 lines 0 comments Download
D ash/wm/app_list_controller.h View 1 chunk +0 lines, -153 lines 0 comments Download
D ash/wm/app_list_controller.cc View 1 2 3 4 5 6 7 1 chunk +0 lines, -562 lines 0 comments Download
D ash/wm/app_list_controller_unittest.cc View 1 chunk +0 lines, -191 lines 0 comments Download
A ash/wm/app_list_shower_delegate.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +101 lines, -0 lines 0 comments Download
A ash/wm/app_list_shower_delegate.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +360 lines, -0 lines 0 comments Download
A ash/wm/app_list_shower_delegate_factory.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +39 lines, -0 lines 0 comments Download
A ash/wm/app_list_shower_delegate_factory.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +24 lines, -0 lines 0 comments Download
A + ash/wm/app_list_shower_delegate_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 9 chunks +28 lines, -24 lines 0 comments Download
A ash/wm/app_list_view_delegate_factory.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +26 lines, -0 lines 0 comments Download
M build/all.gyp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/apps/custom_launcher_page_browsertest_views.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 3 chunks +9 lines, -4 lines 0 comments Download
M chrome/browser/ui/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/ui/app_list/app_list_service_views_browsertest.cc View 1 2 3 4 5 6 7 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/browser/ui/ash/app_list/app_list_controller_ash.h View 1 2 3 4 5 6 2 chunks +8 lines, -1 line 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 10 11 12 13 14 15 16 2 chunks +9 lines, -11 lines 0 comments Download
M chrome/browser/ui/ash/app_list/app_list_service_ash.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 3 chunks +12 lines, -1 line 0 comments Download
M chrome/browser/ui/ash/app_list/app_list_service_ash.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 6 chunks +59 lines, -26 lines 0 comments Download
A chrome/browser/ui/ash/app_list/test/app_list_service_ash_test_api.h View 1 2 3 4 5 6 7 11 12 13 14 15 16 17 18 1 chunk +40 lines, -0 lines 0 comments Download
A chrome/browser/ui/ash/app_list/test/app_list_service_ash_test_api.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +45 lines, -0 lines 0 comments Download
M chrome/browser/ui/ash/chrome_shell_delegate.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/ash/chrome_shell_delegate.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 2 chunks +3 lines, -3 lines 0 comments Download
M chrome/browser/ui/ash/launcher/chrome_launcher_controller_browsertest.cc View 1 2 3 4 5 6 7 7 chunks +7 lines, -11 lines 0 comments Download
M chrome/chrome_browser_ui.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +1 line, -0 lines 0 comments Download
M chrome/chrome_tests.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 2 chunks +14 lines, -0 lines 0 comments Download
M chrome/test/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 2 chunks +21 lines, -0 lines 0 comments Download
A ui/app_list/shower/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +67 lines, -0 lines 0 comments Download
A ui/app_list/shower/app_list_shower.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +40 lines, -0 lines 0 comments Download
A ui/app_list/shower/app_list_shower.gyp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +106 lines, -0 lines 0 comments Download
A ui/app_list/shower/app_list_shower_delegate.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +55 lines, -0 lines 0 comments Download
A ui/app_list/shower/app_list_shower_delegate_factory.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +26 lines, -0 lines 0 comments Download
A ui/app_list/shower/app_list_shower_export.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +32 lines, -0 lines 0 comments Download
A ui/app_list/shower/app_list_shower_impl.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +118 lines, -0 lines 0 comments Download
A ui/app_list/shower/app_list_shower_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +264 lines, -0 lines 0 comments Download
A ui/app_list/shower/app_list_shower_impl_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +202 lines, -0 lines 0 comments Download
A + ui/app_list/shower/app_list_shower_unittests.isolate View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 5 chunks +6 lines, -6 lines 0 comments Download
A + ui/app_list/shower/test/DEPS View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 0 chunks +-1 lines, --1 lines 0 comments Download
A ui/app_list/shower/test/app_list_shower_impl_test_api.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +34 lines, -0 lines 0 comments Download
A ui/app_list/shower/test/app_list_shower_impl_test_api.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +25 lines, -0 lines 0 comments Download
A + ui/app_list/shower/test/run_all_unittests.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 3 chunks +8 lines, -10 lines 0 comments Download

Messages

Total messages: 27 (11 generated)
mfomitchev
PTAL: Looking for general feedback about the design at this point.
4 years, 9 months ago (2016-03-07 21:34:57 UTC) #8
sky
I poked at your review a bit, mostly thinking about AppListController. AppListController seems roughly like ...
4 years, 9 months ago (2016-03-07 23:49:59 UTC) #11
mfomitchev
On 2016/03/07 23:49:59, sky wrote: > I poked at your review a bit, mostly thinking ...
4 years, 9 months ago (2016-03-08 03:32:57 UTC) #12
sky
Ok On Mon, Mar 7, 2016 at 7:32 PM, <mfomitchev@chromium.org> wrote: > On 2016/03/07 23:49:59, ...
4 years, 9 months ago (2016-03-08 16:46:13 UTC) #13
mfomitchev
On 2016/03/08 16:46:13, sky wrote: > Ok > > On Mon, Mar 7, 2016 at ...
4 years, 9 months ago (2016-03-08 19:21:09 UTC) #14
sky
Where is AppListLayoutDelegate used? I see the ash implementation of it, but I don't see ...
4 years, 9 months ago (2016-03-08 22:49:18 UTC) #15
mfomitchev
On 2016/03/08 22:49:18, sky wrote: > Where is AppListLayoutDelegate used? I see the ash implementation ...
4 years, 9 months ago (2016-03-08 23:08:36 UTC) #16
sky
On 2016/03/08 23:08:36, mfomitchev wrote: > On 2016/03/08 22:49:18, sky wrote: > > Where is ...
4 years, 9 months ago (2016-03-08 23:38:25 UTC) #18
mfomitchev
On 2016/03/08 23:38:25, sky wrote: > On 2016/03/08 23:08:36, mfomitchev wrote: > > On 2016/03/08 ...
4 years, 9 months ago (2016-03-08 23:57:24 UTC) #19
mfomitchev
> AppListLayoutDelegate basically contains the code that has dependencies on > various > Ash pieces. ...
4 years, 9 months ago (2016-03-09 00:31:33 UTC) #20
sky
Ok, that makes sense. I find the name mildly confusing as the implication is that ...
4 years, 9 months ago (2016-03-09 00:46:55 UTC) #21
mfomitchev
Yeah, I am not a fan of the name either. Problem is, we already have ...
4 years, 9 months ago (2016-03-09 17:57:24 UTC) #22
sky
Fine by me. On Wed, Mar 9, 2016 at 9:57 AM, <mfomitchev@chromium.org> wrote: > Yeah, ...
4 years, 9 months ago (2016-03-09 18:35:56 UTC) #23
xiyuan
The design looks reasonable to me. Hopefully, after the app list clean up work, we ...
4 years, 9 months ago (2016-03-11 18:36:00 UTC) #24
mfomitchev
https://codereview.chromium.org/1770993002/diff/80001/ash/wm/app_list_layout_delegate.h File ash/wm/app_list_layout_delegate.h (right): https://codereview.chromium.org/1770993002/diff/80001/ash/wm/app_list_layout_delegate.h#newcode42 ash/wm/app_list_layout_delegate.h:42: // app_list::AppListController::LayoutDelegate: On 2016/03/11 18:36:00, xiyuan wrote: > nit: ...
4 years, 9 months ago (2016-03-24 17:47:29 UTC) #25
mfomitchev
4 years, 9 months ago (2016-03-24 17:48:01 UTC) #26
I will break up this CL and land in smaller pieces.

Powered by Google App Engine
This is Rietveld 408576698