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 } | |
Matt Giuca
2015/02/20 05:49:26
nit: Blank line.
calamity
2015/02/20 06:57:43
Done.
| |
141 const std::string& custom_launcher_page_name() const { | |
142 return custom_launcher_page_name_; | |
143 } | |
144 | |
138 // Pushes a custom launcher page's subpage into the state stack in the model. | 145 // Pushes a custom launcher page's subpage into the state stack in the model. |
139 void PushCustomLauncherPageSubpage(); | 146 void PushCustomLauncherPageSubpage(); |
140 | 147 |
141 // If the state stack is not empty, pops a subpage from the stack and returns | 148 // If the state stack is not empty, pops a subpage from the stack and returns |
142 // true. Returns false if the stack was empty. | 149 // true. Returns false if the stack was empty. |
143 bool PopCustomLauncherPageSubpage(); | 150 bool PopCustomLauncherPageSubpage(); |
144 | 151 |
145 // Clears the custom launcher page's subpage state stack from the model. | 152 // Clears the custom launcher page's subpage state stack from the model. |
146 void ClearCustomLauncherPageSubpages(); | 153 void ClearCustomLauncherPageSubpages(); |
147 | 154 |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
201 scoped_ptr<AppListItemList> top_level_item_list_; | 208 scoped_ptr<AppListItemList> top_level_item_list_; |
202 | 209 |
203 scoped_ptr<SearchBoxModel> search_box_; | 210 scoped_ptr<SearchBoxModel> search_box_; |
204 scoped_ptr<SearchResults> results_; | 211 scoped_ptr<SearchResults> results_; |
205 | 212 |
206 Status status_; | 213 Status status_; |
207 State state_; | 214 State state_; |
208 ObserverList<AppListModelObserver, true> observers_; | 215 ObserverList<AppListModelObserver, true> observers_; |
209 bool folders_enabled_; | 216 bool folders_enabled_; |
210 bool custom_launcher_page_enabled_; | 217 bool custom_launcher_page_enabled_; |
218 std::string custom_launcher_page_name_; | |
211 bool search_engine_is_google_; | 219 bool search_engine_is_google_; |
212 | 220 |
213 // The current number of subpages the custom launcher page has pushed. | 221 // The current number of subpages the custom launcher page has pushed. |
214 int custom_launcher_page_subpage_depth_; | 222 int custom_launcher_page_subpage_depth_; |
215 | 223 |
216 DISALLOW_COPY_AND_ASSIGN(AppListModel); | 224 DISALLOW_COPY_AND_ASSIGN(AppListModel); |
217 }; | 225 }; |
218 | 226 |
219 } // namespace app_list | 227 } // namespace app_list |
220 | 228 |
221 #endif // UI_APP_LIST_APP_LIST_MODEL_H_ | 229 #endif // UI_APP_LIST_APP_LIST_MODEL_H_ |
OLD | NEW |