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_APP_LIST_MODEL_H_ | 5 #ifndef UI_APP_LIST_APP_LIST_MODEL_H_ |
6 #define UI_APP_LIST_APP_LIST_MODEL_H_ | 6 #define UI_APP_LIST_APP_LIST_MODEL_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
128 // Sets whether or not the folder UI should be enabled. If |folders_enabled| | 128 // Sets whether or not the folder UI should be enabled. If |folders_enabled| |
129 // is false, removes any non-OEM folders. | 129 // is false, removes any non-OEM folders. |
130 void SetFoldersEnabled(bool folders_enabled); | 130 void SetFoldersEnabled(bool folders_enabled); |
131 | 131 |
132 // Sets whether or not the custom launcher page should be enabled. | 132 // Sets whether or not the custom launcher page should be enabled. |
133 void SetCustomLauncherPageEnabled(bool enabled); | 133 void SetCustomLauncherPageEnabled(bool enabled); |
134 bool custom_launcher_page_enabled() const { | 134 bool custom_launcher_page_enabled() const { |
135 return custom_launcher_page_enabled_; | 135 return custom_launcher_page_enabled_; |
136 } | 136 } |
137 | 137 |
| 138 void set_custom_launcher_page_name(const std::string& name) { |
| 139 custom_launcher_page_name_ = name; |
| 140 } |
| 141 |
| 142 const std::string& custom_launcher_page_name() const { |
| 143 return custom_launcher_page_name_; |
| 144 } |
| 145 |
138 // Pushes a custom launcher page's subpage into the state stack in the model. | 146 // Pushes a custom launcher page's subpage into the state stack in the model. |
139 void PushCustomLauncherPageSubpage(); | 147 void PushCustomLauncherPageSubpage(); |
140 | 148 |
141 // If the state stack is not empty, pops a subpage from the stack and returns | 149 // If the state stack is not empty, pops a subpage from the stack and returns |
142 // true. Returns false if the stack was empty. | 150 // true. Returns false if the stack was empty. |
143 bool PopCustomLauncherPageSubpage(); | 151 bool PopCustomLauncherPageSubpage(); |
144 | 152 |
145 // Clears the custom launcher page's subpage state stack from the model. | 153 // Clears the custom launcher page's subpage state stack from the model. |
146 void ClearCustomLauncherPageSubpages(); | 154 void ClearCustomLauncherPageSubpages(); |
147 | 155 |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
201 scoped_ptr<AppListItemList> top_level_item_list_; | 209 scoped_ptr<AppListItemList> top_level_item_list_; |
202 | 210 |
203 scoped_ptr<SearchBoxModel> search_box_; | 211 scoped_ptr<SearchBoxModel> search_box_; |
204 scoped_ptr<SearchResults> results_; | 212 scoped_ptr<SearchResults> results_; |
205 | 213 |
206 Status status_; | 214 Status status_; |
207 State state_; | 215 State state_; |
208 ObserverList<AppListModelObserver, true> observers_; | 216 ObserverList<AppListModelObserver, true> observers_; |
209 bool folders_enabled_; | 217 bool folders_enabled_; |
210 bool custom_launcher_page_enabled_; | 218 bool custom_launcher_page_enabled_; |
| 219 std::string custom_launcher_page_name_; |
211 bool search_engine_is_google_; | 220 bool search_engine_is_google_; |
212 | 221 |
213 // The current number of subpages the custom launcher page has pushed. | 222 // The current number of subpages the custom launcher page has pushed. |
214 int custom_launcher_page_subpage_depth_; | 223 int custom_launcher_page_subpage_depth_; |
215 | 224 |
216 DISALLOW_COPY_AND_ASSIGN(AppListModel); | 225 DISALLOW_COPY_AND_ASSIGN(AppListModel); |
217 }; | 226 }; |
218 | 227 |
219 } // namespace app_list | 228 } // namespace app_list |
220 | 229 |
221 #endif // UI_APP_LIST_APP_LIST_MODEL_H_ | 230 #endif // UI_APP_LIST_APP_LIST_MODEL_H_ |
OLD | NEW |