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_EXTENSIONS_EXTENSION_TOOLBAR_MODEL_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_TOOLBAR_MODEL_H_ |
6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_TOOLBAR_MODEL_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_TOOLBAR_MODEL_H_ |
7 | 7 |
8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
9 #include "base/observer_list.h" | 9 #include "base/observer_list.h" |
10 #include "base/prefs/pref_change_registrar.h" | 10 #include "base/prefs/pref_change_registrar.h" |
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
144 // Callback when extensions are ready. | 144 // Callback when extensions are ready. |
145 void OnReady(); | 145 void OnReady(); |
146 | 146 |
147 // ExtensionRegistryObserver implementation. | 147 // ExtensionRegistryObserver implementation. |
148 virtual void OnExtensionLoaded(content::BrowserContext* browser_context, | 148 virtual void OnExtensionLoaded(content::BrowserContext* browser_context, |
149 const Extension* extension) OVERRIDE; | 149 const Extension* extension) OVERRIDE; |
150 virtual void OnExtensionUnloaded( | 150 virtual void OnExtensionUnloaded( |
151 content::BrowserContext* browser_context, | 151 content::BrowserContext* browser_context, |
152 const Extension* extension, | 152 const Extension* extension, |
153 UnloadedExtensionInfo::Reason reason) OVERRIDE; | 153 UnloadedExtensionInfo::Reason reason) OVERRIDE; |
154 virtual void OnExtensionUninstalled(content::BrowserContext* browser_context, | 154 virtual void OnExtensionUninstalled( |
155 const Extension* extension) OVERRIDE; | 155 content::BrowserContext* browser_context, |
| 156 const Extension* extension, |
| 157 extensions::UninstallReason reason) OVERRIDE; |
156 | 158 |
157 // To be called after the extension service is ready; gets loaded extensions | 159 // To be called after the extension service is ready; gets loaded extensions |
158 // from the extension service and their saved order from the pref service | 160 // from the extension service and their saved order from the pref service |
159 // and constructs |toolbar_items_| from these data. | 161 // and constructs |toolbar_items_| from these data. |
160 void InitializeExtensionList(const ExtensionSet& extensions); | 162 void InitializeExtensionList(const ExtensionSet& extensions); |
161 void Populate(const ExtensionIdList& positions, | 163 void Populate(const ExtensionIdList& positions, |
162 const ExtensionSet& extensions); | 164 const ExtensionSet& extensions); |
163 | 165 |
164 // Save the model to prefs. | 166 // Save the model to prefs. |
165 void UpdatePrefs(); | 167 void UpdatePrefs(); |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
215 base::Closure pref_change_callback_; | 217 base::Closure pref_change_callback_; |
216 | 218 |
217 base::WeakPtrFactory<ExtensionToolbarModel> weak_ptr_factory_; | 219 base::WeakPtrFactory<ExtensionToolbarModel> weak_ptr_factory_; |
218 | 220 |
219 DISALLOW_COPY_AND_ASSIGN(ExtensionToolbarModel); | 221 DISALLOW_COPY_AND_ASSIGN(ExtensionToolbarModel); |
220 }; | 222 }; |
221 | 223 |
222 } // namespace extensions | 224 } // namespace extensions |
223 | 225 |
224 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_TOOLBAR_MODEL_H_ | 226 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_TOOLBAR_MODEL_H_ |
OLD | NEW |