void SetDragAndDropHostOfCurrentAppList(
ApplicationDragAndDropHost* drag_and_drop_host);
- void set_contents_switcher_view(
- ContentsSwitcherView* contents_switcher_view) {
- contents_switcher_view_ = contents_switcher_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);
virtual void TransitionStarted() OVERRIDE;
virtual void TransitionChanged() OVERRIDE;
+ // Returns the pagination model for the ContentsView.
+ const PaginationModel& pagination_model() { return pagination_model_; }
+
private:
// Sets the active launcher page, accounting for whether the change is for
// search results.
// 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_;