Chromium Code Reviews
DescriptionRefactor app list so AppsGridView owns the PaginationModel.
Previously, PaginationModel was created by platform-specific code
(either AppListController or AppListShower) and passed down through 6
layers to AppsGridView. Now, AppsGridView creates its own
PaginationModel, and many of the layers don't need to know about it.
Some classes do need to access the PaginationModel (most of these
dependencies can probably be broken later). These now pull the
PaginationModel from the AppsGridView instead of caching it on the way
down.
On ChromeOS, the lifetime of the PaginationModel is now tied to the
visibility of the app list (was previously the lifetime of the process).
To get around this, AppListController must now manually remember the
current page, passing it to new PaginationModels as they are created, as
well as adding itself as an observer. This is still a net win, as the
ownership is in the right place, and several classes no longer depend on
PaginationModel, with more dependency cuts possible in the future.
BUG=377626
Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=274785
Patch Set 1 #Patch Set 2 : Rebase. #Patch Set 3 : Fix tests and bugs. #
Total comments: 42
Patch Set 4 : Fixed app_list_demo. #Patch Set 5 : Respond to review comments (tapted and xiyuan). #
Total comments: 6
Patch Set 6 : Various improvements. #Patch Set 7 : Pass initial page number to AppListMainView to preload the correct page. #Patch Set 8 : Renamed current_app_page to current_apps_page. #Patch Set 9 : Rebase against CL 311753002 (precursor). #Patch Set 10 : Fix AppListDemo. #Patch Set 11 : Run ClangFormat (corrects pre-existing issues). #Patch Set 12 : AppsGridView: Initialize PageSwitcher in the body of the constructor. #Patch Set 13 : Rebase. #Patch Set 14 : Fix compile error (conflict). #Messages
Total messages: 24 (0 generated)
|