| OLD | NEW |
| 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 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 54 // The app list gets closed and drag and drop operations need to be cancelled. | 54 // The app list gets closed and drag and drop operations need to be cancelled. |
| 55 void CancelDrag(); | 55 void CancelDrag(); |
| 56 | 56 |
| 57 // If |drag_and_drop| is not NULL it will be called upon drag and drop | 57 // If |drag_and_drop| is not NULL it will be called upon drag and drop |
| 58 // operations outside the application list. | 58 // operations outside the application list. |
| 59 void SetDragAndDropHostOfCurrentAppList( | 59 void SetDragAndDropHostOfCurrentAppList( |
| 60 ApplicationDragAndDropHost* drag_and_drop_host); | 60 ApplicationDragAndDropHost* drag_and_drop_host); |
| 61 | 61 |
| 62 void ShowSearchResults(bool show); | 62 void ShowSearchResults(bool show); |
| 63 void ShowFolderContent(AppListFolderItem* folder); | 63 void ShowFolderContent(AppListFolderItem* folder); |
| 64 bool IsShowingSearchResults() const; |
| 64 | 65 |
| 65 // Sets the active launcher page and animates the pages into place. | 66 // Sets the active launcher page and animates the pages into place. |
| 66 void SetActivePage(int page_index); | 67 void SetActivePage(int page_index); |
| 67 | 68 |
| 68 // The index of the currently active launcher page. | 69 // The index of the currently active launcher page. |
| 69 int active_page_index() const { return active_page_; } | 70 int active_page_index() const { return active_page_; } |
| 70 | 71 |
| 71 // True if |named_page| is the current active laucher page. | 72 // True if |named_page| is the current active laucher page. |
| 72 bool IsNamedPageActive(NamedPage named_page) const; | 73 bool IsNamedPageActive(NamedPage named_page) const; |
| 73 | 74 |
| 74 // Gets the index of a launcher page in |view_model_|, by NamedPage. | 75 // Gets the index of a launcher page in |view_model_|, by NamedPage. |
| 75 int GetPageIndexForNamedPage(NamedPage named_page) const; | 76 int GetPageIndexForNamedPage(NamedPage named_page) const; |
| 76 | 77 |
| 77 void Prerender(); | 78 void Prerender(); |
| 78 | 79 |
| 79 AppsContainerView* apps_container_view() { return apps_container_view_; } | 80 AppsContainerView* apps_container_view() { return apps_container_view_; } |
| 80 StartPageView* start_page_view() { return start_page_view_; } | 81 StartPageView* start_page_view() { return start_page_view_; } |
| 82 SearchResultListView* search_results_view() { return search_results_view_; } |
| 81 | 83 |
| 82 // Overridden from views::View: | 84 // Overridden from views::View: |
| 83 virtual gfx::Size GetPreferredSize() const OVERRIDE; | 85 virtual gfx::Size GetPreferredSize() const OVERRIDE; |
| 84 virtual void Layout() OVERRIDE; | 86 virtual void Layout() OVERRIDE; |
| 85 virtual bool OnKeyPressed(const ui::KeyEvent& event) OVERRIDE; | 87 virtual bool OnKeyPressed(const ui::KeyEvent& event) OVERRIDE; |
| 86 virtual bool OnMouseWheel(const ui::MouseWheelEvent& event) OVERRIDE; | 88 virtual bool OnMouseWheel(const ui::MouseWheelEvent& event) OVERRIDE; |
| 87 | 89 |
| 88 private: | 90 private: |
| 89 // Invoked when active view is changed. | 91 // Invoked when active view is changed. |
| 90 void ActivePageChanged(); | 92 void ActivePageChanged(); |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 123 // Maps NamedPage onto |view_model_| indices. | 125 // Maps NamedPage onto |view_model_| indices. |
| 124 std::map<NamedPage, int> named_page_to_view_; | 126 std::map<NamedPage, int> named_page_to_view_; |
| 125 scoped_ptr<views::BoundsAnimator> bounds_animator_; | 127 scoped_ptr<views::BoundsAnimator> bounds_animator_; |
| 126 | 128 |
| 127 DISALLOW_COPY_AND_ASSIGN(ContentsView); | 129 DISALLOW_COPY_AND_ASSIGN(ContentsView); |
| 128 }; | 130 }; |
| 129 | 131 |
| 130 } // namespace app_list | 132 } // namespace app_list |
| 131 | 133 |
| 132 #endif // UI_APP_LIST_VIEWS_CONTENTS_VIEW_H_ | 134 #endif // UI_APP_LIST_VIEWS_CONTENTS_VIEW_H_ |
| OLD | NEW |