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

Side by Side 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: 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef UI_APP_LIST_VIEWS_CONTENTS_VIEW_H_ 5 #ifndef UI_APP_LIST_VIEWS_CONTENTS_VIEW_H_
6 #define UI_APP_LIST_VIEWS_CONTENTS_VIEW_H_ 6 #define UI_APP_LIST_VIEWS_CONTENTS_VIEW_H_
7 7
8 #include <map> 8 #include <map>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 // If |drag_and_drop| is not NULL it will be called upon drag and drop 63 // If |drag_and_drop| is not NULL it will be called upon drag and drop
64 // operations outside the application list. 64 // operations outside the application list.
65 void SetDragAndDropHostOfCurrentAppList( 65 void SetDragAndDropHostOfCurrentAppList(
66 ApplicationDragAndDropHost* drag_and_drop_host); 66 ApplicationDragAndDropHost* drag_and_drop_host);
67 67
68 void set_contents_switcher_view( 68 void set_contents_switcher_view(
69 ContentsSwitcherView* contents_switcher_view) { 69 ContentsSwitcherView* contents_switcher_view) {
70 contents_switcher_view_ = contents_switcher_view; 70 contents_switcher_view_ = contents_switcher_view;
71 } 71 }
72 72
73 // Shows/hides the search results. Hiding the search results will cause the
74 // app list to return to the page that was displayed before
75 // ShowSearchResults(true) was invoked.
73 void ShowSearchResults(bool show); 76 void ShowSearchResults(bool show);
77 bool IsShowingSearchResults() const;
78
74 void ShowFolderContent(AppListFolderItem* folder); 79 void ShowFolderContent(AppListFolderItem* folder);
75 bool IsShowingSearchResults() const;
76 80
77 // Sets the active launcher page and animates the pages into place. 81 // Sets the active launcher page and animates the pages into place.
78 void SetActivePage(int page_index); 82 void SetActivePage(int page_index);
79 83
80 // The index of the currently active launcher page. 84 // The index of the currently active launcher page.
81 int GetActivePageIndex() const; 85 int GetActivePageIndex() const;
82 86
83 // True if |named_page| is the current active laucher page. 87 // True if |named_page| is the current active laucher page.
84 bool IsNamedPageActive(NamedPage named_page) const; 88 bool IsNamedPageActive(NamedPage named_page) const;
85 89
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
149 StartPageView* start_page_view_; 153 StartPageView* start_page_view_;
150 154
151 AppListMainView* app_list_main_view_; // Parent view, owns this. 155 AppListMainView* app_list_main_view_; // Parent view, owns this.
152 // Sibling view, owned by |app_list_main_view_|. 156 // Sibling view, owned by |app_list_main_view_|.
153 ContentsSwitcherView* contents_switcher_view_; 157 ContentsSwitcherView* contents_switcher_view_;
154 158
155 scoped_ptr<views::ViewModel> view_model_; 159 scoped_ptr<views::ViewModel> view_model_;
156 // Maps NamedPage onto |view_model_| indices. 160 // Maps NamedPage onto |view_model_| indices.
157 std::map<NamedPage, int> named_page_to_view_; 161 std::map<NamedPage, int> named_page_to_view_;
158 162
163 // The page that was showing before ShowSearchResults(true) was invoked.
164 int page_before_search_;
165
159 // Manages the pagination for the launcher pages. 166 // Manages the pagination for the launcher pages.
160 PaginationModel pagination_model_; 167 PaginationModel pagination_model_;
161 168
162 DISALLOW_COPY_AND_ASSIGN(ContentsView); 169 DISALLOW_COPY_AND_ASSIGN(ContentsView);
163 }; 170 };
164 171
165 } // namespace app_list 172 } // namespace app_list
166 173
167 #endif // UI_APP_LIST_VIEWS_CONTENTS_VIEW_H_ 174 #endif // UI_APP_LIST_VIEWS_CONTENTS_VIEW_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698