| 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_TOOLBAR_TOOLBAR_ACTIONS_MODEL_H_ | 5 #ifndef CHROME_BROWSER_UI_TOOLBAR_TOOLBAR_ACTIONS_MODEL_H_ |
| 6 #define CHROME_BROWSER_UI_TOOLBAR_TOOLBAR_ACTIONS_MODEL_H_ | 6 #define CHROME_BROWSER_UI_TOOLBAR_TOOLBAR_ACTIONS_MODEL_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 | 9 |
| 10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
| (...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 266 void AddItem(const ToolbarItem& item); | 266 void AddItem(const ToolbarItem& item); |
| 267 | 267 |
| 268 // Removes |item| from the toolbar. If the toolbar is in highlighting mode, | 268 // Removes |item| from the toolbar. If the toolbar is in highlighting mode, |
| 269 // the item is also removed from the highlighted list (if present). | 269 // the item is also removed from the highlighted list (if present). |
| 270 void RemoveItem(const ToolbarItem& item); | 270 void RemoveItem(const ToolbarItem& item); |
| 271 | 271 |
| 272 // Looks up and returns the extension with the given |id| in the set of | 272 // Looks up and returns the extension with the given |id| in the set of |
| 273 // enabled extensions. | 273 // enabled extensions. |
| 274 const extensions::Extension* GetExtensionById(const std::string& id) const; | 274 const extensions::Extension* GetExtensionById(const std::string& id) const; |
| 275 | 275 |
| 276 // Returns true if the action is visible on the toolbar. |
| 277 bool IsActionVisible(const std::string& action_id) const; |
| 278 |
| 276 // Our observers. | 279 // Our observers. |
| 277 base::ObserverList<Observer> observers_; | 280 base::ObserverList<Observer> observers_; |
| 278 | 281 |
| 279 // The Profile this toolbar model is for. | 282 // The Profile this toolbar model is for. |
| 280 Profile* profile_; | 283 Profile* profile_; |
| 281 | 284 |
| 282 extensions::ExtensionPrefs* extension_prefs_; | 285 extensions::ExtensionPrefs* extension_prefs_; |
| 283 PrefService* prefs_; | 286 PrefService* prefs_; |
| 284 | 287 |
| 285 // The ExtensionActionAPI object, cached for convenience. | 288 // The ExtensionActionAPI object, cached for convenience. |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 338 // For observing change of toolbar order preference by external entity (sync). | 341 // For observing change of toolbar order preference by external entity (sync). |
| 339 PrefChangeRegistrar pref_change_registrar_; | 342 PrefChangeRegistrar pref_change_registrar_; |
| 340 base::Closure pref_change_callback_; | 343 base::Closure pref_change_callback_; |
| 341 | 344 |
| 342 base::WeakPtrFactory<ToolbarActionsModel> weak_ptr_factory_; | 345 base::WeakPtrFactory<ToolbarActionsModel> weak_ptr_factory_; |
| 343 | 346 |
| 344 DISALLOW_COPY_AND_ASSIGN(ToolbarActionsModel); | 347 DISALLOW_COPY_AND_ASSIGN(ToolbarActionsModel); |
| 345 }; | 348 }; |
| 346 | 349 |
| 347 #endif // CHROME_BROWSER_UI_TOOLBAR_TOOLBAR_ACTIONS_MODEL_H_ | 350 #endif // CHROME_BROWSER_UI_TOOLBAR_TOOLBAR_ACTIONS_MODEL_H_ |
| OLD | NEW |