Chromium Code Reviews| Index: chrome/browser/extensions/extension_toolbar_model.h |
| diff --git a/chrome/browser/extensions/extension_toolbar_model.h b/chrome/browser/extensions/extension_toolbar_model.h |
| index 1c3aa8fcedb7f13e11a17c19709912101c73fa8b..973e3e1be82e1432ac297e38bd30b10d6ffa9432 100644 |
| --- a/chrome/browser/extensions/extension_toolbar_model.h |
| +++ b/chrome/browser/extensions/extension_toolbar_model.h |
| @@ -92,6 +92,12 @@ class ExtensionToolbarModel : public content::NotificationObserver { |
| int IncognitoIndexToOriginal(int incognito_index); |
| int OriginalIndexToIncognito(int original_index); |
| + size_t action_box_extensions_size() { |
| + return action_box_menu_items_.size(); |
| + } |
| + |
| + const extensions::Extension* GetActionBoxExtensionByIndex(int index) const; |
|
Aaron Boodman
2012/06/12 05:53:44
Why not just expose the ExtensionList directly? Co
yefimt
2012/06/13 01:24:21
I'm a bit uncomfortable to do it.
I don't want to
|
| + |
| private: |
| // content::NotificationObserver implementation. |
| virtual void Observe(int type, |
| @@ -101,7 +107,9 @@ class ExtensionToolbarModel : public content::NotificationObserver { |
| // To be called after the extension service is ready; gets loaded extensions |
| // from the extension service and their saved order from the pref service |
| // and constructs |toolitems_| from these data. |
| - void InitializeExtensionList(); |
| + void InitializeExtensionLists(); |
| + void InitializeExtensionList(const std::vector<std::string>& pref_order, |
| + extensions::ExtensionList* extension_list, bool bar); |
| // Save the model to prefs. |
| void UpdatePrefs(); |
| @@ -123,6 +131,9 @@ class ExtensionToolbarModel : public content::NotificationObserver { |
| // Ordered list of browser action buttons. |
| extensions::ExtensionList toolitems_; |
| + // List of browser action buttons visible in an action box menu. |
| + extensions::ExtensionList action_box_menu_items_; |
| + |
| // Keeps track of what the last extension to get disabled was. |
| std::string last_extension_removed_; |