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

Side by Side Diff: chrome/browser/extensions/extension_system.h

Issue 23618014: This defers starting background extension page RenderViews (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 3 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 | Annotate | Revision Log
OLDNEW
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 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_SYSTEM_H_ 5 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_SYSTEM_H_
6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_SYSTEM_H_ 6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_SYSTEM_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/memory/ref_counted.h" 10 #include "base/memory/ref_counted.h"
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 45
46 // Returns the instance for the given profile, or NULL if none. This is 46 // Returns the instance for the given profile, or NULL if none. This is
47 // a convenience wrapper around ExtensionSystemFactory::GetForProfile. 47 // a convenience wrapper around ExtensionSystemFactory::GetForProfile.
48 static ExtensionSystem* Get(Profile* profile); 48 static ExtensionSystem* Get(Profile* profile);
49 49
50 // BrowserContextKeyedService implementation. 50 // BrowserContextKeyedService implementation.
51 virtual void Shutdown() OVERRIDE {} 51 virtual void Shutdown() OVERRIDE {}
52 52
53 // Initializes extensions machinery. 53 // Initializes extensions machinery.
54 // Component extensions are always enabled, external and user extensions 54 // Component extensions are always enabled, external and user extensions
55 // are controlled by |extensions_enabled|. 55 // are controlled by |extensions_enabled|. If |defer_background_creation| is
56 virtual void InitForRegularProfile(bool extensions_enabled) = 0; 56 // true, then background extension RenderViews will be deferred until
57 // ExtensionProcessManager::CreateDeferredBackgroundHosts is called.
58 virtual void InitForRegularProfile(bool extensions_enabled,
59 bool defer_background_creation) = 0;
57 60
58 // The ExtensionService is created at startup. 61 // The ExtensionService is created at startup.
59 virtual ExtensionService* extension_service() = 0; 62 virtual ExtensionService* extension_service() = 0;
60 63
61 // The class controlling whether users are permitted to perform certain 64 // The class controlling whether users are permitted to perform certain
62 // actions on extensions (install, uninstall, disable, etc.). 65 // actions on extensions (install, uninstall, disable, etc.).
63 // The ManagementPolicy is created at startup. 66 // The ManagementPolicy is created at startup.
64 virtual ManagementPolicy* management_policy() = 0; 67 virtual ManagementPolicy* management_policy() = 0;
65 68
66 // The UserScriptMaster is created at startup. 69 // The UserScriptMaster is created at startup.
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 // instances. A private Shared class (also a BrowserContextKeyedService, 121 // instances. A private Shared class (also a BrowserContextKeyedService,
119 // but with a shared instance for incognito) keeps the common services. 122 // but with a shared instance for incognito) keeps the common services.
120 class ExtensionSystemImpl : public ExtensionSystem { 123 class ExtensionSystemImpl : public ExtensionSystem {
121 public: 124 public:
122 explicit ExtensionSystemImpl(Profile* profile); 125 explicit ExtensionSystemImpl(Profile* profile);
123 virtual ~ExtensionSystemImpl(); 126 virtual ~ExtensionSystemImpl();
124 127
125 // BrowserContextKeyedService implementation. 128 // BrowserContextKeyedService implementation.
126 virtual void Shutdown() OVERRIDE; 129 virtual void Shutdown() OVERRIDE;
127 130
128 virtual void InitForRegularProfile(bool extensions_enabled) OVERRIDE; 131 virtual void InitForRegularProfile(bool extensions_enabled,
132 bool defer_background_creation) OVERRIDE;
129 133
130 virtual ExtensionService* extension_service() OVERRIDE; // shared 134 virtual ExtensionService* extension_service() OVERRIDE; // shared
131 virtual ManagementPolicy* management_policy() OVERRIDE; // shared 135 virtual ManagementPolicy* management_policy() OVERRIDE; // shared
132 virtual UserScriptMaster* user_script_master() OVERRIDE; // shared 136 virtual UserScriptMaster* user_script_master() OVERRIDE; // shared
133 virtual ExtensionProcessManager* process_manager() OVERRIDE; 137 virtual ExtensionProcessManager* process_manager() OVERRIDE;
134 virtual StateStore* state_store() OVERRIDE; // shared 138 virtual StateStore* state_store() OVERRIDE; // shared
135 virtual StateStore* rules_store() OVERRIDE; // shared 139 virtual StateStore* rules_store() OVERRIDE; // shared
136 virtual LazyBackgroundTaskQueue* lazy_background_task_queue() 140 virtual LazyBackgroundTaskQueue* lazy_background_task_queue()
137 OVERRIDE; // shared 141 OVERRIDE; // shared
138 virtual ExtensionInfoMap* info_map() OVERRIDE; // shared 142 virtual ExtensionInfoMap* info_map() OVERRIDE; // shared
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
220 // incoming resource requests from extension processes and those require 224 // incoming resource requests from extension processes and those require
221 // access to the ResourceContext owned by |io_data_|. 225 // access to the ResourceContext owned by |io_data_|.
222 scoped_ptr<ExtensionProcessManager> extension_process_manager_; 226 scoped_ptr<ExtensionProcessManager> extension_process_manager_;
223 227
224 DISALLOW_COPY_AND_ASSIGN(ExtensionSystemImpl); 228 DISALLOW_COPY_AND_ASSIGN(ExtensionSystemImpl);
225 }; 229 };
226 230
227 } // namespace extensions 231 } // namespace extensions
228 232
229 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SYSTEM_H_ 233 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SYSTEM_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698