| 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_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 22 matching lines...) Expand all Loading... |
| 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. | 38 // Called when an extension starts installing. |
| 39 void OnBeginExtensionInstall(const std::string& extension_id, | 39 void OnBeginExtensionInstall(const std::string& extension_id, |
| 40 const std::string& extension_name, | 40 const std::string& extension_name, |
| 41 const gfx::ImageSkia& installing_icon); | 41 const gfx::ImageSkia& installing_icon); |
| 42 | 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 |
| 43 private: | 47 private: |
| 44 typedef std::vector<ExtensionAppItem*> Apps; | 48 typedef std::vector<ExtensionAppItem*> Apps; |
| 45 | 49 |
| 46 // Adds apps in |extensions| to |apps|. | 50 // Adds apps in |extensions| to |apps|. |
| 47 void AddApps(const ExtensionSet* extensions, Apps* apps); | 51 void AddApps(const ExtensionSet* extensions, Apps* apps); |
| 48 | 52 |
| 49 // Populates the model with apps. | 53 // Populates the model with apps. |
| 50 void PopulateApps(); | 54 void PopulateApps(); |
| 51 | 55 |
| 52 // Re-sort apps in case app ordinal prefs are changed. | 56 // Re-sort apps in case app ordinal prefs are changed. |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 89 // True to ignore |model_| changes. | 93 // True to ignore |model_| changes. |
| 90 bool ignore_changes_; | 94 bool ignore_changes_; |
| 91 | 95 |
| 92 content::NotificationRegistrar registrar_; | 96 content::NotificationRegistrar registrar_; |
| 93 PrefChangeRegistrar pref_change_registrar_; | 97 PrefChangeRegistrar pref_change_registrar_; |
| 94 | 98 |
| 95 DISALLOW_COPY_AND_ASSIGN(AppsModelBuilder); | 99 DISALLOW_COPY_AND_ASSIGN(AppsModelBuilder); |
| 96 }; | 100 }; |
| 97 | 101 |
| 98 #endif // CHROME_BROWSER_UI_APP_LIST_APPS_MODEL_BUILDER_H_ | 102 #endif // CHROME_BROWSER_UI_APP_LIST_APPS_MODEL_BUILDER_H_ |
| OLD | NEW |