| 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 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 149 } | 149 } |
| 150 bool all_icons_visible() const { | 150 bool all_icons_visible() const { |
| 151 return visible_icon_count() == toolbar_items().size(); | 151 return visible_icon_count() == toolbar_items().size(); |
| 152 } | 152 } |
| 153 | 153 |
| 154 bool actions_initialized() const { return actions_initialized_; } | 154 bool actions_initialized() const { return actions_initialized_; } |
| 155 | 155 |
| 156 ScopedVector<ToolbarActionViewController> CreateActions( | 156 ScopedVector<ToolbarActionViewController> CreateActions( |
| 157 Browser* browser, | 157 Browser* browser, |
| 158 ToolbarActionsBar* bar); | 158 ToolbarActionsBar* bar); |
| 159 scoped_ptr<ToolbarActionViewController> CreateActionForItem( | 159 std::unique_ptr<ToolbarActionViewController> CreateActionForItem( |
| 160 Browser* browser, | 160 Browser* browser, |
| 161 ToolbarActionsBar* bar, | 161 ToolbarActionsBar* bar, |
| 162 const ToolbarItem& item); | 162 const ToolbarItem& item); |
| 163 | 163 |
| 164 const std::vector<ToolbarItem>& toolbar_items() const { | 164 const std::vector<ToolbarItem>& toolbar_items() const { |
| 165 return is_highlighting() ? highlighted_items_ : toolbar_items_; | 165 return is_highlighting() ? highlighted_items_ : toolbar_items_; |
| 166 } | 166 } |
| 167 | 167 |
| 168 extensions::ComponentMigrationHelper* component_migration_helper() { | 168 extensions::ComponentMigrationHelper* component_migration_helper() { |
| 169 return component_migration_helper_.get(); | 169 return component_migration_helper_.get(); |
| (...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 278 // The ExtensionActionAPI object, cached for convenience. | 278 // The ExtensionActionAPI object, cached for convenience. |
| 279 extensions::ExtensionActionAPI* extension_action_api_; | 279 extensions::ExtensionActionAPI* extension_action_api_; |
| 280 | 280 |
| 281 // The ExtensionRegistry object, cached for convenience. | 281 // The ExtensionRegistry object, cached for convenience. |
| 282 extensions::ExtensionRegistry* extension_registry_; | 282 extensions::ExtensionRegistry* extension_registry_; |
| 283 | 283 |
| 284 // The ExtensionActionManager, cached for convenience. | 284 // The ExtensionActionManager, cached for convenience. |
| 285 extensions::ExtensionActionManager* extension_action_manager_; | 285 extensions::ExtensionActionManager* extension_action_manager_; |
| 286 | 286 |
| 287 // The ComponentMigrationHelper. | 287 // The ComponentMigrationHelper. |
| 288 scoped_ptr<extensions::ComponentMigrationHelper> component_migration_helper_; | 288 std::unique_ptr<extensions::ComponentMigrationHelper> |
| 289 component_migration_helper_; |
| 289 | 290 |
| 290 // True if we've handled the initial EXTENSIONS_READY notification. | 291 // True if we've handled the initial EXTENSIONS_READY notification. |
| 291 bool actions_initialized_; | 292 bool actions_initialized_; |
| 292 | 293 |
| 293 // If true, we include all actions in the toolbar model. | 294 // If true, we include all actions in the toolbar model. |
| 294 bool use_redesign_; | 295 bool use_redesign_; |
| 295 | 296 |
| 296 // Ordered list of browser actions. | 297 // Ordered list of browser actions. |
| 297 std::vector<ToolbarItem> toolbar_items_; | 298 std::vector<ToolbarItem> toolbar_items_; |
| 298 | 299 |
| (...skipping 27 matching lines...) Expand all Loading... |
| 326 // For observing change of toolbar order preference by external entity (sync). | 327 // For observing change of toolbar order preference by external entity (sync). |
| 327 PrefChangeRegistrar pref_change_registrar_; | 328 PrefChangeRegistrar pref_change_registrar_; |
| 328 base::Closure pref_change_callback_; | 329 base::Closure pref_change_callback_; |
| 329 | 330 |
| 330 base::WeakPtrFactory<ToolbarActionsModel> weak_ptr_factory_; | 331 base::WeakPtrFactory<ToolbarActionsModel> weak_ptr_factory_; |
| 331 | 332 |
| 332 DISALLOW_COPY_AND_ASSIGN(ToolbarActionsModel); | 333 DISALLOW_COPY_AND_ASSIGN(ToolbarActionsModel); |
| 333 }; | 334 }; |
| 334 | 335 |
| 335 #endif // CHROME_BROWSER_UI_TOOLBAR_TOOLBAR_ACTIONS_MODEL_H_ | 336 #endif // CHROME_BROWSER_UI_TOOLBAR_TOOLBAR_ACTIONS_MODEL_H_ |
| OLD | NEW |