Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(29)

Side by Side Diff: chrome/browser/extensions/extension_action_manager.cc

Issue 12618009: Move SystemIndicator parsing out of Extension class (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 7 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698