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/extensions/extension_action_manager.h" | 5 #include "chrome/browser/extensions/extension_action_manager.h" |
6 | 6 |
7 #include "chrome/browser/extensions/api/system_indicator/system_indicator_manage
r.h" | 7 #include "chrome/browser/extensions/api/system_indicator/system_indicator_manage
r.h" |
8 #include "chrome/browser/extensions/api/system_indicator/system_indicator_manage
r_factory.h" | 8 #include "chrome/browser/extensions/api/system_indicator/system_indicator_manage
r_factory.h" |
9 #include "chrome/browser/extensions/extension_action.h" | 9 #include "chrome/browser/extensions/extension_action.h" |
10 #include "chrome/browser/extensions/extension_system.h" | 10 #include "chrome/browser/extensions/extension_system.h" |
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
148 const extensions::Extension& extension) const { | 148 const extensions::Extension& extension) const { |
149 // If it does not already exist, create the SystemIndicatorManager for the | 149 // If it does not already exist, create the SystemIndicatorManager for the |
150 // given profile. This could return NULL if the system indicator area is | 150 // given profile. This could return NULL if the system indicator area is |
151 // unavailable on the current system. If so, return NULL to signal that | 151 // unavailable on the current system. If so, return NULL to signal that |
152 // the system indicator area is unusable. | 152 // the system indicator area is unusable. |
153 if (!extensions::SystemIndicatorManagerFactory::GetForProfile(profile_)) | 153 if (!extensions::SystemIndicatorManagerFactory::GetForProfile(profile_)) |
154 return NULL; | 154 return NULL; |
155 | 155 |
156 return GetOrCreateOrNull(&system_indicators_, extension.id(), | 156 return GetOrCreateOrNull(&system_indicators_, extension.id(), |
157 ActionInfo::TYPE_SYSTEM_INDICATOR, | 157 ActionInfo::TYPE_SYSTEM_INDICATOR, |
158 extension.system_indicator_info()); | 158 ActionInfo::GetSystemIndicatorInfo(&extension)); |
159 } | 159 } |
160 | 160 |
161 ExtensionAction* ExtensionActionManager::GetScriptBadge( | 161 ExtensionAction* ExtensionActionManager::GetScriptBadge( |
162 const extensions::Extension& extension) const { | 162 const extensions::Extension& extension) const { |
163 return GetOrCreateOrNull(&script_badges_, extension.id(), | 163 return GetOrCreateOrNull(&script_badges_, extension.id(), |
164 ActionInfo::TYPE_SCRIPT_BADGE, | 164 ActionInfo::TYPE_SCRIPT_BADGE, |
165 ActionInfo::GetScriptBadgeInfo(&extension)); | 165 ActionInfo::GetScriptBadgeInfo(&extension)); |
166 } | 166 } |
167 | 167 |
168 } // namespace extensions | 168 } // namespace extensions |
OLD | NEW |