| 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/chrome_notification_types.h" | 7 #include "chrome/browser/chrome_notification_types.h" |
| 8 #include "chrome/browser/extensions/api/system_indicator/system_indicator_manage
r.h" | 8 #include "chrome/browser/extensions/api/system_indicator/system_indicator_manage
r.h" |
| 9 #include "chrome/browser/extensions/api/system_indicator/system_indicator_manage
r_factory.h" | 9 #include "chrome/browser/extensions/api/system_indicator/system_indicator_manage
r_factory.h" |
| 10 #include "chrome/browser/extensions/extension_action.h" | 10 #include "chrome/browser/extensions/extension_action.h" |
| 11 #include "chrome/browser/extensions/extension_service.h" | 11 #include "chrome/browser/extensions/extension_service.h" |
| 12 #include "chrome/browser/profiles/profile.h" | 12 #include "chrome/browser/profiles/profile.h" |
| 13 #include "chrome/common/extensions/api/extension_action/action_info.h" | 13 #include "chrome/common/extensions/api/extension_action/action_info.h" |
| 14 #include "chrome/common/extensions/api/extension_action/page_action_handler.h" | 14 #include "chrome/common/extensions/api/extension_action/page_action_handler.h" |
| 15 #include "components/browser_context_keyed_service/browser_context_dependency_ma
nager.h" | 15 #include "components/keyed_service/content/browser_context_dependency_manager.h" |
| 16 #include "components/browser_context_keyed_service/browser_context_keyed_service
_factory.h" | 16 #include "components/keyed_service/content/browser_context_keyed_service_factory
.h" |
| 17 #include "content/public/browser/notification_service.h" | 17 #include "content/public/browser/notification_service.h" |
| 18 #include "content/public/browser/notification_source.h" | 18 #include "content/public/browser/notification_source.h" |
| 19 #include "extensions/browser/extension_system.h" | 19 #include "extensions/browser/extension_system.h" |
| 20 #include "extensions/browser/extensions_browser_client.h" | 20 #include "extensions/browser/extensions_browser_client.h" |
| 21 #include "extensions/common/extension.h" | 21 #include "extensions/common/extension.h" |
| 22 #include "extensions/common/feature_switch.h" | 22 #include "extensions/common/feature_switch.h" |
| 23 | 23 |
| 24 namespace extensions { | 24 namespace extensions { |
| 25 | 25 |
| 26 namespace { | 26 namespace { |
| (...skipping 11 matching lines...) Expand all Loading... |
| 38 | 38 |
| 39 private: | 39 private: |
| 40 friend struct DefaultSingletonTraits<ExtensionActionManagerFactory>; | 40 friend struct DefaultSingletonTraits<ExtensionActionManagerFactory>; |
| 41 | 41 |
| 42 ExtensionActionManagerFactory() | 42 ExtensionActionManagerFactory() |
| 43 : BrowserContextKeyedServiceFactory( | 43 : BrowserContextKeyedServiceFactory( |
| 44 "ExtensionActionManager", | 44 "ExtensionActionManager", |
| 45 BrowserContextDependencyManager::GetInstance()) { | 45 BrowserContextDependencyManager::GetInstance()) { |
| 46 } | 46 } |
| 47 | 47 |
| 48 virtual BrowserContextKeyedService* BuildServiceInstanceFor( | 48 virtual KeyedService* BuildServiceInstanceFor( |
| 49 content::BrowserContext* profile) const OVERRIDE { | 49 content::BrowserContext* profile) const OVERRIDE { |
| 50 return new ExtensionActionManager(static_cast<Profile*>(profile)); | 50 return new ExtensionActionManager(static_cast<Profile*>(profile)); |
| 51 } | 51 } |
| 52 | 52 |
| 53 virtual content::BrowserContext* GetBrowserContextToUse( | 53 virtual content::BrowserContext* GetBrowserContextToUse( |
| 54 content::BrowserContext* context) const OVERRIDE { | 54 content::BrowserContext* context) const OVERRIDE { |
| 55 return ExtensionsBrowserClient::Get()->GetOriginalContext(context); | 55 return ExtensionsBrowserClient::Get()->GetOriginalContext(context); |
| 56 } | 56 } |
| 57 }; | 57 }; |
| 58 | 58 |
| (...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 156 if (!extensions::SystemIndicatorManagerFactory::GetForProfile(profile_)) | 156 if (!extensions::SystemIndicatorManagerFactory::GetForProfile(profile_)) |
| 157 return NULL; | 157 return NULL; |
| 158 | 158 |
| 159 return GetOrCreateOrNull(&system_indicators_, extension.id(), | 159 return GetOrCreateOrNull(&system_indicators_, extension.id(), |
| 160 ActionInfo::TYPE_SYSTEM_INDICATOR, | 160 ActionInfo::TYPE_SYSTEM_INDICATOR, |
| 161 ActionInfo::GetSystemIndicatorInfo(&extension), | 161 ActionInfo::GetSystemIndicatorInfo(&extension), |
| 162 profile_); | 162 profile_); |
| 163 } | 163 } |
| 164 | 164 |
| 165 } // namespace extensions | 165 } // namespace extensions |
| OLD | NEW |