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

shdocvw: Added client site's IServiceProvider interface.

parent 0dbbd90c
...@@ -56,6 +56,9 @@ static HRESULT WINAPI ClientSite_QueryInterface(IOleClientSite *iface, REFIID ri ...@@ -56,6 +56,9 @@ static HRESULT WINAPI ClientSite_QueryInterface(IOleClientSite *iface, REFIID ri
}else if(IsEqualGUID(&IID_IDispatch, riid)) { }else if(IsEqualGUID(&IID_IDispatch, riid)) {
TRACE("(%p)->(IID_IDispatch %p)\n", This, ppv); TRACE("(%p)->(IID_IDispatch %p)\n", This, ppv);
*ppv = CLDISP(This); *ppv = CLDISP(This);
}else if(IsEqualGUID(&IID_IServiceProvider, riid)) {
TRACE("(%p)->(IID_IServiceProvider %p)\n", This, ppv);
*ppv = CLSERVPROV(This);
} }
if(*ppv) { if(*ppv) {
...@@ -410,12 +413,58 @@ static const IDispatchVtbl DispatchVtbl = { ...@@ -410,12 +413,58 @@ static const IDispatchVtbl DispatchVtbl = {
ClDispatch_Invoke ClDispatch_Invoke
}; };
#define SERVPROV_THIS(iface) DEFINE_THIS(WebBrowser, ClServiceProvider, iface)
static HRESULT WINAPI ClServiceProvider_QueryInterface(IServiceProvider *iface, REFIID riid,
void **ppv)
{
WebBrowser *This = SERVPROV_THIS(iface);
return IOleClientSite_QueryInterface(CLIENTSITE(This), riid, ppv);
}
static ULONG WINAPI ClServiceProvider_AddRef(IServiceProvider *iface)
{
WebBrowser *This = SERVPROV_THIS(iface);
return IWebBrowser2_AddRef(WEBBROWSER2(This));
}
static ULONG WINAPI ClServiceProvider_Release(IServiceProvider *iface)
{
WebBrowser *This = SERVPROV_THIS(iface);
return IWebBrowser2_Release(WEBBROWSER2(This));
}
static HRESULT WINAPI ClServiceProvider_QueryService(IServiceProvider *iface, REFGUID guidService,
REFIID riid, void **ppv)
{
WebBrowser *This = SERVPROV_THIS(iface);
if(IsEqualGUID(&IID_IHlinkFrame, guidService)) {
TRACE("(%p)->(IID_IHlinkFrame %s %p)\n", This, debugstr_guid(riid), ppv);
return IWebBrowser2_QueryInterface(WEBBROWSER(This), riid, ppv);
}
FIXME("(%p)->(%s %s %p)\n", This, debugstr_guid(guidService), debugstr_guid(riid), ppv);
return E_NOINTERFACE;
}
#undef SERVPROV_THIS
static const IServiceProviderVtbl ServiceProviderVtbl = {
ClServiceProvider_QueryInterface,
ClServiceProvider_AddRef,
ClServiceProvider_Release,
ClServiceProvider_QueryService
};
void WebBrowser_ClientSite_Init(WebBrowser *This) void WebBrowser_ClientSite_Init(WebBrowser *This)
{ {
This->lpOleClientSiteVtbl = &OleClientSiteVtbl; This->lpOleClientSiteVtbl = &OleClientSiteVtbl;
This->lpOleInPlaceSiteVtbl = &OleInPlaceSiteVtbl; This->lpOleInPlaceSiteVtbl = &OleInPlaceSiteVtbl;
This->lpOleDocumentSiteVtbl = &OleDocumentSiteVtbl; This->lpOleDocumentSiteVtbl = &OleDocumentSiteVtbl;
This->lpDispatchVtbl = &DispatchVtbl; This->lpDispatchVtbl = &DispatchVtbl;
This->lpClServiceProviderVtbl = &ServiceProviderVtbl;
This->view = NULL; This->view = NULL;
} }
......
...@@ -87,6 +87,7 @@ typedef struct { ...@@ -87,6 +87,7 @@ typedef struct {
const IOleDocumentSiteVtbl *lpOleDocumentSiteVtbl; const IOleDocumentSiteVtbl *lpOleDocumentSiteVtbl;
const IOleCommandTargetVtbl *lpClOleCommandTargetVtbl; const IOleCommandTargetVtbl *lpClOleCommandTargetVtbl;
const IDispatchVtbl *lpDispatchVtbl; const IDispatchVtbl *lpDispatchVtbl;
const IServiceProviderVtbl *lpClServiceProviderVtbl;
/* Interfaces of InPlaceFrame object */ /* Interfaces of InPlaceFrame object */
...@@ -145,6 +146,7 @@ typedef struct { ...@@ -145,6 +146,7 @@ typedef struct {
#define DOCSITE(x) ((IOleDocumentSite*) &(x)->lpOleDocumentSiteVtbl) #define DOCSITE(x) ((IOleDocumentSite*) &(x)->lpOleDocumentSiteVtbl)
#define CLOLECMD(x) ((IOleCommandTarget*) &(x)->lpClOleCommandTargetVtbl) #define CLOLECMD(x) ((IOleCommandTarget*) &(x)->lpClOleCommandTargetVtbl)
#define CLDISP(x) ((IDispatch*) &(x)->lpDispatchVtbl) #define CLDISP(x) ((IDispatch*) &(x)->lpDispatchVtbl)
#define CLSERVPROV(x) ((IServiceProvider*) &(x)->lpClServiceProviderVtbl)
#define INPLACEFRAME(x) ((IOleInPlaceFrame*) &(x)->lpOleInPlaceFrameVtbl) #define INPLACEFRAME(x) ((IOleInPlaceFrame*) &(x)->lpOleInPlaceFrameVtbl)
......
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