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

Side by Side Diff: chrome/browser/ui/app_list/apps_model_builder.h

Issue 12298015: Change NotifyAppList*() functions into observers on a ProfileKeyedService. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 10 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 | Annotate | Revision Log
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 CHROME_BROWSER_UI_APP_LIST_APPS_MODEL_BUILDER_H_ 5 #ifndef CHROME_BROWSER_UI_APP_LIST_APPS_MODEL_BUILDER_H_
6 #define CHROME_BROWSER_UI_APP_LIST_APPS_MODEL_BUILDER_H_ 6 #define CHROME_BROWSER_UI_APP_LIST_APPS_MODEL_BUILDER_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 17 matching lines...) Expand all
28 public ui::ListModelObserver { 28 public ui::ListModelObserver {
29 public: 29 public:
30 AppsModelBuilder(Profile* profile, 30 AppsModelBuilder(Profile* profile,
31 app_list::AppListModel::Apps* model, 31 app_list::AppListModel::Apps* model,
32 AppListControllerDelegate* controller); 32 AppListControllerDelegate* controller);
33 virtual ~AppsModelBuilder(); 33 virtual ~AppsModelBuilder();
34 34
35 // Populates the model. 35 // Populates the model.
36 void Build(); 36 void Build();
37 37
38 // Called when an extension starts installing.
39 void OnBeginExtensionInstall(const std::string& extension_id,
40 const std::string& extension_name,
41 const gfx::ImageSkia& installing_icon);
42
43 // Called when progress is made on an extension's download.
44 void OnDownloadProgress(const std::string& extension_id,
45 int percent_downloaded);
46
47 // Called when an extension fails to install.
48 void OnInstallFailure(const std::string& extension_id);
49
50 private: 38 private:
51 typedef std::vector<ExtensionAppItem*> Apps; 39 typedef std::vector<ExtensionAppItem*> Apps;
52 40
53 // Adds apps in |extensions| to |apps|. 41 // Adds apps in |extensions| to |apps|.
54 void AddApps(const ExtensionSet* extensions, Apps* apps); 42 void AddApps(const ExtensionSet* extensions, Apps* apps);
55 43
56 // Populates the model with apps. 44 // Populates the model with apps.
57 void PopulateApps(); 45 void PopulateApps();
58 46
59 // Re-sort apps in case app ordinal prefs are changed. 47 // Re-sort apps in case app ordinal prefs are changed.
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 // True to ignore |model_| changes. 84 // True to ignore |model_| changes.
97 bool ignore_changes_; 85 bool ignore_changes_;
98 86
99 content::NotificationRegistrar registrar_; 87 content::NotificationRegistrar registrar_;
100 PrefChangeRegistrar pref_change_registrar_; 88 PrefChangeRegistrar pref_change_registrar_;
101 89
102 DISALLOW_COPY_AND_ASSIGN(AppsModelBuilder); 90 DISALLOW_COPY_AND_ASSIGN(AppsModelBuilder);
103 }; 91 };
104 92
105 #endif // CHROME_BROWSER_UI_APP_LIST_APPS_MODEL_BUILDER_H_ 93 #endif // CHROME_BROWSER_UI_APP_LIST_APPS_MODEL_BUILDER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698