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

Side by Side Diff: extensions/shell/browser/shell_extension_system.h

Issue 1129063011: Extract LazyBackgroundTaskQueue from ExtensionSystem. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 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 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 EXTENSIONS_SHELL_BROWSER_SHELL_EXTENSION_SYSTEM_H_ 5 #ifndef EXTENSIONS_SHELL_BROWSER_SHELL_EXTENSION_SYSTEM_H_
6 #define EXTENSIONS_SHELL_BROWSER_SHELL_EXTENSION_SYSTEM_H_ 6 #define EXTENSIONS_SHELL_BROWSER_SHELL_EXTENSION_SYSTEM_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
11 #include "extensions/browser/extension_system.h" 11 #include "extensions/browser/extension_system.h"
12 #include "extensions/common/one_shot_event.h" 12 #include "extensions/common/one_shot_event.h"
13 13
14 class BrowserContextKeyedServiceFactory; 14 class BrowserContextKeyedServiceFactory;
15 15
16 namespace base { 16 namespace base {
17 class FilePath; 17 class FilePath;
18 } 18 }
19 19
20 namespace content { 20 namespace content {
21 class BrowserContext; 21 class BrowserContext;
22 } 22 }
23 23
24 namespace extensions { 24 namespace extensions {
25 25
26 class DeclarativeUserScriptManager; 26 class DeclarativeUserScriptManager;
27 class EventRouter; 27 class EventRouter;
28 class InfoMap; 28 class InfoMap;
29 class LazyBackgroundTaskQueue;
30 class ProcessManager; 29 class ProcessManager;
31 class RendererStartupHelper; 30 class RendererStartupHelper;
32 class SharedUserScriptMaster; 31 class SharedUserScriptMaster;
33 32
34 // A simplified version of ExtensionSystem for app_shell. Allows 33 // A simplified version of ExtensionSystem for app_shell. Allows
35 // app_shell to skip initialization of services it doesn't need. 34 // app_shell to skip initialization of services it doesn't need.
36 class ShellExtensionSystem : public ExtensionSystem { 35 class ShellExtensionSystem : public ExtensionSystem {
37 public: 36 public:
38 explicit ShellExtensionSystem(content::BrowserContext* browser_context); 37 explicit ShellExtensionSystem(content::BrowserContext* browser_context);
39 ~ShellExtensionSystem() override; 38 ~ShellExtensionSystem() override;
(...skipping 14 matching lines...) Expand all
54 // ExtensionSystem implementation: 53 // ExtensionSystem implementation:
55 void InitForRegularProfile(bool extensions_enabled) override; 54 void InitForRegularProfile(bool extensions_enabled) override;
56 ExtensionService* extension_service() override; 55 ExtensionService* extension_service() override;
57 RuntimeData* runtime_data() override; 56 RuntimeData* runtime_data() override;
58 ManagementPolicy* management_policy() override; 57 ManagementPolicy* management_policy() override;
59 SharedUserScriptMaster* shared_user_script_master() override; 58 SharedUserScriptMaster* shared_user_script_master() override;
60 DeclarativeUserScriptManager* declarative_user_script_manager() override; 59 DeclarativeUserScriptManager* declarative_user_script_manager() override;
61 StateStore* state_store() override; 60 StateStore* state_store() override;
62 StateStore* rules_store() override; 61 StateStore* rules_store() override;
63 InfoMap* info_map() override; 62 InfoMap* info_map() override;
64 LazyBackgroundTaskQueue* lazy_background_task_queue() override;
65 EventRouter* event_router() override; 63 EventRouter* event_router() override;
66 InstallVerifier* install_verifier() override; 64 InstallVerifier* install_verifier() override;
67 QuotaService* quota_service() override; 65 QuotaService* quota_service() override;
68 void RegisterExtensionWithRequestContexts( 66 void RegisterExtensionWithRequestContexts(
69 const Extension* extension) override; 67 const Extension* extension) override;
70 void UnregisterExtensionWithRequestContexts( 68 void UnregisterExtensionWithRequestContexts(
71 const std::string& extension_id, 69 const std::string& extension_id,
72 const UnloadedExtensionInfo::Reason reason) override; 70 const UnloadedExtensionInfo::Reason reason) override;
73 const OneShotEvent& ready() const override; 71 const OneShotEvent& ready() const override;
74 ContentVerifier* content_verifier() override; 72 ContentVerifier* content_verifier() override;
75 scoped_ptr<ExtensionSet> GetDependentExtensions( 73 scoped_ptr<ExtensionSet> GetDependentExtensions(
76 const Extension* extension) override; 74 const Extension* extension) override;
77 75
78 private: 76 private:
79 content::BrowserContext* browser_context_; // Not owned. 77 content::BrowserContext* browser_context_; // Not owned.
80 78
81 // Data to be accessed on the IO thread. Must outlive process_manager_. 79 // Data to be accessed on the IO thread. Must outlive process_manager_.
82 scoped_refptr<InfoMap> info_map_; 80 scoped_refptr<InfoMap> info_map_;
83 81
84 scoped_ptr<RuntimeData> runtime_data_; 82 scoped_ptr<RuntimeData> runtime_data_;
85 scoped_ptr<LazyBackgroundTaskQueue> lazy_background_task_queue_;
86 scoped_ptr<EventRouter> event_router_; 83 scoped_ptr<EventRouter> event_router_;
87 scoped_ptr<QuotaService> quota_service_; 84 scoped_ptr<QuotaService> quota_service_;
88 85
89 // Signaled when the extension system has completed its startup tasks. 86 // Signaled when the extension system has completed its startup tasks.
90 OneShotEvent ready_; 87 OneShotEvent ready_;
91 88
92 DISALLOW_COPY_AND_ASSIGN(ShellExtensionSystem); 89 DISALLOW_COPY_AND_ASSIGN(ShellExtensionSystem);
93 }; 90 };
94 91
95 } // namespace extensions 92 } // namespace extensions
96 93
97 #endif // EXTENSIONS_SHELL_BROWSER_SHELL_EXTENSION_SYSTEM_H_ 94 #endif // EXTENSIONS_SHELL_BROWSER_SHELL_EXTENSION_SYSTEM_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698