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 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
158 ToolbarActionsBar* bar); | 158 ToolbarActionsBar* bar); |
159 scoped_ptr<ToolbarActionViewController> CreateActionForItem( | 159 scoped_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() { |
| 169 return component_migration_helper_.get(); |
| 170 } |
| 171 |
168 bool is_highlighting() const { return highlight_type_ != HIGHLIGHT_NONE; } | 172 bool is_highlighting() const { return highlight_type_ != HIGHLIGHT_NONE; } |
169 HighlightType highlight_type() const { return highlight_type_; } | 173 HighlightType highlight_type() const { return highlight_type_; } |
170 bool highlighting_for_toolbar_redesign() const { | 174 bool highlighting_for_toolbar_redesign() const { |
171 return highlighting_for_toolbar_redesign_; | 175 return highlighting_for_toolbar_redesign_; |
172 } | 176 } |
173 | 177 |
174 void SetActionVisibility(const std::string& action_id, bool visible); | 178 void SetActionVisibility(const std::string& action_id, bool visible); |
175 | 179 |
176 // ComponentMigrationHelper::ComponentActionDelegate: | 180 // ComponentMigrationHelper::ComponentActionDelegate: |
177 void AddComponentAction(const std::string& action_id) override; | 181 void AddComponentAction(const std::string& action_id) override; |
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
329 // For observing change of toolbar order preference by external entity (sync). | 333 // For observing change of toolbar order preference by external entity (sync). |
330 PrefChangeRegistrar pref_change_registrar_; | 334 PrefChangeRegistrar pref_change_registrar_; |
331 base::Closure pref_change_callback_; | 335 base::Closure pref_change_callback_; |
332 | 336 |
333 base::WeakPtrFactory<ToolbarActionsModel> weak_ptr_factory_; | 337 base::WeakPtrFactory<ToolbarActionsModel> weak_ptr_factory_; |
334 | 338 |
335 DISALLOW_COPY_AND_ASSIGN(ToolbarActionsModel); | 339 DISALLOW_COPY_AND_ASSIGN(ToolbarActionsModel); |
336 }; | 340 }; |
337 | 341 |
338 #endif // CHROME_BROWSER_UI_TOOLBAR_TOOLBAR_ACTIONS_MODEL_H_ | 342 #endif // CHROME_BROWSER_UI_TOOLBAR_TOOLBAR_ACTIONS_MODEL_H_ |
OLD | NEW |