Commit 7c7603ca authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

shdocvw: Move connection points to the new ConnectionPointContainer struct.

parent 6137e1b6
...@@ -51,8 +51,8 @@ static void navigate_complete(DocHost *This) ...@@ -51,8 +51,8 @@ static void navigate_complete(DocHost *This)
V_VT(&url) = VT_BSTR; V_VT(&url) = VT_BSTR;
V_BSTR(&url) = This->url; V_BSTR(&url) = This->url;
call_sink(This->cp_wbe2, DISPID_NAVIGATECOMPLETE2, &dispparams); call_sink(This->cps.wbe2, DISPID_NAVIGATECOMPLETE2, &dispparams);
call_sink(This->cp_wbe2, DISPID_DOCUMENTCOMPLETE, &dispparams); call_sink(This->cps.wbe2, DISPID_DOCUMENTCOMPLETE, &dispparams);
if(disp) if(disp)
IDispatch_Release(disp); IDispatch_Release(disp);
......
...@@ -88,13 +88,13 @@ static HRESULT WINAPI ConnectionPointContainer_FindConnectionPoint(IConnectionPo ...@@ -88,13 +88,13 @@ static HRESULT WINAPI ConnectionPointContainer_FindConnectionPoint(IConnectionPo
if(IsEqualGUID(&DIID_DWebBrowserEvents2, riid)) { if(IsEqualGUID(&DIID_DWebBrowserEvents2, riid)) {
TRACE("(%p)->(DIID_DWebBrowserEvents2 %p)\n", This, ppCP); TRACE("(%p)->(DIID_DWebBrowserEvents2 %p)\n", This, ppCP);
*ppCP = CONPOINT(This->doc_host.cp_wbe2); *ppCP = CONPOINT(This->doc_host.cps.wbe2);
}else if(IsEqualGUID(&DIID_DWebBrowserEvents, riid)) { }else if(IsEqualGUID(&DIID_DWebBrowserEvents, riid)) {
TRACE("(%p)->(DIID_DWebBrowserEvents %p)\n", This, ppCP); TRACE("(%p)->(DIID_DWebBrowserEvents %p)\n", This, ppCP);
*ppCP = CONPOINT(This->doc_host.cp_wbe); *ppCP = CONPOINT(This->doc_host.cps.wbe);
}else if(IsEqualGUID(&IID_IPropertyNotifySink, riid)) { }else if(IsEqualGUID(&IID_IPropertyNotifySink, riid)) {
TRACE("(%p)->(IID_IPropertyNotifySink %p)\n", This, ppCP); TRACE("(%p)->(IID_IPropertyNotifySink %p)\n", This, ppCP);
*ppCP = CONPOINT(This->doc_host.cp_pns); *ppCP = CONPOINT(This->doc_host.cps.pns);
} }
if(*ppCP) { if(*ppCP) {
...@@ -299,23 +299,23 @@ static void ConnectionPoint_Destroy(ConnectionPoint *This) ...@@ -299,23 +299,23 @@ static void ConnectionPoint_Destroy(ConnectionPoint *This)
void DocHost_Events_Init(DocHost *This) void DocHost_Events_Init(DocHost *This)
{ {
ConnectionPoint_Create(This, &DIID_DWebBrowserEvents2, &This->cp_wbe2); ConnectionPoint_Create(This, &DIID_DWebBrowserEvents2, &This->cps.wbe2);
ConnectionPoint_Create(This, &DIID_DWebBrowserEvents, &This->cp_wbe); ConnectionPoint_Create(This, &DIID_DWebBrowserEvents, &This->cps.wbe);
ConnectionPoint_Create(This, &IID_IPropertyNotifySink, &This->cp_pns); ConnectionPoint_Create(This, &IID_IPropertyNotifySink, &This->cps.pns);
} }
void DocHost_Events_Release(DocHost *This) void DocHost_Events_Release(DocHost *This)
{ {
ConnectionPoint_Destroy(This->cp_wbe2); ConnectionPoint_Destroy(This->cps.wbe2);
ConnectionPoint_Destroy(This->cp_wbe); ConnectionPoint_Destroy(This->cps.wbe);
ConnectionPoint_Destroy(This->cp_pns); ConnectionPoint_Destroy(This->cps.pns);
} }
void WebBrowser_Events_Init(WebBrowser *This) void WebBrowser_Events_Init(WebBrowser *This)
{ {
This->lpConnectionPointContainerVtbl = &ConnectionPointContainerVtbl; This->lpConnectionPointContainerVtbl = &ConnectionPointContainerVtbl;
This->doc_host.cp_wbe2->container = CONPTCONT(This); This->doc_host.cps.wbe2->container = CONPTCONT(This);
This->doc_host.cp_wbe->container = CONPTCONT(This); This->doc_host.cps.wbe->container = CONPTCONT(This);
This->doc_host.cp_pns->container = CONPTCONT(This); This->doc_host.cps.pns->container = CONPTCONT(This);
} }
...@@ -373,7 +373,7 @@ static void on_before_navigate2(DocHost *This, LPWSTR url, PBYTE post_data, ULON ...@@ -373,7 +373,7 @@ static void on_before_navigate2(DocHost *This, LPWSTR url, PBYTE post_data, ULON
V_VT(params+6) = (VT_DISPATCH); V_VT(params+6) = (VT_DISPATCH);
V_DISPATCH(params+6) = This->disp; V_DISPATCH(params+6) = This->disp;
call_sink(This->cp_wbe2, DISPID_BEFORENAVIGATE2, &dispparams); call_sink(This->cps.wbe2, DISPID_BEFORENAVIGATE2, &dispparams);
SysFreeString(V_BSTR(&var_url)); SysFreeString(V_BSTR(&var_url));
if(post_data_len) if(post_data_len)
......
...@@ -52,6 +52,12 @@ extern HRESULT SHDOCVW_GetShellInstanceObjectClassObject(REFCLSID rclsid, ...@@ -52,6 +52,12 @@ extern HRESULT SHDOCVW_GetShellInstanceObjectClassObject(REFCLSID rclsid,
typedef struct ConnectionPoint ConnectionPoint; typedef struct ConnectionPoint ConnectionPoint;
typedef struct { typedef struct {
ConnectionPoint *wbe2;
ConnectionPoint *wbe;
ConnectionPoint *pns;
} ConnectionPointContainer;
typedef struct {
const IOleClientSiteVtbl *lpOleClientSiteVtbl; const IOleClientSiteVtbl *lpOleClientSiteVtbl;
const IOleInPlaceSiteVtbl *lpOleInPlaceSiteVtbl; const IOleInPlaceSiteVtbl *lpOleInPlaceSiteVtbl;
const IDocHostUIHandler2Vtbl *lpDocHostUIHandlerVtbl; const IDocHostUIHandler2Vtbl *lpDocHostUIHandlerVtbl;
...@@ -74,11 +80,7 @@ typedef struct { ...@@ -74,11 +80,7 @@ typedef struct {
LPOLESTR url; LPOLESTR url;
/* Connection points */ ConnectionPointContainer cps;
ConnectionPoint *cp_wbe2;
ConnectionPoint *cp_wbe;
ConnectionPoint *cp_pns;
} DocHost; } DocHost;
typedef struct { typedef struct {
......
...@@ -518,7 +518,7 @@ static HRESULT WINAPI WebBrowser_put_Visible(IWebBrowser2 *iface, VARIANT_BOOL V ...@@ -518,7 +518,7 @@ static HRESULT WINAPI WebBrowser_put_Visible(IWebBrowser2 *iface, VARIANT_BOOL V
V_VT(&arg) = VT_BOOL; V_VT(&arg) = VT_BOOL;
V_BOOL(&arg) = Value; V_BOOL(&arg) = Value;
call_sink(This->doc_host.cp_wbe2, DISPID_ONVISIBLE, &dispparams); call_sink(This->doc_host.cps.wbe2, DISPID_ONVISIBLE, &dispparams);
return S_OK; return S_OK;
} }
...@@ -548,7 +548,7 @@ static HRESULT WINAPI WebBrowser_put_StatusBar(IWebBrowser2 *iface, VARIANT_BOOL ...@@ -548,7 +548,7 @@ static HRESULT WINAPI WebBrowser_put_StatusBar(IWebBrowser2 *iface, VARIANT_BOOL
V_VT(&arg) = VT_BOOL; V_VT(&arg) = VT_BOOL;
V_BOOL(&arg) = Value; V_BOOL(&arg) = Value;
call_sink(This->doc_host.cp_wbe2, DISPID_ONSTATUSBAR, &dispparams); call_sink(This->doc_host.cps.wbe2, DISPID_ONSTATUSBAR, &dispparams);
return S_OK; return S_OK;
} }
...@@ -592,7 +592,7 @@ static HRESULT WINAPI WebBrowser_put_ToolBar(IWebBrowser2 *iface, int Value) ...@@ -592,7 +592,7 @@ static HRESULT WINAPI WebBrowser_put_ToolBar(IWebBrowser2 *iface, int Value)
V_VT(&arg) = VT_BOOL; V_VT(&arg) = VT_BOOL;
V_BOOL(&arg) = Value; V_BOOL(&arg) = Value;
call_sink(This->doc_host.cp_wbe2, DISPID_ONTOOLBAR, &dispparams); call_sink(This->doc_host.cps.wbe2, DISPID_ONTOOLBAR, &dispparams);
return S_OK; return S_OK;
} }
...@@ -622,7 +622,7 @@ static HRESULT WINAPI WebBrowser_put_MenuBar(IWebBrowser2 *iface, VARIANT_BOOL V ...@@ -622,7 +622,7 @@ static HRESULT WINAPI WebBrowser_put_MenuBar(IWebBrowser2 *iface, VARIANT_BOOL V
V_VT(&arg) = VT_BOOL; V_VT(&arg) = VT_BOOL;
V_BOOL(&arg) = Value; V_BOOL(&arg) = Value;
call_sink(This->doc_host.cp_wbe2, DISPID_ONMENUBAR, &dispparams); call_sink(This->doc_host.cps.wbe2, DISPID_ONMENUBAR, &dispparams);
return S_OK; return S_OK;
} }
...@@ -822,7 +822,7 @@ static HRESULT WINAPI WebBrowser_put_AddressBar(IWebBrowser2 *iface, VARIANT_BOO ...@@ -822,7 +822,7 @@ static HRESULT WINAPI WebBrowser_put_AddressBar(IWebBrowser2 *iface, VARIANT_BOO
V_VT(&arg) = VT_BOOL; V_VT(&arg) = VT_BOOL;
V_BOOL(&arg) = Value; V_BOOL(&arg) = Value;
call_sink(This->doc_host.cp_wbe2, DISPID_ONADDRESSBAR, &dispparams); call_sink(This->doc_host.cps.wbe2, DISPID_ONADDRESSBAR, &dispparams);
return S_OK; return S_OK;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment