Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(104)

Side by Side Diff: ui/app_list/app_list_model.h

Issue 1003393002: After uninstall, remove last item in Launcher folder (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Another round of revisions Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 118
119 // Sets the name and short name of |item| and notifies observers. 119 // Sets the name and short name of |item| and notifies observers.
120 void SetItemNameAndShortName(AppListItem* item, 120 void SetItemNameAndShortName(AppListItem* item,
121 const std::string& name, 121 const std::string& name,
122 const std::string& short_name); 122 const std::string& short_name);
123 123
124 // Deletes the item matching |id| from |top_level_item_list_| or from the 124 // Deletes the item matching |id| from |top_level_item_list_| or from the
125 // appropriate folder. 125 // appropriate folder.
126 void DeleteItem(const std::string& id); 126 void DeleteItem(const std::string& id);
127 127
128 // Wrapper around DeleteItem() which will also clean up if its parent folder
129 // has a single child left.
130 void DeleteUninstalledItem(const std::string& id);
131
128 // Call OnExtensionPreferenceChanged() for all items in the model. 132 // Call OnExtensionPreferenceChanged() for all items in the model.
129 void NotifyExtensionPreferenceChanged(); 133 void NotifyExtensionPreferenceChanged();
130 134
131 // Sets whether or not the folder UI should be enabled. If |folders_enabled| 135 // Sets whether or not the folder UI should be enabled. If |folders_enabled|
132 // is false, removes any non-OEM folders. 136 // is false, removes any non-OEM folders.
133 void SetFoldersEnabled(bool folders_enabled); 137 void SetFoldersEnabled(bool folders_enabled);
134 138
135 // Sets whether or not the custom launcher page should be enabled. 139 // Sets whether or not the custom launcher page should be enabled.
136 void SetCustomLauncherPageEnabled(bool enabled); 140 void SetCustomLauncherPageEnabled(bool enabled);
137 bool custom_launcher_page_enabled() const { 141 bool custom_launcher_page_enabled() const {
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
224 228
225 // The current number of subpages the custom launcher page has pushed. 229 // The current number of subpages the custom launcher page has pushed.
226 int custom_launcher_page_subpage_depth_; 230 int custom_launcher_page_subpage_depth_;
227 231
228 DISALLOW_COPY_AND_ASSIGN(AppListModel); 232 DISALLOW_COPY_AND_ASSIGN(AppListModel);
229 }; 233 };
230 234
231 } // namespace app_list 235 } // namespace app_list
232 236
233 #endif // UI_APP_LIST_APP_LIST_MODEL_H_ 237 #endif // UI_APP_LIST_APP_LIST_MODEL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698