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 "chrome/common/extensions/extension.h" | 10 #include "chrome/common/extensions/extension.h" |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
94 | 94 |
95 // To be called after the extension service is ready; gets loaded extensions | 95 // To be called after the extension service is ready; gets loaded extensions |
96 // from the extension service and their saved order from the pref service | 96 // from the extension service and their saved order from the pref service |
97 // and constructs |toolbar_items_| and |action_box_items_| from these data. | 97 // and constructs |toolbar_items_| and |action_box_items_| from these data. |
98 void InitializeExtensionLists(); | 98 void InitializeExtensionLists(); |
99 void PopulateForActionBoxMode(); | 99 void PopulateForActionBoxMode(); |
100 void PopulateForNonActionBoxMode(); | 100 void PopulateForNonActionBoxMode(); |
101 | 101 |
102 // Fills |list| with extensions based on provided |order|. | 102 // Fills |list| with extensions based on provided |order|. |
103 void FillExtensionList( | 103 void FillExtensionList( |
104 const extensions::ExtensionPrefs::ExtensionIdSet& order, | 104 const extensions::ExtensionPrefs::ExtensionIds& order, |
105 extensions::ExtensionList* list); | 105 extensions::ExtensionList* list); |
106 | 106 |
107 // Save the model to prefs. | 107 // Save the model to prefs. |
108 void UpdatePrefs(); | 108 void UpdatePrefs(); |
109 | 109 |
110 // Our observers. | 110 // Our observers. |
111 ObserverList<Observer> observers_; | 111 ObserverList<Observer> observers_; |
112 | 112 |
113 void AddExtension(const extensions::Extension* extension, | 113 void AddExtension(const extensions::Extension* extension, |
114 extensions::ExtensionList* list); | 114 extensions::ExtensionList* list); |
(...skipping 29 matching lines...) Expand all Loading... |
144 // The number of icons visible (the rest should be hidden in the overflow | 144 // The number of icons visible (the rest should be hidden in the overflow |
145 // chevron). | 145 // chevron). |
146 int visible_icon_count_; | 146 int visible_icon_count_; |
147 | 147 |
148 content::NotificationRegistrar registrar_; | 148 content::NotificationRegistrar registrar_; |
149 | 149 |
150 DISALLOW_COPY_AND_ASSIGN(ExtensionToolbarModel); | 150 DISALLOW_COPY_AND_ASSIGN(ExtensionToolbarModel); |
151 }; | 151 }; |
152 | 152 |
153 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_TOOLBAR_MODEL_H_ | 153 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_TOOLBAR_MODEL_H_ |
OLD | NEW |