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

Issue 225053004: Refactor views app list services to allow more code sharing (Closed)

Created:
6 years, 8 months ago by tapted
Modified:
6 years, 7 months ago
Reviewers:
Matt Giuca
CC:
chromium-reviews, chrome-apps-syd-reviews_chromium.org, tfarina, benwells
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Visibility:
Public.

Description

Refactor views app list services to allow more code sharing To run the toolkit-views app launcher on Mac, it needs a new app list service + supporting classes. It's going to look a lot like the Linux one. This CL starts by sharing what can be shared between Windows and Linux, in preparation for using it on Mac as well. It does this principally by: - Moving `app_list_shower` to `app_list_shower_views`, making it views-specific; - Adding AppListServiceViews, which Win/Linux (and soon Mac) inherit from; - Rearranging the delegation to eliminate some boilerplate. Other changes: - Removed AppList container abstract interface (now just access AppListView); - Removed AppListFactory (now AppListShower::MakeViewForCurrentProfile()); - Moved AppListControllerDelegateLinux to AppListControllerDelegateViews; - Most of AppListServiceLinux moves to AppListServiceViews; - Added AppListShowerDelegate and AppListShower given virtual method hooks to assist testability (previously AppListShower was given a NULL service/delegate in tests); - Positioning logic in AppListWin/AppListLinux made static/stateless; - Removes the `on_should_dismiss_` closure (now just dismiss via the service; - Big trim of AppListServiceWin and AppListServiceLinux - now these are just platform-specific stuff. BUG=365977 TEST=Just refactoring, nothing should change Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=267184 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=267354 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=268035

Patch Set 1 #

Patch Set 2 : rebase on crrev/226283003 #

Patch Set 3 : rebase on 232123004 #

Patch Set 4 : better win #

Patch Set 5 : base off crrev/238723003 and resolve conflicts #

Patch Set 6 : more betterrer #

Patch Set 7 : aaaaand it's done #

Patch Set 8 : Windows is the worst #

Total comments: 2

Patch Set 9 : oops - fix some names #

Total comments: 36

Patch Set 10 : rebase and fix app_list_linux conflict #

Patch Set 11 : respond to comments #

Total comments: 1

Patch Set 12 : rebase+sim30 #

Total comments: 1

Patch Set 13 : add missing OVERRIDE #

Patch Set 14 : fix filename_rules.gypi #

Patch Set 15 : rebase+sim30 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+425 lines, -1071 lines) Patch
M build/filename_rules.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +1 line, -1 line 0 comments Download
D chrome/browser/ui/app_list/app_list.h View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +0 lines, -26 lines 0 comments Download
A + chrome/browser/ui/app_list/app_list_controller_delegate_views.h View 1 2 3 4 5 6 7 8 9 10 11 14 2 chunks +11 lines, -18 lines 0 comments Download
A + chrome/browser/ui/app_list/app_list_controller_delegate_views.cc View 1 2 3 4 5 6 7 8 9 10 11 14 1 chunk +11 lines, -11 lines 0 comments Download
D chrome/browser/ui/app_list/app_list_factory.h View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +0 lines, -27 lines 0 comments Download
A + chrome/browser/ui/app_list/app_list_service_views.h View 1 2 3 4 5 6 7 8 9 10 14 2 chunks +28 lines, -22 lines 0 comments Download
A chrome/browser/ui/app_list/app_list_service_views.cc View 1 2 3 4 5 6 7 1 chunk +71 lines, -0 lines 0 comments Download
D chrome/browser/ui/app_list/app_list_shower.h View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +0 lines, -66 lines 0 comments Download
D chrome/browser/ui/app_list/app_list_shower.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +0 lines, -102 lines 0 comments Download
A chrome/browser/ui/app_list/app_list_shower_delegate.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +23 lines, -0 lines 0 comments Download
A + chrome/browser/ui/app_list/app_list_shower_views.h View 1 2 3 4 5 6 7 8 9 10 11 14 1 chunk +33 lines, -24 lines 0 comments Download
A + chrome/browser/ui/app_list/app_list_shower_views.cc View 1 2 3 4 5 6 7 8 9 10 11 4 chunks +57 lines, -21 lines 0 comments Download
A + chrome/browser/ui/app_list/app_list_shower_views_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 5 chunks +59 lines, -59 lines 0 comments Download
D chrome/browser/ui/app_list/test/app_list_shower_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +0 lines, -166 lines 0 comments Download
D chrome/browser/ui/views/app_list/linux/app_list_controller_delegate_linux.h View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +0 lines, -38 lines 0 comments Download
D chrome/browser/ui/views/app_list/linux/app_list_controller_delegate_linux.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +0 lines, -31 lines 0 comments Download
M chrome/browser/ui/views/app_list/linux/app_list_linux.h View 1 2 3 4 5 6 7 8 9 10 3 chunks +4 lines, -33 lines 0 comments Download
M chrome/browser/ui/views/app_list/linux/app_list_linux.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 3 chunks +6 lines, -62 lines 0 comments Download
M chrome/browser/ui/views/app_list/linux/app_list_linux_unittest.cc View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/ui/views/app_list/linux/app_list_service_linux.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +13 lines, -21 lines 0 comments Download
M chrome/browser/ui/views/app_list/linux/app_list_service_linux.cc View 1 2 3 4 5 6 7 8 9 10 3 chunks +24 lines, -85 lines 0 comments Download
M chrome/browser/ui/views/app_list/win/activation_tracker_win.h View 1 2 3 4 5 6 2 chunks +4 lines, -12 lines 0 comments Download
M chrome/browser/ui/views/app_list/win/activation_tracker_win.cc View 1 2 3 4 5 6 7 4 chunks +10 lines, -9 lines 0 comments Download
M chrome/browser/ui/views/app_list/win/app_list_controller_delegate_win.h View 1 2 3 4 5 6 7 1 chunk +3 lines, -19 lines 0 comments Download
M chrome/browser/ui/views/app_list/win/app_list_controller_delegate_win.cc View 1 2 3 4 5 6 7 2 chunks +3 lines, -21 lines 0 comments Download
M chrome/browser/ui/views/app_list/win/app_list_service_win.h View 1 2 3 4 5 6 7 8 9 10 3 chunks +14 lines, -21 lines 0 comments Download
M chrome/browser/ui/views/app_list/win/app_list_service_win.cc View 1 2 3 4 5 6 7 8 9 10 8 chunks +25 lines, -95 lines 0 comments Download
M chrome/browser/ui/views/app_list/win/app_list_win.h View 1 2 3 4 5 6 7 8 9 10 2 chunks +9 lines, -29 lines 0 comments Download
M chrome/browser/ui/views/app_list/win/app_list_win.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 3 chunks +7 lines, -45 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 3 chunks +7 lines, -6 lines 0 comments Download
M chrome/chrome_tests_unit.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 30 (0 generated)
tapted
Note Rietveld is a bit generous with the diffstat. It should be: 421 insertions(+), 668 ...
6 years, 8 months ago (2014-04-23 03:06:53 UTC) #1
benwells
-me, +mgiuca to review.
6 years, 8 months ago (2014-04-24 01:32:24 UTC) #2
Matt Giuca
Some initial comments. Let's discuss in person. https://codereview.chromium.org/225053004/diff/440001/chrome/browser/ui/app_list/app_list_factory.h File chrome/browser/ui/app_list/app_list_factory.h (left): https://codereview.chromium.org/225053004/diff/440001/chrome/browser/ui/app_list/app_list_factory.h#oldcode1 chrome/browser/ui/app_list/app_list_factory.h:1: // Copyright ...
6 years, 7 months ago (2014-04-29 03:52:51 UTC) #3
tapted
oops - just noticed I had some self-nits - I'll check them off in the ...
6 years, 7 months ago (2014-04-29 04:20:30 UTC) #4
Matt Giuca
https://codereview.chromium.org/225053004/diff/440001/chrome/browser/ui/app_list/app_list_service_views.h File chrome/browser/ui/app_list/app_list_service_views.h (right): https://codereview.chromium.org/225053004/diff/440001/chrome/browser/ui/app_list/app_list_service_views.h#newcode43 chrome/browser/ui/app_list/app_list_service_views.h:43: // AppListCreatorDelegate overrides: The Oops is to change this ...
6 years, 7 months ago (2014-04-30 00:41:22 UTC) #5
tapted
Thanks Matt! https://codereview.chromium.org/225053004/diff/440001/chrome/browser/ui/app_list/app_list_service_views.h File chrome/browser/ui/app_list/app_list_service_views.h (right): https://codereview.chromium.org/225053004/diff/440001/chrome/browser/ui/app_list/app_list_service_views.h#newcode43 chrome/browser/ui/app_list/app_list_service_views.h:43: // AppListCreatorDelegate overrides: On 2014/04/30 00:41:23, Matt ...
6 years, 7 months ago (2014-04-30 03:26:02 UTC) #6
Matt Giuca
Groovy! Thanks for doing all this work! LGTM
6 years, 7 months ago (2014-04-30 04:45:59 UTC) #7
tapted
The CQ bit was checked by tapted@chromium.org
6 years, 7 months ago (2014-04-30 04:48:24 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/tapted@chromium.org/225053004/540001
6 years, 7 months ago (2014-04-30 04:53:57 UTC) #9
commit-bot: I haz the power
Change committed as 267184
6 years, 7 months ago (2014-04-30 11:30:52 UTC) #10
tapted
A revert of this CL has been created in https://codereview.chromium.org/262643003/ by tapted@chromium.org. The reason for ...
6 years, 7 months ago (2014-04-30 11:57:03 UTC) #11
tapted
https://codereview.chromium.org/225053004/diff/540001/chrome/chrome_tests_unit.gypi File chrome/chrome_tests_unit.gypi (right): https://codereview.chromium.org/225053004/diff/540001/chrome/chrome_tests_unit.gypi#newcode2830 chrome/chrome_tests_unit.gypi:2830: # Unit tests for chrome app list, not run ...
6 years, 7 months ago (2014-04-30 11:59:19 UTC) #12
tapted
added the missing OVERRIDEs that clang wants on the waterfall but not linux_chromium_clang_dbg in the ...
6 years, 7 months ago (2014-04-30 12:43:26 UTC) #13
tapted
The CQ bit was checked by tapted@chromium.org
6 years, 7 months ago (2014-04-30 12:43:53 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/tapted@chromium.org/225053004/620001
6 years, 7 months ago (2014-04-30 12:44:09 UTC) #15
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 7 months ago (2014-04-30 12:46:43 UTC) #16
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on tryserver.chromium
6 years, 7 months ago (2014-04-30 12:46:43 UTC) #17
tapted
The CQ bit was checked by tapted@chromium.org
6 years, 7 months ago (2014-04-30 22:04:35 UTC) #18
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/tapted@chromium.org/225053004/620001
6 years, 7 months ago (2014-04-30 22:05:16 UTC) #19
commit-bot: I haz the power
Change committed as 267354
6 years, 7 months ago (2014-04-30 22:10:51 UTC) #20
Matt Giuca
:( what a mess. No idea why there's a difference.
6 years, 7 months ago (2014-04-30 22:18:41 UTC) #21
tapted
PTAL. Rebased on crrev/262773002 and updated build/filename_rules.gypi to make the foo_views rule consistent with all ...
6 years, 7 months ago (2014-05-01 06:53:09 UTC) #22
Matt Giuca
lgtm
6 years, 7 months ago (2014-05-01 07:29:58 UTC) #23
tapted
The CQ bit was checked by tapted@chromium.org
6 years, 7 months ago (2014-05-03 00:15:23 UTC) #24
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/tapted@chromium.org/225053004/640001
6 years, 7 months ago (2014-05-03 00:16:25 UTC) #25
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 7 months ago (2014-05-03 00:16:51 UTC) #26
commit-bot: I haz the power
Failed to apply patch for chrome/chrome_browser_ui.gypi: While running patch -p1 --forward --force --no-backup-if-mismatch; patching file ...
6 years, 7 months ago (2014-05-03 00:16:52 UTC) #27
tapted
The CQ bit was checked by tapted@chromium.org
6 years, 7 months ago (2014-05-03 02:23:53 UTC) #28
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/tapted@chromium.org/225053004/660001
6 years, 7 months ago (2014-05-03 02:27:02 UTC) #29
commit-bot: I haz the power
6 years, 7 months ago (2014-05-03 03:55:22 UTC) #30
Message was sent while issue was closed.
Change committed as 268035

Powered by Google App Engine
This is Rietveld 408576698