| 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 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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 45 virtual ~ExtensionAppModelBuilder(); | 45 virtual ~ExtensionAppModelBuilder(); |
| 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 | 49 |
| 50 // Initialize to use extension sync and sets |service_| to NULL. Used in | 50 // Initialize to use extension sync and sets |service_| to NULL. Used in |
| 51 // tests and when AppList sync is not enabled. | 51 // tests and when AppList sync is not enabled. |
| 52 void InitializeWithProfile(Profile* profile, app_list::AppListModel* model); | 52 void InitializeWithProfile(Profile* profile, app_list::AppListModel* model); |
| 53 | 53 |
| 54 private: | 54 private: |
| 55 using extensions::InstallObserver::OnExtensionUninstalled; | |
| 56 typedef std::vector<ExtensionAppItem*> ExtensionAppList; | 55 typedef std::vector<ExtensionAppItem*> ExtensionAppList; |
| 57 | 56 |
| 58 // Builds the model with the current profile. | 57 // Builds the model with the current profile. |
| 59 void BuildModel(); | 58 void BuildModel(); |
| 60 | 59 |
| 61 // extensions::InstallObserver. | 60 // extensions::InstallObserver. |
| 62 virtual void OnBeginExtensionInstall( | 61 virtual void OnBeginExtensionInstall( |
| 63 const ExtensionInstallParams& params) OVERRIDE; | 62 const ExtensionInstallParams& params) OVERRIDE; |
| 64 virtual void OnDownloadProgress(const std::string& extension_id, | 63 virtual void OnDownloadProgress(const std::string& extension_id, |
| 65 int percent_downloaded) OVERRIDE; | 64 int percent_downloaded) OVERRIDE; |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 146 // We listen to this to show app installing progress. | 145 // We listen to this to show app installing progress. |
| 147 extensions::InstallTracker* tracker_; | 146 extensions::InstallTracker* tracker_; |
| 148 | 147 |
| 149 // Listen extension's load, unload, uninstalled. | 148 // Listen extension's load, unload, uninstalled. |
| 150 extensions::ExtensionRegistry* extension_registry_; | 149 extensions::ExtensionRegistry* extension_registry_; |
| 151 | 150 |
| 152 DISALLOW_COPY_AND_ASSIGN(ExtensionAppModelBuilder); | 151 DISALLOW_COPY_AND_ASSIGN(ExtensionAppModelBuilder); |
| 153 }; | 152 }; |
| 154 | 153 |
| 155 #endif // CHROME_BROWSER_UI_APP_LIST_EXTENSION_APP_MODEL_BUILDER_H_ | 154 #endif // CHROME_BROWSER_UI_APP_LIST_EXTENSION_APP_MODEL_BUILDER_H_ |
| OLD | NEW |