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

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

Issue 981893002: Lazily build the app list model. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@fix_set_enabled
Patch Set: revert ALSL 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 CHROME_BROWSER_UI_APP_LIST_EXTENSION_APP_MODEL_BUILDER_H_ 5 #ifndef CHROME_BROWSER_UI_APP_LIST_EXTENSION_APP_MODEL_BUILDER_H_
6 #define CHROME_BROWSER_UI_APP_LIST_EXTENSION_APP_MODEL_BUILDER_H_ 6 #define CHROME_BROWSER_UI_APP_LIST_EXTENSION_APP_MODEL_BUILDER_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 27 matching lines...) Expand all
38 // This class populates and maintains the given |model| with information from 38 // This class populates and maintains the given |model| with information from
39 // |profile|. 39 // |profile|.
40 class ExtensionAppModelBuilder : public extensions::InstallObserver, 40 class ExtensionAppModelBuilder : public extensions::InstallObserver,
41 public extensions::ExtensionRegistryObserver, 41 public extensions::ExtensionRegistryObserver,
42 public app_list::AppListItemListObserver { 42 public app_list::AppListItemListObserver {
43 public: 43 public:
44 explicit ExtensionAppModelBuilder(AppListControllerDelegate* controller); 44 explicit ExtensionAppModelBuilder(AppListControllerDelegate* controller);
45 ~ExtensionAppModelBuilder() override; 45 ~ExtensionAppModelBuilder() override;
46 46
47 // Initialize to use app-list sync and sets |service_| to |service|. 47 // Initialize to use app-list sync and sets |service_| to |service|.
48 void InitializeWithService(app_list::AppListSyncableService* service); 48 void InitializeWithService(app_list::AppListSyncableService* service,
49 app_list::AppListModel* model);
49 50
50 // Initialize to use extension sync and sets |service_| to NULL. Used in 51 // Initialize to use extension sync and sets |service_| to NULL. Used in
51 // tests and when AppList sync is not enabled. 52 // tests and when AppList sync is not enabled.
52 void InitializeWithProfile(Profile* profile, app_list::AppListModel* model); 53 void InitializeWithProfile(Profile* profile, app_list::AppListModel* model);
53 54
54 private: 55 private:
55 typedef std::vector<ExtensionAppItem*> ExtensionAppList; 56 typedef std::vector<ExtensionAppItem*> ExtensionAppList;
56 57
57 // Builds the model with the current profile. 58 // Builds the model with the current profile.
58 void BuildModel(); 59 void BuildModel();
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 // We listen to this to show app installing progress. 130 // We listen to this to show app installing progress.
130 extensions::InstallTracker* tracker_; 131 extensions::InstallTracker* tracker_;
131 132
132 // Listen extension's load, unload, uninstalled. 133 // Listen extension's load, unload, uninstalled.
133 extensions::ExtensionRegistry* extension_registry_; 134 extensions::ExtensionRegistry* extension_registry_;
134 135
135 DISALLOW_COPY_AND_ASSIGN(ExtensionAppModelBuilder); 136 DISALLOW_COPY_AND_ASSIGN(ExtensionAppModelBuilder);
136 }; 137 };
137 138
138 #endif // CHROME_BROWSER_UI_APP_LIST_EXTENSION_APP_MODEL_BUILDER_H_ 139 #endif // CHROME_BROWSER_UI_APP_LIST_EXTENSION_APP_MODEL_BUILDER_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/app_list/app_list_view_delegate.cc ('k') | chrome/browser/ui/app_list/extension_app_model_builder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698