Commit 6470c5ca authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

shdocvw: Get rid of WebBrowser dependency in DocHost object.

parent 59c6f204
...@@ -464,17 +464,15 @@ static const IServiceProviderVtbl ServiceProviderVtbl = { ...@@ -464,17 +464,15 @@ static const IServiceProviderVtbl ServiceProviderVtbl = {
ClServiceProvider_QueryService ClServiceProvider_QueryService
}; };
void WebBrowser_ClientSite_Init(WebBrowser *This) void DocHost_ClientSite_Init(DocHost *This)
{ {
This->doc_host.lpOleClientSiteVtbl = &OleClientSiteVtbl; This->lpOleClientSiteVtbl = &OleClientSiteVtbl;
This->doc_host.lpOleInPlaceSiteVtbl = &OleInPlaceSiteVtbl; This->lpOleInPlaceSiteVtbl = &OleInPlaceSiteVtbl;
This->doc_host.lpOleDocumentSiteVtbl = &OleDocumentSiteVtbl; This->lpOleDocumentSiteVtbl = &OleDocumentSiteVtbl;
This->doc_host.lpDispatchVtbl = &DispatchVtbl; This->lpDispatchVtbl = &DispatchVtbl;
This->doc_host.lpServiceProviderVtbl = &ServiceProviderVtbl; This->lpServiceProviderVtbl = &ServiceProviderVtbl;
This->doc_host.view = NULL; This->view = NULL;
This->doc_host.wb = This;
} }
void WebBrowser_ClientSite_Destroy(WebBrowser *This) void WebBrowser_ClientSite_Destroy(WebBrowser *This)
......
...@@ -478,14 +478,17 @@ static const IDocHostUIHandler2Vtbl DocHostUIHandler2Vtbl = { ...@@ -478,14 +478,17 @@ static const IDocHostUIHandler2Vtbl DocHostUIHandler2Vtbl = {
DocHostUIHandler_GetOverrideKeyPath DocHostUIHandler_GetOverrideKeyPath
}; };
void WebBrowser_DocHost_Init(WebBrowser *This) void DocHost_Init(DocHost *This)
{ {
This->doc_host.lpDocHostUIHandlerVtbl = &DocHostUIHandler2Vtbl; This->lpDocHostUIHandlerVtbl = &DocHostUIHandler2Vtbl;
This->doc_host.lpOleCommandTargetVtbl = &OleCommandTargetVtbl; This->lpOleCommandTargetVtbl = &OleCommandTargetVtbl;
This->doc_host.document = NULL; This->document = NULL;
This->doc_host.hostui = NULL; This->hostui = NULL;
This->hwnd = NULL;
This->frame_hwnd = NULL;
This->doc_host.hwnd = NULL; DocHost_ClientSite_Init(This);
This->doc_host.frame_hwnd = NULL; DocHost_Frame_Init(This);
} }
...@@ -174,7 +174,7 @@ static const IOleInPlaceFrameVtbl OleInPlaceFrameVtbl = { ...@@ -174,7 +174,7 @@ static const IOleInPlaceFrameVtbl OleInPlaceFrameVtbl = {
InPlaceFrame_TranslateAccelerator InPlaceFrame_TranslateAccelerator
}; };
void WebBrowser_Frame_Init(WebBrowser *This) void DocHost_Frame_Init(DocHost *This)
{ {
This->doc_host.lpOleInPlaceFrameVtbl = &OleInPlaceFrameVtbl; This->lpOleInPlaceFrameVtbl = &OleInPlaceFrameVtbl;
} }
...@@ -73,8 +73,6 @@ typedef struct { ...@@ -73,8 +73,6 @@ typedef struct {
HWND hwnd; HWND hwnd;
HWND frame_hwnd; HWND frame_hwnd;
struct WebBrowser *wb; /* FIXME */
} DocHost; } DocHost;
typedef struct WebBrowser { typedef struct WebBrowser {
...@@ -155,10 +153,10 @@ void WebBrowser_ClassInfo_Init(WebBrowser*); ...@@ -155,10 +153,10 @@ void WebBrowser_ClassInfo_Init(WebBrowser*);
void WebBrowser_Events_Init(WebBrowser*); void WebBrowser_Events_Init(WebBrowser*);
void WebBrowser_HlinkFrame_Init(WebBrowser*); void WebBrowser_HlinkFrame_Init(WebBrowser*);
void WebBrowser_ClientSite_Init(WebBrowser*); void DocHost_Init(DocHost*);
void WebBrowser_DocHost_Init(WebBrowser*); void DocHost_ClientSite_Init(DocHost*);
void WebBrowser_Frame_Init(WebBrowser*); void DocHost_Frame_Init(DocHost*);
void WebBrowser_OleObject_Destroy(WebBrowser*); void WebBrowser_OleObject_Destroy(WebBrowser*);
void WebBrowser_Events_Destroy(WebBrowser*); void WebBrowser_Events_Destroy(WebBrowser*);
......
...@@ -847,15 +847,13 @@ HRESULT WebBrowser_Create(IUnknown *pOuter, REFIID riid, void **ppv) ...@@ -847,15 +847,13 @@ HRESULT WebBrowser_Create(IUnknown *pOuter, REFIID riid, void **ppv)
ret->url = NULL; ret->url = NULL;
ret->doc_host.disp = (IDispatch*)WEBBROWSER2(ret); ret->doc_host.disp = (IDispatch*)WEBBROWSER2(ret);
DocHost_Init(&ret->doc_host);
WebBrowser_OleObject_Init(ret); WebBrowser_OleObject_Init(ret);
WebBrowser_ViewObject_Init(ret); WebBrowser_ViewObject_Init(ret);
WebBrowser_Persist_Init(ret); WebBrowser_Persist_Init(ret);
WebBrowser_ClassInfo_Init(ret); WebBrowser_ClassInfo_Init(ret);
WebBrowser_Events_Init(ret); WebBrowser_Events_Init(ret);
WebBrowser_ClientSite_Init(ret);
WebBrowser_DocHost_Init(ret);
WebBrowser_Frame_Init(ret);
WebBrowser_HlinkFrame_Init(ret); WebBrowser_HlinkFrame_Init(ret);
hres = IWebBrowser_QueryInterface(WEBBROWSER(ret), riid, ppv); hres = IWebBrowser_QueryInterface(WEBBROWSER(ret), riid, ppv);
......
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