OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_SYSTEM_IMPL_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_SYSTEM_IMPL_H_ |
6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_SYSTEM_IMPL_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_SYSTEM_IMPL_H_ |
7 | 7 |
8 #include "base/memory/scoped_vector.h" | 8 #include "base/memory/scoped_vector.h" |
9 #include "extensions/browser/extension_system.h" | 9 #include "extensions/browser/extension_system.h" |
10 #include "extensions/common/one_shot_event.h" | 10 #include "extensions/common/one_shot_event.h" |
11 | 11 |
12 class DeclarativeUserScriptManager; | 12 class DeclarativeUserScriptManager; |
13 class Profile; | 13 class Profile; |
14 | 14 |
15 namespace extensions { | 15 namespace extensions { |
16 | 16 |
17 class ContentVerifier; | 17 class ContentVerifier; |
18 class ExtensionSystemSharedFactory; | 18 class ExtensionSystemSharedFactory; |
| 19 class InstallVerifier; |
19 class NavigationObserver; | 20 class NavigationObserver; |
20 class SharedUserScriptMaster; | 21 class SharedUserScriptMaster; |
21 class StateStoreNotificationObserver; | 22 class StateStoreNotificationObserver; |
22 | 23 |
23 // The ExtensionSystem for ProfileImpl and OffTheRecordProfileImpl. | 24 // The ExtensionSystem for ProfileImpl and OffTheRecordProfileImpl. |
24 // Implementation details: non-shared services are owned by | 25 // Implementation details: non-shared services are owned by |
25 // ExtensionSystemImpl, a KeyedService with separate incognito | 26 // ExtensionSystemImpl, a KeyedService with separate incognito |
26 // instances. A private Shared class (also a KeyedService, | 27 // instances. A private Shared class (also a KeyedService, |
27 // but with a shared instance for incognito) keeps the common services. | 28 // but with a shared instance for incognito) keeps the common services. |
28 class ExtensionSystemImpl : public ExtensionSystem { | 29 class ExtensionSystemImpl : public ExtensionSystem { |
(...skipping 10 matching lines...) Expand all Loading... |
39 RuntimeData* runtime_data() override; // shared | 40 RuntimeData* runtime_data() override; // shared |
40 ManagementPolicy* management_policy() override; // shared | 41 ManagementPolicy* management_policy() override; // shared |
41 SharedUserScriptMaster* shared_user_script_master() override; // shared | 42 SharedUserScriptMaster* shared_user_script_master() override; // shared |
42 DeclarativeUserScriptManager* declarative_user_script_manager() | 43 DeclarativeUserScriptManager* declarative_user_script_manager() |
43 override; // shared | 44 override; // shared |
44 StateStore* state_store() override; // shared | 45 StateStore* state_store() override; // shared |
45 StateStore* rules_store() override; // shared | 46 StateStore* rules_store() override; // shared |
46 LazyBackgroundTaskQueue* lazy_background_task_queue() override; // shared | 47 LazyBackgroundTaskQueue* lazy_background_task_queue() override; // shared |
47 InfoMap* info_map() override; // shared | 48 InfoMap* info_map() override; // shared |
48 EventRouter* event_router() override; // shared | 49 EventRouter* event_router() override; // shared |
49 InstallVerifier* install_verifier() override; | |
50 QuotaService* quota_service() override; // shared | 50 QuotaService* quota_service() override; // shared |
51 | 51 |
52 void RegisterExtensionWithRequestContexts( | 52 void RegisterExtensionWithRequestContexts( |
53 const Extension* extension) override; | 53 const Extension* extension) override; |
54 | 54 |
55 void UnregisterExtensionWithRequestContexts( | 55 void UnregisterExtensionWithRequestContexts( |
56 const std::string& extension_id, | 56 const std::string& extension_id, |
57 const UnloadedExtensionInfo::Reason reason) override; | 57 const UnloadedExtensionInfo::Reason reason) override; |
58 | 58 |
59 const OneShotEvent& ready() const override; | 59 const OneShotEvent& ready() const override; |
(...skipping 23 matching lines...) Expand all Loading... |
83 StateStore* state_store(); | 83 StateStore* state_store(); |
84 StateStore* rules_store(); | 84 StateStore* rules_store(); |
85 ExtensionService* extension_service(); | 85 ExtensionService* extension_service(); |
86 RuntimeData* runtime_data(); | 86 RuntimeData* runtime_data(); |
87 ManagementPolicy* management_policy(); | 87 ManagementPolicy* management_policy(); |
88 SharedUserScriptMaster* shared_user_script_master(); | 88 SharedUserScriptMaster* shared_user_script_master(); |
89 DeclarativeUserScriptManager* declarative_user_script_manager(); | 89 DeclarativeUserScriptManager* declarative_user_script_manager(); |
90 InfoMap* info_map(); | 90 InfoMap* info_map(); |
91 LazyBackgroundTaskQueue* lazy_background_task_queue(); | 91 LazyBackgroundTaskQueue* lazy_background_task_queue(); |
92 EventRouter* event_router(); | 92 EventRouter* event_router(); |
93 InstallVerifier* install_verifier(); | |
94 QuotaService* quota_service(); | 93 QuotaService* quota_service(); |
95 const OneShotEvent& ready() const { return ready_; } | 94 const OneShotEvent& ready() const { return ready_; } |
96 ContentVerifier* content_verifier(); | 95 ContentVerifier* content_verifier(); |
97 | 96 |
98 private: | 97 private: |
99 Profile* profile_; | 98 Profile* profile_; |
100 | 99 |
101 // The services that are shared between normal and incognito profiles. | 100 // The services that are shared between normal and incognito profiles. |
102 | 101 |
103 scoped_ptr<StateStore> state_store_; | 102 scoped_ptr<StateStore> state_store_; |
(...skipping 10 matching lines...) Expand all Loading... |
114 scoped_ptr<SharedUserScriptMaster> shared_user_script_master_; | 113 scoped_ptr<SharedUserScriptMaster> shared_user_script_master_; |
115 // Manager of a set of DeclarativeUserScript objects for programmatically | 114 // Manager of a set of DeclarativeUserScript objects for programmatically |
116 // declared scripts. | 115 // declared scripts. |
117 scoped_ptr<DeclarativeUserScriptManager> declarative_user_script_manager_; | 116 scoped_ptr<DeclarativeUserScriptManager> declarative_user_script_manager_; |
118 scoped_ptr<RuntimeData> runtime_data_; | 117 scoped_ptr<RuntimeData> runtime_data_; |
119 // ExtensionService depends on StateStore, Blacklist and RuntimeData. | 118 // ExtensionService depends on StateStore, Blacklist and RuntimeData. |
120 scoped_ptr<ExtensionService> extension_service_; | 119 scoped_ptr<ExtensionService> extension_service_; |
121 scoped_ptr<ManagementPolicy> management_policy_; | 120 scoped_ptr<ManagementPolicy> management_policy_; |
122 // extension_info_map_ needs to outlive process_manager_. | 121 // extension_info_map_ needs to outlive process_manager_. |
123 scoped_refptr<InfoMap> extension_info_map_; | 122 scoped_refptr<InfoMap> extension_info_map_; |
124 scoped_ptr<InstallVerifier> install_verifier_; | |
125 scoped_ptr<QuotaService> quota_service_; | 123 scoped_ptr<QuotaService> quota_service_; |
126 | 124 |
127 // For verifying the contents of extensions read from disk. | 125 // For verifying the contents of extensions read from disk. |
128 scoped_refptr<ContentVerifier> content_verifier_; | 126 scoped_refptr<ContentVerifier> content_verifier_; |
129 | 127 |
130 #if defined(OS_CHROMEOS) | 128 #if defined(OS_CHROMEOS) |
131 scoped_ptr<chromeos::DeviceLocalAccountManagementPolicyProvider> | 129 scoped_ptr<chromeos::DeviceLocalAccountManagementPolicyProvider> |
132 device_local_account_management_policy_provider_; | 130 device_local_account_management_policy_provider_; |
133 #endif | 131 #endif |
134 | 132 |
135 OneShotEvent ready_; | 133 OneShotEvent ready_; |
136 }; | 134 }; |
137 | 135 |
138 Profile* profile_; | 136 Profile* profile_; |
139 | 137 |
140 Shared* shared_; | 138 Shared* shared_; |
141 | 139 |
142 DISALLOW_COPY_AND_ASSIGN(ExtensionSystemImpl); | 140 DISALLOW_COPY_AND_ASSIGN(ExtensionSystemImpl); |
143 }; | 141 }; |
144 | 142 |
145 } // namespace extensions | 143 } // namespace extensions |
146 | 144 |
147 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SYSTEM_IMPL_H_ | 145 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SYSTEM_IMPL_H_ |
OLD | NEW |