ieframe: Add ITargetFrame stub.
Signed-off-by: Piotr Caban <piotr@codeweavers.com> Signed-off-by: Jacek Caban <jacek@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
219716ee4e
commit
dfc60ddbc8
|
@ -668,6 +668,11 @@ static HRESULT WINAPI ClServiceProvider_QueryService(IServiceProvider *iface, RE
|
|||
return IWebBrowser2_QueryInterface(This->wb, riid, ppv);
|
||||
}
|
||||
|
||||
if(IsEqualGUID(&IID_ITargetFrame, guidService)) {
|
||||
TRACE("(%p)->(IID_ITargetFrame %s %p)\n", This, debugstr_guid(riid), ppv);
|
||||
return IWebBrowser2_QueryInterface(This->wb, riid, ppv);
|
||||
}
|
||||
|
||||
if(IsEqualGUID(&IID_IWebBrowserApp, guidService)) {
|
||||
TRACE("IWebBrowserApp service\n");
|
||||
return IWebBrowser2_QueryInterface(This->wb, riid, ppv);
|
||||
|
|
|
@ -55,6 +55,7 @@ typedef struct {
|
|||
|
||||
typedef struct {
|
||||
IHlinkFrame IHlinkFrame_iface;
|
||||
ITargetFrame ITargetFrame_iface;
|
||||
ITargetFrame2 ITargetFrame2_iface;
|
||||
ITargetFramePriv2 ITargetFramePriv2_iface;
|
||||
IWebBrowserPriv2IE9 IWebBrowserPriv2IE9_iface;
|
||||
|
|
|
@ -1241,6 +1241,149 @@ static const IHlinkFrameVtbl HlinkFrameVtbl = {
|
|||
HlinkFrame_UpdateHlink
|
||||
};
|
||||
|
||||
static inline HlinkFrame *impl_from_ITargetFrame(ITargetFrame *iface)
|
||||
{
|
||||
return CONTAINING_RECORD(iface, HlinkFrame, ITargetFrame_iface);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI TargetFrame_QueryInterface(ITargetFrame *iface, REFIID riid, void **ppv)
|
||||
{
|
||||
HlinkFrame *This = impl_from_ITargetFrame(iface);
|
||||
return IUnknown_QueryInterface(This->outer, riid, ppv);
|
||||
}
|
||||
|
||||
static ULONG WINAPI TargetFrame_AddRef(ITargetFrame *iface)
|
||||
{
|
||||
HlinkFrame *This = impl_from_ITargetFrame(iface);
|
||||
return IUnknown_AddRef(This->outer);
|
||||
}
|
||||
|
||||
static ULONG WINAPI TargetFrame_Release(ITargetFrame *iface)
|
||||
{
|
||||
HlinkFrame *This = impl_from_ITargetFrame(iface);
|
||||
return IUnknown_Release(This->outer);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI TargetFrame_SetFrameName(ITargetFrame *iface, LPCWSTR pszFrameName)
|
||||
{
|
||||
HlinkFrame *This = impl_from_ITargetFrame(iface);
|
||||
FIXME("(%p)->(%s)\n", This, debugstr_w(pszFrameName));
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI TargetFrame_GetFrameName(ITargetFrame *iface, LPWSTR *ppszFrameName)
|
||||
{
|
||||
HlinkFrame *This = impl_from_ITargetFrame(iface);
|
||||
FIXME("(%p)->(%p)\n", This, ppszFrameName);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI TargetFrame_GetParentFrame(ITargetFrame *iface, IUnknown **ppunkParent)
|
||||
{
|
||||
HlinkFrame *This = impl_from_ITargetFrame(iface);
|
||||
FIXME("(%p)->(%p)\n", This, ppunkParent);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI TargetFrame_FindFrame(ITargetFrame *iface, LPCWSTR pszTargetName,
|
||||
IUnknown *ppunkContextFrame, DWORD dwFlags, IUnknown **ppunkTargetFrame)
|
||||
{
|
||||
HlinkFrame *This = impl_from_ITargetFrame(iface);
|
||||
FIXME("(%p)->(%s %p %x %p)\n", This, debugstr_w(pszTargetName),
|
||||
ppunkContextFrame, dwFlags, ppunkTargetFrame);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI TargetFrame_SetFrameSrc(ITargetFrame *iface, LPCWSTR pszFrameSrc)
|
||||
{
|
||||
HlinkFrame *This = impl_from_ITargetFrame(iface);
|
||||
FIXME("(%p)->(%s)\n", This, debugstr_w(pszFrameSrc));
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI TargetFrame_GetFrameSrc(ITargetFrame *iface, LPWSTR *ppszFrameSrc)
|
||||
{
|
||||
HlinkFrame *This = impl_from_ITargetFrame(iface);
|
||||
FIXME("(%p)->(%p)\n", This, ppszFrameSrc);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI TargetFrame_GetFramesContainer(ITargetFrame *iface, IOleContainer **ppContainer)
|
||||
{
|
||||
HlinkFrame *This = impl_from_ITargetFrame(iface);
|
||||
FIXME("(%p)->(%p)\n", This, ppContainer);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI TargetFrame_SetFrameOptions(ITargetFrame *iface, DWORD dwFlags)
|
||||
{
|
||||
HlinkFrame *This = impl_from_ITargetFrame(iface);
|
||||
FIXME("(%p)->(%x)\n", This, dwFlags);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI TargetFrame_GetFrameOptions(ITargetFrame *iface, DWORD *pdwFlags)
|
||||
{
|
||||
HlinkFrame *This = impl_from_ITargetFrame(iface);
|
||||
FIXME("(%p)->(%p)\n", This, pdwFlags);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI TargetFrame_SetFrameMargins(ITargetFrame *iface, DWORD dwWidth, DWORD dwHeight)
|
||||
{
|
||||
HlinkFrame *This = impl_from_ITargetFrame(iface);
|
||||
FIXME("(%p)->(%d %d)\n", This, dwWidth, dwHeight);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI TargetFrame_GetFrameMargins(ITargetFrame *iface, DWORD *pdwWidth, DWORD *pdwHeight)
|
||||
{
|
||||
HlinkFrame *This = impl_from_ITargetFrame(iface);
|
||||
FIXME("(%p)->(%p %p)\n", This, pdwWidth, pdwHeight);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI TargetFrame_RemoteNavigate(ITargetFrame *iface, ULONG cLength, ULONG *pulData)
|
||||
{
|
||||
HlinkFrame *This = impl_from_ITargetFrame(iface);
|
||||
FIXME("(%p)->(%u %p)\n", This, cLength, pulData);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI TargetFrame_OnChildFrameActivate(ITargetFrame *iface, IUnknown *pUnkChildFrame)
|
||||
{
|
||||
HlinkFrame *This = impl_from_ITargetFrame(iface);
|
||||
FIXME("(%p)->(%p)\n", This, pUnkChildFrame);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI TargetFrame_OnChildFrameDeactivate(ITargetFrame *iface, IUnknown *pUnkChildFrame)
|
||||
{
|
||||
HlinkFrame *This = impl_from_ITargetFrame(iface);
|
||||
FIXME("(%p)->(%p)\n", This, pUnkChildFrame);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static const ITargetFrameVtbl TargetFrameVtbl = {
|
||||
TargetFrame_QueryInterface,
|
||||
TargetFrame_AddRef,
|
||||
TargetFrame_Release,
|
||||
TargetFrame_SetFrameName,
|
||||
TargetFrame_GetFrameName,
|
||||
TargetFrame_GetParentFrame,
|
||||
TargetFrame_FindFrame,
|
||||
TargetFrame_SetFrameSrc,
|
||||
TargetFrame_GetFrameSrc,
|
||||
TargetFrame_GetFramesContainer,
|
||||
TargetFrame_SetFrameOptions,
|
||||
TargetFrame_GetFrameOptions,
|
||||
TargetFrame_SetFrameMargins,
|
||||
TargetFrame_GetFrameMargins,
|
||||
TargetFrame_RemoteNavigate,
|
||||
TargetFrame_OnChildFrameActivate,
|
||||
TargetFrame_OnChildFrameDeactivate
|
||||
};
|
||||
|
||||
static inline HlinkFrame *impl_from_ITargetFrame2(ITargetFrame2 *iface)
|
||||
{
|
||||
return CONTAINING_RECORD(iface, HlinkFrame, ITargetFrame2_iface);
|
||||
|
@ -1517,6 +1660,9 @@ BOOL HlinkFrame_QI(HlinkFrame *This, REFIID riid, void **ppv)
|
|||
if(IsEqualGUID(&IID_IHlinkFrame, riid)) {
|
||||
TRACE("(%p)->(IID_IHlinkFrame %p)\n", This, ppv);
|
||||
*ppv = &This->IHlinkFrame_iface;
|
||||
}else if(IsEqualGUID(&IID_ITargetFrame, riid)) {
|
||||
TRACE("(%p)->(IID_ITargetFrame %p)\n", This, ppv);
|
||||
*ppv = &This->ITargetFrame_iface;
|
||||
}else if(IsEqualGUID(&IID_ITargetFrame2, riid)) {
|
||||
TRACE("(%p)->(IID_ITargetFrame2 %p)\n", This, ppv);
|
||||
*ppv = &This->ITargetFrame2_iface;
|
||||
|
@ -1539,7 +1685,8 @@ BOOL HlinkFrame_QI(HlinkFrame *This, REFIID riid, void **ppv)
|
|||
|
||||
void HlinkFrame_Init(HlinkFrame *This, IUnknown *outer, DocHost *doc_host)
|
||||
{
|
||||
This->IHlinkFrame_iface.lpVtbl = &HlinkFrameVtbl;
|
||||
This->IHlinkFrame_iface.lpVtbl = &HlinkFrameVtbl;
|
||||
This->ITargetFrame_iface.lpVtbl = &TargetFrameVtbl;
|
||||
This->ITargetFrame2_iface.lpVtbl = &TargetFrame2Vtbl;
|
||||
This->ITargetFramePriv2_iface.lpVtbl = &TargetFramePriv2Vtbl;
|
||||
This->IWebBrowserPriv2IE9_iface.lpVtbl = &WebBrowserPriv2IE9Vtbl;
|
||||
|
|
|
@ -29,6 +29,7 @@
|
|||
#include "ole2.h"
|
||||
#include "exdisp.h"
|
||||
#include "htiframe.h"
|
||||
#include "htiface.h"
|
||||
#include "mshtmhst.h"
|
||||
#include "mshtmcid.h"
|
||||
#include "mshtml.h"
|
||||
|
@ -3547,6 +3548,11 @@ static void test_dochost_qs(IWebBrowser2 *webbrowser)
|
|||
ok(iface_cmp(service, (IUnknown*)webbrowser), "service != unk\n");
|
||||
IUnknown_Release(service);
|
||||
|
||||
hres = IServiceProvider_QueryService(serv_prov, &IID_ITargetFrame, &IID_ITargetFrame, (void**)&service);
|
||||
ok(hres == S_OK, "QueryService failed: %08x\n", hres);
|
||||
ok(iface_cmp(service, (IUnknown*)webbrowser), "service != unk\n");
|
||||
IUnknown_Release(service);
|
||||
|
||||
hres = IServiceProvider_QueryService(serv_prov, &IID_IShellBrowser, &IID_IShellBrowser, (void**)&service);
|
||||
ok(hres == S_OK, "QueryService failed: %08x\n", hres);
|
||||
IUnknown_Release(service);
|
||||
|
|
Loading…
Reference in New Issue