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