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 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
58 void InitNamedPages(AppListModel* model, AppListViewDelegate* view_delegate); | 58 void InitNamedPages(AppListModel* model, AppListViewDelegate* view_delegate); |
59 | 59 |
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 set_contents_switcher_view( | 68 void set_contents_switcher_view(ContentsSwitcherView* contents_switcher_view); |
calamity
2014/07/10 03:59:36
This should change to SetContentsSwitcherView now.
kcarattini
2014/07/10 06:07:46
Done.
| |
69 ContentsSwitcherView* contents_switcher_view) { | |
70 contents_switcher_view_ = contents_switcher_view; | |
71 } | |
72 | 69 |
73 void ShowSearchResults(bool show); | 70 void ShowSearchResults(bool show); |
74 void ShowFolderContent(AppListFolderItem* folder); | 71 void ShowFolderContent(AppListFolderItem* folder); |
75 bool IsShowingSearchResults() const; | 72 bool IsShowingSearchResults() const; |
76 | 73 |
77 // Sets the active launcher page and animates the pages into place. | 74 // Sets the active launcher page and animates the pages into place. |
78 void SetActivePage(int page_index); | 75 void SetActivePage(int page_index); |
79 | 76 |
80 // The index of the currently active launcher page. | 77 // The index of the currently active launcher page. |
81 int GetActivePageIndex() const; | 78 int GetActivePageIndex() const; |
(...skipping 21 matching lines...) Expand all Loading... | |
103 virtual void Layout() OVERRIDE; | 100 virtual void Layout() OVERRIDE; |
104 virtual bool OnKeyPressed(const ui::KeyEvent& event) OVERRIDE; | 101 virtual bool OnKeyPressed(const ui::KeyEvent& event) OVERRIDE; |
105 virtual bool OnMouseWheel(const ui::MouseWheelEvent& event) OVERRIDE; | 102 virtual bool OnMouseWheel(const ui::MouseWheelEvent& event) OVERRIDE; |
106 | 103 |
107 // Overridden from PaginationModelObserver: | 104 // Overridden from PaginationModelObserver: |
108 virtual void TotalPagesChanged() OVERRIDE; | 105 virtual void TotalPagesChanged() OVERRIDE; |
109 virtual void SelectedPageChanged(int old_selected, int new_selected) OVERRIDE; | 106 virtual void SelectedPageChanged(int old_selected, int new_selected) OVERRIDE; |
110 virtual void TransitionStarted() OVERRIDE; | 107 virtual void TransitionStarted() OVERRIDE; |
111 virtual void TransitionChanged() OVERRIDE; | 108 virtual void TransitionChanged() OVERRIDE; |
112 | 109 |
110 // Returns the pagination model for thei ContentsView. | |
calamity
2014/07/10 03:59:36
s/thei/the/
kcarattini
2014/07/10 06:07:46
Done.
| |
111 const PaginationModel& pagination_model() { return pagination_model_; } | |
112 | |
113 private: | 113 private: |
114 // Sets the active launcher page, accounting for whether the change is for | 114 // Sets the active launcher page, accounting for whether the change is for |
115 // search results. | 115 // search results. |
116 void SetActivePageInternal(int page_index, bool show_search_results); | 116 void SetActivePageInternal(int page_index, bool show_search_results); |
117 | 117 |
118 // Invoked when active view is changed. | 118 // Invoked when active view is changed. |
119 void ActivePageChanged(bool show_search_results); | 119 void ActivePageChanged(bool show_search_results); |
120 | 120 |
121 // Calculates and sets the bounds for the subviews. If there is currently an | 121 // Calculates and sets the bounds for the subviews. If there is currently an |
122 // animation, this positions the views as appropriate for the current frame. | 122 // animation, this positions the views as appropriate for the current frame. |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
158 | 158 |
159 // Manages the pagination for the launcher pages. | 159 // Manages the pagination for the launcher pages. |
160 PaginationModel pagination_model_; | 160 PaginationModel pagination_model_; |
161 | 161 |
162 DISALLOW_COPY_AND_ASSIGN(ContentsView); | 162 DISALLOW_COPY_AND_ASSIGN(ContentsView); |
163 }; | 163 }; |
164 | 164 |
165 } // namespace app_list | 165 } // namespace app_list |
166 | 166 |
167 #endif // UI_APP_LIST_VIEWS_CONTENTS_VIEW_H_ | 167 #endif // UI_APP_LIST_VIEWS_CONTENTS_VIEW_H_ |
OLD | NEW |