diff options
author | ananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-05-02 14:47:14 +0000 |
---|---|---|
committer | ananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-05-02 14:47:14 +0000 |
commit | ca982ec4920857adf2d22a5a92cc54829718d805 (patch) | |
tree | 36664a2941699fdbd6655075ea1818e73c2b752e /chrome_frame/chrome_frame_activex.cc | |
parent | 84ae53dda0bc194ca7dda812bd5d5b535e4afaab (diff) | |
download | chromium_src-ca982ec4920857adf2d22a5a92cc54829718d805.zip chromium_src-ca982ec4920857adf2d22a5a92cc54829718d805.tar.gz chromium_src-ca982ec4920857adf2d22a5a92cc54829718d805.tar.bz2 |
Fixes to address code review comments from tommi from CL http://codereview.chromium.org/1823001/show
Changes include the following:-
1. Removing the IObjectWithSite::SetSite implementation from the chrome frame activex.
2. Removing the site_ member and using the ATL m_spUnkSite member.
3. Renaming the RegisterBHOIfNeeded member function to registerBhoIfNeeded to be consistent with the
other methods in the IChromeFrame interface.
Fixes bug http://code.google.com/p/chromium/issues/detail?id=42790
Bug=42790
TBR=tommi
Review URL: http://codereview.chromium.org/1831001
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@46200 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome_frame/chrome_frame_activex.cc')
-rw-r--r-- | chrome_frame/chrome_frame_activex.cc | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/chrome_frame/chrome_frame_activex.cc b/chrome_frame/chrome_frame_activex.cc index ad582bc..a662153 100644 --- a/chrome_frame/chrome_frame_activex.cc +++ b/chrome_frame/chrome_frame_activex.cc @@ -377,14 +377,6 @@ STDMETHODIMP ChromeFrameActivex::put_src(BSTR src) { return Base::put_src(src); } -STDMETHODIMP ChromeFrameActivex::SetSite(IUnknown* site) { - // We need to bootstrap our BHO if IE is running while chrome frame is - // installed. For new tabs and windows the newly registered BHO's are - // loaded. The bootstrapping is only needed for the current tab. - site_ = site; - return IObjectWithSiteImpl<ChromeFrameActivex>::SetSite(site); -} - HRESULT ChromeFrameActivex::IOleObject_SetClientSite( IOleClientSite* client_site) { HRESULT hr = Base::IOleObject_SetClientSite(client_site); @@ -609,8 +601,8 @@ HRESULT ChromeFrameActivex::InstallTopLevelHook(IOleClientSite* client_site) { return chrome_wndproc_hook_ ? S_OK : E_FAIL; } -HRESULT ChromeFrameActivex::RegisterBHOIfNeeded() { - if (!site_) { +HRESULT ChromeFrameActivex::registerBhoIfNeeded() { + if (!m_spUnkSite) { NOTREACHED() << "Invalid client site"; return E_FAIL; } @@ -621,7 +613,7 @@ HRESULT ChromeFrameActivex::RegisterBHOIfNeeded() { } ScopedComPtr<IWebBrowser2> web_browser2; - HRESULT hr = DoQueryService(SID_SWebBrowserApp, site_, + HRESULT hr = DoQueryService(SID_SWebBrowserApp, m_spUnkSite, web_browser2.Receive()); if (FAILED(hr) || web_browser2.get() == NULL) { DLOG(WARNING) << "Failed to get IWebBrowser2 from client site. Error:" |