diff options
author | ananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-05-01 00:06:00 +0000 |
---|---|---|
committer | ananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-05-01 00:06:00 +0000 |
commit | e12a3b8ba0106b816db9f45a74ddd42f344a267d (patch) | |
tree | c5ed65d2eec1f311f8b868ef054489af79a5ef7f /chrome_frame/chrome_frame_activex.h | |
parent | 975126cdf52a2f56522cb549e5dae9a7281ef851 (diff) | |
download | chromium_src-e12a3b8ba0106b816db9f45a74ddd42f344a267d.zip chromium_src-e12a3b8ba0106b816db9f45a74ddd42f344a267d.tar.gz chromium_src-e12a3b8ba0106b816db9f45a74ddd42f344a267d.tar.bz2 |
The chrome frame install script instantiates the chrome frame activex via the new ActiveXObject call, which causes it
to not receive the IOleObject_SetClientSite call.
We now bootstrap our BHO in an explicit method call RegisterBHOIfNeeded
Fixes bug http://code.google.com/p/chromium/issues/detail?id=42790
Bug=42790
Review URL: http://codereview.chromium.org/1823001
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@46165 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome_frame/chrome_frame_activex.h')
-rw-r--r-- | chrome_frame/chrome_frame_activex.h | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/chrome_frame/chrome_frame_activex.h b/chrome_frame/chrome_frame_activex.h index 35f866c..7192126 100644 --- a/chrome_frame/chrome_frame_activex.h +++ b/chrome_frame/chrome_frame_activex.h @@ -34,6 +34,7 @@ class ATL_NO_VTABLE ChromeFrameActivex public IObjectSafetyImpl<ChromeFrameActivex, INTERFACESAFE_FOR_UNTRUSTED_CALLER | INTERFACESAFE_FOR_UNTRUSTED_DATA>, + public IObjectWithSiteImpl<ChromeFrameActivex>, public IPersistPropertyBag { public: typedef ChromeFrameActivexBase<ChromeFrameActivex, CLSID_ChromeFrame> Base; @@ -43,6 +44,7 @@ class ATL_NO_VTABLE ChromeFrameActivex DECLARE_REGISTRY_RESOURCEID(IDR_CHROMEFRAME) BEGIN_COM_MAP(ChromeFrameActivex) + COM_INTERFACE_ENTRY(IObjectWithSite) COM_INTERFACE_ENTRY(IObjectSafety) COM_INTERFACE_ENTRY(IPersistPropertyBag) COM_INTERFACE_ENTRY(IConnectionPointContainer) @@ -83,6 +85,15 @@ END_MSG_MAP() // Overridden to perform security checks. STDMETHOD(put_src)(BSTR src); + // IObjectWithSite + STDMETHOD(SetSite)(IUnknown* site); + + // IChromeFrame + // On a fresh install of ChromeFrame the BHO will not be loaded in existing + // IE tabs/windows. This function instantiates the BHO and registers it + // explicitly. + STDMETHOD(RegisterBHOIfNeeded)(); + protected: // ChromeFrameDelegate overrides virtual void OnLoad(int tab_handle, const GURL& url); @@ -136,13 +147,10 @@ END_MSG_MAP() // Installs a hook on the top-level window hosting the control. HRESULT InstallTopLevelHook(IOleClientSite* client_site); - // On a fresh install of ChromeFrame the BHO will not be loaded in existing - // IE tabs/windows. This function instantiates the BHO and registers it - // explicitly. - HRESULT RegisterBHOIfNeeded(IOleClientSite* client_site); - // A hook attached to the top-level window containing the ActiveX control. HHOOK chrome_wndproc_hook_; + + ScopedComPtr<IUnknown> site_; }; #endif // CHROME_FRAME_CHROME_FRAME_ACTIVEX_H_ |