summaryrefslogtreecommitdiffstats
path: root/ceee
diff options
context:
space:
mode:
authorrogerta@chromium.org <rogerta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-12-09 02:10:43 +0000
committerrogerta@chromium.org <rogerta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-12-09 02:10:43 +0000
commit2e92b988903e692dfb7bdc648d02dc03e47a302a (patch)
treecf15eab0f3ecfda5cfd3d4314eef5293d6f4c712 /ceee
parent004e0e969cd29b3e9ddc8455e445c56fd55df532 (diff)
downloadchromium_src-2e92b988903e692dfb7bdc648d02dc03e47a302a.zip
chromium_src-2e92b988903e692dfb7bdc648d02dc03e47a302a.tar.gz
chromium_src-2e92b988903e692dfb7bdc648d02dc03e47a302a.tar.bz2
Prevent the IE CEEE from creating a new renderer process for each new tab
created in IE. This happens when the Chrome Frame instances used by the BHO navigates to "about:blank". By navigating the Chrome Frame to a web page inside the loaded extension, whether the page exists or not, causes the existing extension process to be reused for these Chrome Frame instances instead of a new process being created. BUG=65966 TEST=create new tabs in IE and make sure that new chrome renderer processes are not created Review URL: http://codereview.chromium.org/5526012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@68694 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ceee')
-rw-r--r--ceee/ie/common/chrome_frame_host.cc3
-rw-r--r--ceee/ie/plugin/bho/browser_helper_object.cc17
2 files changed, 16 insertions, 4 deletions
diff --git a/ceee/ie/common/chrome_frame_host.cc b/ceee/ie/common/chrome_frame_host.cc
index dc5362a..632a37a 100644
--- a/ceee/ie/common/chrome_frame_host.cc
+++ b/ceee/ie/common/chrome_frame_host.cc
@@ -293,8 +293,7 @@ STDMETHODIMP_(void) ChromeFrameHost::OnCfLoad(IDispatch* event) {
}
STDMETHODIMP_(void) ChromeFrameHost::OnCfLoadError(IDispatch* event) {
- DLOG(ERROR) << "OnCfLoadError";
- DCHECK(false) << "OnCfLoadError";
+ DLOG(INFO) << "OnCfLoadError";
}
STDMETHODIMP_(void) ChromeFrameHost::OnCfExtensionReady(BSTR path,
diff --git a/ceee/ie/plugin/bho/browser_helper_object.cc b/ceee/ie/plugin/bho/browser_helper_object.cc
index 8e026c4..8f5bc41 100644
--- a/ceee/ie/plugin/bho/browser_helper_object.cc
+++ b/ceee/ie/plugin/bho/browser_helper_object.cc
@@ -539,10 +539,23 @@ HRESULT BrowserHelperObject::OnCfExtensionReady(BSTR path, int response) {
}
void BrowserHelperObject::StartExtension(const wchar_t* base_dir) {
- chrome_frame_host_->SetUrl(CComBSTR(chrome::kAboutBlankURL));
-
LoadManifestFile(base_dir);
+ // Make sure to navigate the Chrome Frame instance to some html page in the
+ // extension, even a page that may not exist, to make sure that the existing
+ // chrome extension process is used with this Chrome Frame instance. Note
+ // navigating to about:blank will cause chrome to use a new renderer process
+ // each time.
+ CComBSTR url(chrome::kAboutBlankURL);
+ if (!extension_id_.empty()) {
+ std::wstring url_string(L"chrome-extension://");
+ url_string += extension_id_;
+ url_string += L"/dummy_page_loaded_by_ceee_bho.html";
+ url = url_string.c_str();
+ }
+
+ chrome_frame_host_->SetUrl(url);
+
// There is a race between launching Chrome to get the directory of
// the extension, and the first page this BHO is attached to being loaded.
// If we hadn't loaded the manifest file when injection of scripts and