OLD | NEW |
1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 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 <stddef.h> | 8 #include <stddef.h> |
9 | 9 |
10 #include <string> | 10 #include <string> |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
65 void OnExtensionUninstalled(content::BrowserContext* browser_context, | 65 void OnExtensionUninstalled(content::BrowserContext* browser_context, |
66 const extensions::Extension* extension, | 66 const extensions::Extension* extension, |
67 extensions::UninstallReason reason) override; | 67 extensions::UninstallReason reason) override; |
68 void OnShutdown(extensions::ExtensionRegistry* registry) override; | 68 void OnShutdown(extensions::ExtensionRegistry* registry) override; |
69 | 69 |
70 // AppListItemListObserver. | 70 // AppListItemListObserver. |
71 void OnListItemMoved(size_t from_index, | 71 void OnListItemMoved(size_t from_index, |
72 size_t to_index, | 72 size_t to_index, |
73 app_list::AppListItem* item) override; | 73 app_list::AppListItem* item) override; |
74 | 74 |
75 scoped_ptr<ExtensionAppItem> CreateAppItem( | 75 std::unique_ptr<ExtensionAppItem> CreateAppItem( |
76 const std::string& extension_id, | 76 const std::string& extension_id, |
77 const std::string& extension_name, | 77 const std::string& extension_name, |
78 const gfx::ImageSkia& installing_icon, | 78 const gfx::ImageSkia& installing_icon, |
79 bool is_platform_app); | 79 bool is_platform_app); |
80 | 80 |
81 // Populates the model with apps. | 81 // Populates the model with apps. |
82 void PopulateApps(); | 82 void PopulateApps(); |
83 | 83 |
84 // Returns app instance matching |extension_id| or NULL. | 84 // Returns app instance matching |extension_id| or NULL. |
85 ExtensionAppItem* GetExtensionAppItem(const std::string& extension_id); | 85 ExtensionAppItem* GetExtensionAppItem(const std::string& extension_id); |
(...skipping 19 matching lines...) Expand all Loading... |
105 // We listen to this to show app installing progress. | 105 // We listen to this to show app installing progress. |
106 extensions::InstallTracker* tracker_ = nullptr; | 106 extensions::InstallTracker* tracker_ = nullptr; |
107 | 107 |
108 // Listen extension's load, unload, uninstalled. | 108 // Listen extension's load, unload, uninstalled. |
109 extensions::ExtensionRegistry* extension_registry_ = nullptr; | 109 extensions::ExtensionRegistry* extension_registry_ = nullptr; |
110 | 110 |
111 DISALLOW_COPY_AND_ASSIGN(ExtensionAppModelBuilder); | 111 DISALLOW_COPY_AND_ASSIGN(ExtensionAppModelBuilder); |
112 }; | 112 }; |
113 | 113 |
114 #endif // CHROME_BROWSER_UI_APP_LIST_EXTENSION_APP_MODEL_BUILDER_H_ | 114 #endif // CHROME_BROWSER_UI_APP_LIST_EXTENSION_APP_MODEL_BUILDER_H_ |
OLD | NEW |