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