diff options
author | mpcomplete@chromium.org <mpcomplete@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-07-20 21:05:37 +0000 |
---|---|---|
committer | mpcomplete@chromium.org <mpcomplete@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-07-20 21:05:37 +0000 |
commit | 7120f1327bcd3f0c33a983ee4a61c277747bb566 (patch) | |
tree | da00ed514530587dd14f76941063d34a4afcda88 /chrome/browser/profile.cc | |
parent | 6d33519bd4d811112cef3d64d9c346531d65ab9b (diff) | |
download | chromium_src-7120f1327bcd3f0c33a983ee4a61c277747bb566.zip chromium_src-7120f1327bcd3f0c33a983ee4a61c277747bb566.tar.gz chromium_src-7120f1327bcd3f0c33a983ee4a61c277747bb566.tar.bz2 |
Changed the extension.connect() API not to broadcast to all tabs. Added a
more specific tabs.connect(tabId) API to connect to a specific tab.
Also changed the ExtensionMessageService from a singleton to a Profile-owned object.
BUG=12461
TEST=no
Review URL: http://codereview.chromium.org/155707
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@21102 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/profile.cc')
-rw-r--r-- | chrome/browser/profile.cc | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/chrome/browser/profile.cc b/chrome/browser/profile.cc index 36517c4..9017c5f 100644 --- a/chrome/browser/profile.cc +++ b/chrome/browser/profile.cc @@ -15,6 +15,7 @@ #include "chrome/browser/browser_process.h" #include "chrome/browser/browser_theme_provider.h" #include "chrome/browser/download/download_manager.h" +#include "chrome/browser/extensions/extension_message_service.h" #include "chrome/browser/extensions/extension_process_manager.h" #include "chrome/browser/extensions/extensions_service.h" #include "chrome/browser/extensions/user_script_master.h" @@ -220,6 +221,10 @@ class OffTheRecordProfileImpl : public Profile, return NULL; } + virtual ExtensionMessageService* GetExtensionMessageService() { + return NULL; + } + virtual SSLHostState* GetSSLHostState() { if (!ssl_host_state_.get()) ssl_host_state_.reset(new SSLHostState()); @@ -499,6 +504,7 @@ ProfileImpl::ProfileImpl(const FilePath& path) &ProfileImpl::EnsureSessionServiceCreated); extension_process_manager_.reset(new ExtensionProcessManager(this)); + extension_message_service_ = new ExtensionMessageService(this); PrefService* prefs = GetPrefs(); prefs->AddPrefObserver(prefs::kSpellCheckDictionary, this); @@ -663,6 +669,8 @@ ProfileImpl::~ProfileImpl() { history_service_ = NULL; bookmark_bar_model_.reset(); + extension_message_service_->ProfileDestroyed(); + MarkAsCleanShutdown(); } @@ -715,6 +723,10 @@ ExtensionProcessManager* ProfileImpl::GetExtensionProcessManager() { return extension_process_manager_.get(); } +ExtensionMessageService* ProfileImpl::GetExtensionMessageService() { + return extension_message_service_.get(); +} + SSLHostState* ProfileImpl::GetSSLHostState() { if (!ssl_host_state_.get()) ssl_host_state_.reset(new SSLHostState()); |