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

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: 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 unified diff | Download patch | Annotate | Revision Log
« 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 »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 // The app list gets closed and drag and drop operations need to be cancelled. 60 // The app list gets closed and drag and drop operations need to be cancelled.
61 void CancelDrag(); 61 void CancelDrag();
62 62
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 SetContentsSwitcherView(ContentsSwitcherView* contents_switcher_view); 68 void SetContentsSwitcherView(ContentsSwitcherView* contents_switcher_view);
69 69
70 // Shows/hides the search results. Hiding the search results will cause the
71 // app list to return to the page that was displayed before
72 // ShowSearchResults(true) was invoked.
70 void ShowSearchResults(bool show); 73 void ShowSearchResults(bool show);
74 bool IsShowingSearchResults() const;
75
71 void ShowFolderContent(AppListFolderItem* folder); 76 void ShowFolderContent(AppListFolderItem* folder);
72 bool IsShowingSearchResults() const;
73 77
74 // Sets the active launcher page and animates the pages into place. 78 // Sets the active launcher page and animates the pages into place.
75 void SetActivePage(int page_index); 79 void SetActivePage(int page_index);
76 80
77 // The index of the currently active launcher page. 81 // The index of the currently active launcher page.
78 int GetActivePageIndex() const; 82 int GetActivePageIndex() const;
79 83
80 // True if |named_page| is the current active laucher page. 84 // True if |named_page| is the current active laucher page.
81 bool IsNamedPageActive(NamedPage named_page) const; 85 bool IsNamedPageActive(NamedPage named_page) const;
82 86
(...skipping 66 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
« 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