Chromium Code Reviews| 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 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 171 return highlighting_for_toolbar_redesign_; | 171 return highlighting_for_toolbar_redesign_; |
| 172 } | 172 } |
| 173 | 173 |
| 174 void SetActionVisibility(const std::string& action_id, bool visible); | 174 void SetActionVisibility(const std::string& action_id, bool visible); |
| 175 | 175 |
| 176 // ComponentMigrationHelper::ComponentActionDelegate: | 176 // ComponentMigrationHelper::ComponentActionDelegate: |
| 177 void AddComponentAction(const std::string& action_id) override; | 177 void AddComponentAction(const std::string& action_id) override; |
| 178 void RemoveComponentAction(const std::string& action_id) override; | 178 void RemoveComponentAction(const std::string& action_id) override; |
| 179 bool HasComponentAction(const std::string& action_id) const override; | 179 bool HasComponentAction(const std::string& action_id) const override; |
| 180 | 180 |
| 181 // Returns this toolbar's component migration helper. The helper is owned by | |
| 182 // |this|. | |
| 183 extensions::ComponentMigrationHelper* component_migration_helper() { | |
|
Peter Kasting
2016/01/26 02:12:35
Nit: Seems like there's a section above for cheap
mark a. foltz
2016/01/29 00:37:44
Both done.
| |
| 184 return component_migration_helper_.get(); | |
| 185 } | |
| 186 | |
| 181 void OnActionToolbarPrefChange(); | 187 void OnActionToolbarPrefChange(); |
| 182 | 188 |
| 183 // Highlights the actions specified by |action_ids|. This will cause | 189 // Highlights the actions specified by |action_ids|. This will cause |
| 184 // the ToolbarModel to only display those actions. | 190 // the ToolbarModel to only display those actions. |
| 185 // Highlighting mode is only entered if there is at least one action to be | 191 // Highlighting mode is only entered if there is at least one action to be |
| 186 // shown. | 192 // shown. |
| 187 // Returns true if highlighting mode is entered, false otherwise. | 193 // Returns true if highlighting mode is entered, false otherwise. |
| 188 bool HighlightActions(const std::vector<std::string>& action_ids, | 194 bool HighlightActions(const std::vector<std::string>& action_ids, |
| 189 HighlightType type); | 195 HighlightType type); |
| 190 | 196 |
| (...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 329 // For observing change of toolbar order preference by external entity (sync). | 335 // For observing change of toolbar order preference by external entity (sync). |
| 330 PrefChangeRegistrar pref_change_registrar_; | 336 PrefChangeRegistrar pref_change_registrar_; |
| 331 base::Closure pref_change_callback_; | 337 base::Closure pref_change_callback_; |
| 332 | 338 |
| 333 base::WeakPtrFactory<ToolbarActionsModel> weak_ptr_factory_; | 339 base::WeakPtrFactory<ToolbarActionsModel> weak_ptr_factory_; |
| 334 | 340 |
| 335 DISALLOW_COPY_AND_ASSIGN(ToolbarActionsModel); | 341 DISALLOW_COPY_AND_ASSIGN(ToolbarActionsModel); |
| 336 }; | 342 }; |
| 337 | 343 |
| 338 #endif // CHROME_BROWSER_UI_TOOLBAR_TOOLBAR_ACTIONS_MODEL_H_ | 344 #endif // CHROME_BROWSER_UI_TOOLBAR_TOOLBAR_ACTIONS_MODEL_H_ |
| OLD | NEW |