Upstream version 9.38.198.0
[platform/framework/web/crosswalk.git] / src / ui / app_list / views / contents_view.h
index ed2abb3..b828490 100644 (file)
@@ -65,15 +65,16 @@ class APP_LIST_EXPORT ContentsView : public views::View,
   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);
 
@@ -110,6 +111,9 @@ class APP_LIST_EXPORT ContentsView : public views::View,
   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.
@@ -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_;