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

Side by Side Diff: apps/shell/browser/shell_extensions_browser_client.cc

Issue 381283002: Refactor code that defers extension background page loading (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase on top of chrome_browser_extensions.gypi GN changes Created 6 years, 5 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "apps/shell/browser/shell_extensions_browser_client.h" 5 #include "apps/shell/browser/shell_extensions_browser_client.h"
6 6
7 #include "apps/shell/browser/shell_app_sorting.h" 7 #include "apps/shell/browser/shell_app_sorting.h"
8 #include "apps/shell/browser/shell_extension_system_factory.h" 8 #include "apps/shell/browser/shell_extension_system_factory.h"
9 #include "apps/shell/browser/shell_extension_web_contents_observer.h" 9 #include "apps/shell/browser/shell_extension_web_contents_observer.h"
10 #include "apps/shell/browser/shell_runtime_api_delegate.h" 10 #include "apps/shell/browser/shell_runtime_api_delegate.h"
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
176 176
177 PrefService* ShellExtensionsBrowserClient::GetPrefServiceForContext( 177 PrefService* ShellExtensionsBrowserClient::GetPrefServiceForContext(
178 BrowserContext* context) { 178 BrowserContext* context) {
179 return prefs_.get(); 179 return prefs_.get();
180 } 180 }
181 181
182 void ShellExtensionsBrowserClient::GetEarlyExtensionPrefsObservers( 182 void ShellExtensionsBrowserClient::GetEarlyExtensionPrefsObservers(
183 content::BrowserContext* context, 183 content::BrowserContext* context,
184 std::vector<ExtensionPrefsObserver*>* observers) const {} 184 std::vector<ExtensionPrefsObserver*>* observers) const {}
185 185
186 bool ShellExtensionsBrowserClient::DeferLoadingBackgroundHosts( 186 ProcessManagerDelegate*
187 BrowserContext* context) const { 187 ShellExtensionsBrowserClient::GetProcessManagerDelegate() const {
188 return false; 188 return NULL;
189 }
190
191 bool ShellExtensionsBrowserClient::IsBackgroundPageAllowed(
192 BrowserContext* context) const {
193 return true;
194 } 189 }
195 190
196 scoped_ptr<ExtensionHostDelegate> 191 scoped_ptr<ExtensionHostDelegate>
197 ShellExtensionsBrowserClient::CreateExtensionHostDelegate() { 192 ShellExtensionsBrowserClient::CreateExtensionHostDelegate() {
198 return scoped_ptr<ExtensionHostDelegate>(new ShellExtensionHostDelegate); 193 return scoped_ptr<ExtensionHostDelegate>(new ShellExtensionHostDelegate);
199 } 194 }
200 195
201 bool ShellExtensionsBrowserClient::DidVersionUpdate(BrowserContext* context) { 196 bool ShellExtensionsBrowserClient::DidVersionUpdate(BrowserContext* context) {
202 // TODO(jamescook): We might want to tell extensions when app_shell updates. 197 // TODO(jamescook): We might want to tell extensions when app_shell updates.
203 return false; 198 return false;
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
236 content::BrowserContext* context) const { 231 content::BrowserContext* context) const {
237 return scoped_ptr<RuntimeAPIDelegate>(new apps::ShellRuntimeAPIDelegate()); 232 return scoped_ptr<RuntimeAPIDelegate>(new apps::ShellRuntimeAPIDelegate());
238 } 233 }
239 234
240 ComponentExtensionResourceManager* 235 ComponentExtensionResourceManager*
241 ShellExtensionsBrowserClient::GetComponentExtensionResourceManager() { 236 ShellExtensionsBrowserClient::GetComponentExtensionResourceManager() {
242 return NULL; 237 return NULL;
243 } 238 }
244 239
245 } // namespace extensions 240 } // namespace extensions
OLDNEW
« no previous file with comments | « apps/shell/browser/shell_extensions_browser_client.h ('k') | chrome/browser/extensions/chrome_extensions_browser_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698