Commit a8816f51 authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

ieframe: Store embedder iface as IWebBrowser2 in DocHost.

parent 39c12989
......@@ -471,7 +471,7 @@ static HRESULT WINAPI ControlSite_TranslateAccelerator(IOleControlSite *iface, M
TRACE("(%p)->(%p, %08x)\n", This, pMsg, grfModifiers);
hr = IDispatch_QueryInterface(This->disp, &IID_IOleObject, (void**)&wb_obj);
hr = IWebBrowser2_QueryInterface(This->wb, &IID_IOleObject, (void**)&wb_obj);
if(SUCCEEDED(hr)) {
hr = IOleObject_GetClientSite(wb_obj, &clientsite);
if(SUCCEEDED(hr)) {
......@@ -663,12 +663,12 @@ static HRESULT WINAPI ClServiceProvider_QueryService(IServiceProvider *iface, RE
if(IsEqualGUID(&IID_IHlinkFrame, guidService)) {
TRACE("(%p)->(IID_IHlinkFrame %s %p)\n", This, debugstr_guid(riid), ppv);
return IDispatch_QueryInterface(This->disp, riid, ppv);
return IWebBrowser2_QueryInterface(This->wb, riid, ppv);
}
if(IsEqualGUID(&IID_IWebBrowserApp, guidService)) {
TRACE("IWebBrowserApp service\n");
return IDispatch_QueryInterface(This->disp, riid, ppv);
return IWebBrowser2_QueryInterface(This->wb, riid, ppv);
}
if(IsEqualGUID(&IID_IShellBrowser, guidService)) {
......
......@@ -91,7 +91,7 @@ static void notif_complete(DocHost *This, DISPID dispid)
V_BYREF(params) = &url;
V_VT(params+1) = VT_DISPATCH;
V_DISPATCH(params+1) = This->disp;
V_DISPATCH(params+1) = (IDispatch*)This->wb;
V_VT(&url) = VT_BSTR;
V_BSTR(&url) = SysAllocString(This->url);
......@@ -871,13 +871,13 @@ static const IPropertyNotifySinkVtbl PropertyNotifySinkVtbl = {
PropertyNotifySink_OnRequestEdit
};
void DocHost_Init(DocHost *This, IDispatch *disp, const IDocHostContainerVtbl* container)
void DocHost_Init(DocHost *This, IWebBrowser2 *wb, const IDocHostContainerVtbl* container)
{
This->IDocHostUIHandler2_iface.lpVtbl = &DocHostUIHandler2Vtbl;
This->IOleCommandTarget_iface.lpVtbl = &OleCommandTargetVtbl;
This->IPropertyNotifySink_iface.lpVtbl = &PropertyNotifySinkVtbl;
This->disp = disp;
This->wb = wb;
This->container_vtbl = container;
This->ready_state = READYSTATE_UNINITIALIZED;
......@@ -886,7 +886,7 @@ void DocHost_Init(DocHost *This, IDispatch *disp, const IDocHostContainerVtbl* c
DocHost_ClientSite_Init(This);
DocHost_Frame_Init(This);
ConnectionPointContainer_Init(&This->cps, (IUnknown*)disp);
ConnectionPointContainer_Init(&This->cps, (IUnknown*)wb);
IEHTMLWindow_Init(This);
NewWindowManager_Init(This);
}
......
......@@ -118,7 +118,7 @@ struct DocHost {
/* Interfaces of InPlaceFrame object */
IOleInPlaceFrame IOleInPlaceFrame_iface;
IDispatch *disp;
IWebBrowser2 *wb;
IDispatch *client_disp;
IDocHostUIHandler *hostui;
......@@ -231,7 +231,7 @@ void WebBrowser_ClassInfo_Init(WebBrowser*) DECLSPEC_HIDDEN;
void WebBrowser_OleObject_Destroy(WebBrowser*) DECLSPEC_HIDDEN;
void DocHost_Init(DocHost*,IDispatch*,const IDocHostContainerVtbl*) DECLSPEC_HIDDEN;
void DocHost_Init(DocHost*,IWebBrowser2*,const IDocHostContainerVtbl*) DECLSPEC_HIDDEN;
void DocHost_Release(DocHost*) DECLSPEC_HIDDEN;
void DocHost_ClientSite_Init(DocHost*) DECLSPEC_HIDDEN;
void DocHost_ClientSite_Release(DocHost*) DECLSPEC_HIDDEN;
......
......@@ -789,7 +789,7 @@ static HRESULT create_ie(InternetExplorer **ret_obj)
ret->doc_host->ref = 1;
ret->doc_host->ie = ret;
DocHost_Init(&ret->doc_host->doc_host, (IDispatch*)&ret->IWebBrowser2_iface, &DocHostContainerVtbl);
DocHost_Init(&ret->doc_host->doc_host, &ret->IWebBrowser2_iface, &DocHostContainerVtbl);
InternetExplorer_WebBrowser_Init(ret);
......
......@@ -329,7 +329,7 @@ void handle_navigation_error(DocHost* doc_host, HRESULT hres, BSTR url, IHTMLWin
V_BSTR(&var_url) = url;
V_VT(params+4) = VT_DISPATCH;
V_DISPATCH(params+4) = doc_host->disp;
V_DISPATCH(params+4) = (IDispatch*)doc_host->wb;
call_sink(doc_host->cps.wbe2, DISPID_NAVIGATEERROR, &dispparams);
SysFreeString(V_BSTR(&var_frame_name));
......@@ -551,7 +551,7 @@ static void on_before_navigate2(DocHost *This, LPCWSTR url, SAFEARRAY *post_data
V_BSTR(&var_url) = SysAllocString(url);
V_VT(params+6) = (VT_DISPATCH);
V_DISPATCH(params+6) = This->disp;
V_DISPATCH(params+6) = (IDispatch*)This->wb;
call_sink(This->cps.wbe2, DISPID_BEFORENAVIGATE2, &dispparams);
......
......@@ -706,7 +706,7 @@ static HRESULT WINAPI DocObjectService_FireBeforeNavigate2(
V_BSTR(&var_url) = SysAllocString(lpszUrl);
V_VT(params+6) = (VT_DISPATCH);
V_DISPATCH(params+6) = This->doc_host->disp;
V_DISPATCH(params+6) = (IDispatch*)This->doc_host->wb;
TRACE(">>>\n");
call_sink(This->doc_host->cps.wbe2, DISPID_BEFORENAVIGATE2, &dp);
......@@ -751,7 +751,7 @@ static HRESULT WINAPI DocObjectService_FireNavigateComplete2(
V_BYREF(params) = &url;
V_VT(params+1) = VT_DISPATCH;
V_DISPATCH(params+1) = This->doc_host->disp;
V_DISPATCH(params+1) = (IDispatch*)This->doc_host->wb;
V_VT(&url_var) = VT_BSTR;
V_BSTR(&url_var) = url;
......@@ -812,7 +812,7 @@ static HRESULT WINAPI DocObjectService_FireDocumentComplete(
V_BYREF(params) = &url;
V_VT(params+1) = VT_DISPATCH;
V_DISPATCH(params+1) = This->doc_host->disp;
V_DISPATCH(params+1) = (IDispatch*)This->doc_host->wb;
V_VT(&url_var) = VT_BSTR;
V_BSTR(&url_var) = url;
......
......@@ -1252,7 +1252,7 @@ static HRESULT create_webbrowser(int version, IUnknown *outer, REFIID riid, void
ret->ref = 1;
ret->version = version;
DocHost_Init(&ret->doc_host, (IDispatch*)&ret->IWebBrowser2_iface, &DocHostContainerVtbl);
DocHost_Init(&ret->doc_host, &ret->IWebBrowser2_iface, &DocHostContainerVtbl);
ret->visible = VARIANT_TRUE;
ret->menu_bar = VARIANT_TRUE;
......
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