| 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 #include "chrome/browser/ui/toolbar/toolbar_actions_model.h" | 5 #include "chrome/browser/ui/toolbar/toolbar_actions_model.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/location.h" | 10 #include "base/location.h" |
| (...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 181 | 181 |
| 182 // Create and add an ExtensionActionViewController for the extension. | 182 // Create and add an ExtensionActionViewController for the extension. |
| 183 result.reset(new ExtensionActionViewController( | 183 result.reset(new ExtensionActionViewController( |
| 184 extension, browser, | 184 extension, browser, |
| 185 extension_action_manager_->GetExtensionAction(*extension), bar)); | 185 extension_action_manager_->GetExtensionAction(*extension), bar)); |
| 186 break; | 186 break; |
| 187 } | 187 } |
| 188 case COMPONENT_ACTION: { | 188 case COMPONENT_ACTION: { |
| 189 DCHECK(use_redesign_); | 189 DCHECK(use_redesign_); |
| 190 result = ComponentToolbarActionsFactory::GetInstance() | 190 result = ComponentToolbarActionsFactory::GetInstance() |
| 191 ->GetComponentToolbarActionForId(item.id, browser) | 191 ->GetComponentToolbarActionForId(item.id, browser, bar) |
| 192 .Pass(); | 192 .Pass(); |
| 193 break; | 193 break; |
| 194 } | 194 } |
| 195 case UNKNOWN_ACTION: | 195 case UNKNOWN_ACTION: |
| 196 NOTREACHED(); // Should never have an UNKNOWN_ACTION in toolbar_items. | 196 NOTREACHED(); // Should never have an UNKNOWN_ACTION in toolbar_items. |
| 197 break; | 197 break; |
| 198 } | 198 } |
| 199 return result.Pass(); | 199 return result.Pass(); |
| 200 } | 200 } |
| 201 | 201 |
| (...skipping 571 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 773 return true; | 773 return true; |
| 774 } | 774 } |
| 775 } | 775 } |
| 776 return false; | 776 return false; |
| 777 } | 777 } |
| 778 | 778 |
| 779 const extensions::Extension* ToolbarActionsModel::GetExtensionById( | 779 const extensions::Extension* ToolbarActionsModel::GetExtensionById( |
| 780 const std::string& id) const { | 780 const std::string& id) const { |
| 781 return extension_registry_->enabled_extensions().GetByID(id); | 781 return extension_registry_->enabled_extensions().GetByID(id); |
| 782 } | 782 } |
| OLD | NEW |