| 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 26 matching lines...) Expand all Loading... |
| 37 | 37 |
| 38 private: | 38 private: |
| 39 friend struct DefaultSingletonTraits<ExtensionActionManagerFactory>; | 39 friend struct DefaultSingletonTraits<ExtensionActionManagerFactory>; |
| 40 | 40 |
| 41 ExtensionActionManagerFactory() | 41 ExtensionActionManagerFactory() |
| 42 : ProfileKeyedServiceFactory("ExtensionActionManager", | 42 : ProfileKeyedServiceFactory("ExtensionActionManager", |
| 43 ProfileDependencyManager::GetInstance()) { | 43 ProfileDependencyManager::GetInstance()) { |
| 44 } | 44 } |
| 45 | 45 |
| 46 virtual ProfileKeyedService* BuildServiceInstanceFor( | 46 virtual ProfileKeyedService* BuildServiceInstanceFor( |
| 47 Profile* profile) const OVERRIDE { | 47 content::BrowserContext* profile) const OVERRIDE { |
| 48 return new ExtensionActionManager(profile); | 48 return new ExtensionActionManager(static_cast<Profile*>(profile)); |
| 49 } | 49 } |
| 50 | 50 |
| 51 virtual bool ServiceRedirectedInIncognito() const OVERRIDE { | 51 virtual bool ServiceRedirectedInIncognito() const OVERRIDE { |
| 52 return true; | 52 return true; |
| 53 } | 53 } |
| 54 }; | 54 }; |
| 55 | 55 |
| 56 ExtensionActionManagerFactory* | 56 ExtensionActionManagerFactory* |
| 57 ExtensionActionManagerFactory::GetInstance() { | 57 ExtensionActionManagerFactory::GetInstance() { |
| 58 return Singleton<ExtensionActionManagerFactory>::get(); | 58 return Singleton<ExtensionActionManagerFactory>::get(); |
| (...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 |