diff options
author | mpcomplete@google.com <mpcomplete@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-04-16 22:27:21 +0000 |
---|---|---|
committer | mpcomplete@google.com <mpcomplete@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-04-16 22:27:21 +0000 |
commit | 69f1be8a969af735b2173349c9bd57a174a9bf16 (patch) | |
tree | bf6bda97490b5884ca6a15f9c1b7d923bcb40886 /chrome/browser/extensions/extensions_service.cc | |
parent | 1c86467953f1e633be06ca65e3a38113dcbe63e8 (diff) | |
download | chromium_src-69f1be8a969af735b2173349c9bd57a174a9bf16.zip chromium_src-69f1be8a969af735b2173349c9bd57a174a9bf16.tar.gz chromium_src-69f1be8a969af735b2173349c9bd57a174a9bf16.tar.bz2 |
Remove ExtensionProcessManager and move its functionality onto
ExtensionsService.
Also add "chrome-extension" to the list of schemes that BrowsingInstance
groups per-site, instead of per-tab. This means that navigating to an
extension URL will use the same process as a running extension toolstrip.
Review URL: http://codereview.chromium.org/77002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@13887 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/extensions/extensions_service.cc')
-rw-r--r-- | chrome/browser/extensions/extensions_service.cc | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/chrome/browser/extensions/extensions_service.cc b/chrome/browser/extensions/extensions_service.cc index ecc69a1..b645dfe 100644 --- a/chrome/browser/extensions/extensions_service.cc +++ b/chrome/browser/extensions/extensions_service.cc @@ -14,12 +14,15 @@ #include "base/values.h" #include "net/base/file_stream.h" #include "chrome/browser/browser_process.h" +#include "chrome/browser/browsing_instance.h" +#include "chrome/browser/extensions/extension.h" #include "chrome/browser/extensions/extension_browser_event_router.h" #include "chrome/browser/extensions/extension_error_reporter.h" #include "chrome/browser/extensions/user_script_master.h" #include "chrome/browser/extensions/extension_view.h" #include "chrome/browser/plugin_service.h" #include "chrome/browser/profile.h" +#include "chrome/browser/tab_contents/site_instance.h" #include "chrome/common/json_value_serializer.h" #include "chrome/common/notification_service.h" #include "chrome/common/unzip.h" @@ -74,8 +77,8 @@ ExtensionsService::ExtensionsService(Profile* profile, : message_loop_(MessageLoop::current()), install_directory_(profile->GetPath().AppendASCII(kInstallDirectoryName)), backend_(new ExtensionsServiceBackend(install_directory_)), - profile_(profile), - user_script_master_(user_script_master) { + user_script_master_(user_script_master), + browsing_instance_(new BrowsingInstance(profile)) { } ExtensionsService::~ExtensionsService() { @@ -183,6 +186,16 @@ void ExtensionsService::OnExtensionInstalled(FilePath path, bool update) { // TODO(erikkay): Update UI if appropriate. } +ExtensionView* ExtensionsService::CreateView(Extension* extension, + const GURL& url, + Browser* browser) { + return new ExtensionView(extension, url, GetSiteInstanceForURL(url), browser); +} + +SiteInstance* ExtensionsService::GetSiteInstanceForURL(const GURL& url) { + return browsing_instance_->GetSiteInstanceForURL(url); +} + // ExtensionsServicesBackend |