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

Unified Diff: ui/app_list/views/contents_view.h

Issue 377783006: Make app list return to previous page after search. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/app_list/views/app_list_view_unittest.cc ('k') | ui/app_list/views/contents_view.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/app_list/views/contents_view.h
diff --git a/ui/app_list/views/contents_view.h b/ui/app_list/views/contents_view.h
index e57a0d2a34958daffc9192839a0bfc8e7cb8a556..b828490ad942a4b8eb18b46eb10d6d0fd33b7047 100644
--- a/ui/app_list/views/contents_view.h
+++ b/ui/app_list/views/contents_view.h
@@ -67,10 +67,14 @@ class APP_LIST_EXPORT ContentsView : public views::View,
void SetContentsSwitcherView(ContentsSwitcherView* contents_switcher_view);
+ // Shows/hides the search results. Hiding the search results will cause the
+ // app list to return to the page that was displayed before
+ // ShowSearchResults(true) was invoked.
void ShowSearchResults(bool show);
- void ShowFolderContent(AppListFolderItem* folder);
bool IsShowingSearchResults() const;
+ void ShowFolderContent(AppListFolderItem* folder);
+
// Sets the active launcher page and animates the pages into place.
void SetActivePage(int page_index);
@@ -156,6 +160,9 @@ class APP_LIST_EXPORT ContentsView : public views::View,
// Maps NamedPage onto |view_model_| indices.
std::map<NamedPage, int> named_page_to_view_;
+ // The page that was showing before ShowSearchResults(true) was invoked.
+ int page_before_search_;
+
// Manages the pagination for the launcher pages.
PaginationModel pagination_model_;
« no previous file with comments | « ui/app_list/views/app_list_view_unittest.cc ('k') | ui/app_list/views/contents_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698