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 InstallVerifier; |
20 class NavigationObserver; | 20 class NavigationObserver; |
21 class SharedUserScriptMaster; | 21 class SharedUserScriptMaster; |
22 class StateStoreNotificationObserver; | 22 class StateStoreNotificationObserver; |
| 23 // class SidebarManager; |
23 | 24 |
24 // The ExtensionSystem for ProfileImpl and OffTheRecordProfileImpl. | 25 // The ExtensionSystem for ProfileImpl and OffTheRecordProfileImpl. |
25 // Implementation details: non-shared services are owned by | 26 // Implementation details: non-shared services are owned by |
26 // ExtensionSystemImpl, a KeyedService with separate incognito | 27 // ExtensionSystemImpl, a KeyedService with separate incognito |
27 // instances. A private Shared class (also a KeyedService, | 28 // instances. A private Shared class (also a KeyedService, |
28 // but with a shared instance for incognito) keeps the common services. | 29 // but with a shared instance for incognito) keeps the common services. |
29 class ExtensionSystemImpl : public ExtensionSystem { | 30 class ExtensionSystemImpl : public ExtensionSystem { |
30 public: | 31 public: |
31 explicit ExtensionSystemImpl(Profile* profile); | 32 explicit ExtensionSystemImpl(Profile* profile); |
32 ~ExtensionSystemImpl() override; | 33 ~ExtensionSystemImpl() override; |
(...skipping 18 matching lines...) Expand all Loading... |
51 | 52 |
52 void UnregisterExtensionWithRequestContexts( | 53 void UnregisterExtensionWithRequestContexts( |
53 const std::string& extension_id, | 54 const std::string& extension_id, |
54 const UnloadedExtensionInfo::Reason reason) override; | 55 const UnloadedExtensionInfo::Reason reason) override; |
55 | 56 |
56 const OneShotEvent& ready() const override; | 57 const OneShotEvent& ready() const override; |
57 ContentVerifier* content_verifier() override; // shared | 58 ContentVerifier* content_verifier() override; // shared |
58 scoped_ptr<ExtensionSet> GetDependentExtensions( | 59 scoped_ptr<ExtensionSet> GetDependentExtensions( |
59 const Extension* extension) override; | 60 const Extension* extension) override; |
60 | 61 |
| 62 SidebarManager* sidebar_manager() override; |
| 63 void CreateSidebarManager(); |
| 64 |
61 private: | 65 private: |
62 friend class ExtensionSystemSharedFactory; | 66 friend class ExtensionSystemSharedFactory; |
63 | 67 |
64 // Owns the Extension-related systems that have a single instance | 68 // Owns the Extension-related systems that have a single instance |
65 // shared between normal and incognito profiles. | 69 // shared between normal and incognito profiles. |
66 class Shared : public KeyedService { | 70 class Shared : public KeyedService { |
67 public: | 71 public: |
68 explicit Shared(Profile* profile); | 72 explicit Shared(Profile* profile); |
69 ~Shared() override; | 73 ~Shared() override; |
70 | 74 |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
121 device_local_account_management_policy_provider_; | 125 device_local_account_management_policy_provider_; |
122 #endif | 126 #endif |
123 | 127 |
124 OneShotEvent ready_; | 128 OneShotEvent ready_; |
125 }; | 129 }; |
126 | 130 |
127 Profile* profile_; | 131 Profile* profile_; |
128 | 132 |
129 Shared* shared_; | 133 Shared* shared_; |
130 | 134 |
| 135 scoped_refptr<SidebarManager> sidebar_manager_; |
| 136 |
131 DISALLOW_COPY_AND_ASSIGN(ExtensionSystemImpl); | 137 DISALLOW_COPY_AND_ASSIGN(ExtensionSystemImpl); |
132 }; | 138 }; |
133 | 139 |
134 } // namespace extensions | 140 } // namespace extensions |
135 | 141 |
136 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SYSTEM_IMPL_H_ | 142 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SYSTEM_IMPL_H_ |
OLD | NEW |