shdocvw: Moved ITargetFrame2 implementation to HlinkFrame object.
This commit is contained in:
parent
df2689d252
commit
9068b3fb23
|
@ -979,106 +979,106 @@ static const IHlinkFrameVtbl HlinkFrameVtbl = {
|
|||
HlinkFrame_UpdateHlink
|
||||
};
|
||||
|
||||
#define TARGETFRAME2_THIS(iface) DEFINE_THIS(WebBrowser, ITargetFrame2, iface)
|
||||
#define TARGETFRAME2_THIS(iface) DEFINE_THIS(HlinkFrame, ITargetFrame2, iface)
|
||||
|
||||
static HRESULT WINAPI TargetFrame2_QueryInterface(ITargetFrame2 *iface, REFIID riid, void **ppv)
|
||||
{
|
||||
WebBrowser *This = TARGETFRAME2_THIS(iface);
|
||||
return IWebBrowser2_QueryInterface(WEBBROWSER2(This), riid, ppv);
|
||||
HlinkFrame *This = TARGETFRAME2_THIS(iface);
|
||||
return IUnknown_QueryInterface(This->outer, riid, ppv);
|
||||
}
|
||||
|
||||
static ULONG WINAPI TargetFrame2_AddRef(ITargetFrame2 *iface)
|
||||
{
|
||||
WebBrowser *This = TARGETFRAME2_THIS(iface);
|
||||
return IWebBrowser2_AddRef(WEBBROWSER2(This));
|
||||
HlinkFrame *This = TARGETFRAME2_THIS(iface);
|
||||
return IUnknown_AddRef(This->outer);
|
||||
}
|
||||
|
||||
static ULONG WINAPI TargetFrame2_Release(ITargetFrame2 *iface)
|
||||
{
|
||||
WebBrowser *This = TARGETFRAME2_THIS(iface);
|
||||
return IWebBrowser2_Release(WEBBROWSER2(This));
|
||||
HlinkFrame *This = TARGETFRAME2_THIS(iface);
|
||||
return IUnknown_Release(This->outer);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI TargetFrame2_SetFrameName(ITargetFrame2 *iface, LPCWSTR pszFrameName)
|
||||
{
|
||||
WebBrowser *This = TARGETFRAME2_THIS(iface);
|
||||
HlinkFrame *This = TARGETFRAME2_THIS(iface);
|
||||
FIXME("(%p)->(%s)\n", This, debugstr_w(pszFrameName));
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI TargetFrame2_GetFrameName(ITargetFrame2 *iface, LPWSTR *ppszFrameName)
|
||||
{
|
||||
WebBrowser *This = TARGETFRAME2_THIS(iface);
|
||||
HlinkFrame *This = TARGETFRAME2_THIS(iface);
|
||||
FIXME("(%p)->(%p)\n", This, ppszFrameName);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI TargetFrame2_GetParentFrame(ITargetFrame2 *iface, IUnknown **ppunkParent)
|
||||
{
|
||||
WebBrowser *This = TARGETFRAME2_THIS(iface);
|
||||
HlinkFrame *This = TARGETFRAME2_THIS(iface);
|
||||
FIXME("(%p)->(%p)\n", This, ppunkParent);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI TargetFrame2_SetFrameSrc(ITargetFrame2 *iface, LPCWSTR pszFrameSrc)
|
||||
{
|
||||
WebBrowser *This = TARGETFRAME2_THIS(iface);
|
||||
HlinkFrame *This = TARGETFRAME2_THIS(iface);
|
||||
FIXME("(%p)->(%s)\n", This, debugstr_w(pszFrameSrc));
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI TargetFrame2_GetFrameSrc(ITargetFrame2 *iface, LPWSTR *ppszFrameSrc)
|
||||
{
|
||||
WebBrowser *This = TARGETFRAME2_THIS(iface);
|
||||
HlinkFrame *This = TARGETFRAME2_THIS(iface);
|
||||
FIXME("(%p)->()\n", This);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI TargetFrame2_GetFramesContainer(ITargetFrame2 *iface, IOleContainer **ppContainer)
|
||||
{
|
||||
WebBrowser *This = TARGETFRAME2_THIS(iface);
|
||||
HlinkFrame *This = TARGETFRAME2_THIS(iface);
|
||||
FIXME("(%p)->(%p)\n", This, ppContainer);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI TargetFrame2_SetFrameOptions(ITargetFrame2 *iface, DWORD dwFlags)
|
||||
{
|
||||
WebBrowser *This = TARGETFRAME2_THIS(iface);
|
||||
HlinkFrame *This = TARGETFRAME2_THIS(iface);
|
||||
FIXME("(%p)->(%x)\n", This, dwFlags);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI TargetFrame2_GetFrameOptions(ITargetFrame2 *iface, DWORD *pdwFlags)
|
||||
{
|
||||
WebBrowser *This = TARGETFRAME2_THIS(iface);
|
||||
HlinkFrame *This = TARGETFRAME2_THIS(iface);
|
||||
FIXME("(%p)->(%p)\n", This, pdwFlags);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI TargetFrame2_SetFrameMargins(ITargetFrame2 *iface, DWORD dwWidth, DWORD dwHeight)
|
||||
{
|
||||
WebBrowser *This = TARGETFRAME2_THIS(iface);
|
||||
HlinkFrame *This = TARGETFRAME2_THIS(iface);
|
||||
FIXME("(%p)->(%d %d)\n", This, dwWidth, dwHeight);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI TargetFrame2_GetFrameMargins(ITargetFrame2 *iface, DWORD *pdwWidth, DWORD *pdwHeight)
|
||||
{
|
||||
WebBrowser *This = TARGETFRAME2_THIS(iface);
|
||||
HlinkFrame *This = TARGETFRAME2_THIS(iface);
|
||||
FIXME("(%p)->(%p %p)\n", This, pdwWidth, pdwHeight);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI TargetFrame2_FindFrame(ITargetFrame2 *iface, LPCWSTR pszTargetName, DWORD dwFlags, IUnknown **ppunkTargetFrame)
|
||||
{
|
||||
WebBrowser *This = TARGETFRAME2_THIS(iface);
|
||||
HlinkFrame *This = TARGETFRAME2_THIS(iface);
|
||||
FIXME("(%p)->(%s %x %p)\n", This, debugstr_w(pszTargetName), dwFlags, ppunkTargetFrame);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI TargetFrame2_GetTargetAlias(ITargetFrame2 *iface, LPCWSTR pszTargetName, LPWSTR *ppszTargetAlias)
|
||||
{
|
||||
WebBrowser *This = TARGETFRAME2_THIS(iface);
|
||||
HlinkFrame *This = TARGETFRAME2_THIS(iface);
|
||||
FIXME("(%p)->(%s %p)\n", This, debugstr_w(pszTargetName), ppszTargetAlias);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
@ -1108,6 +1108,9 @@ BOOL HlinkFrame_QI(HlinkFrame *This, REFIID riid, void **ppv)
|
|||
if(IsEqualGUID(&IID_IHlinkFrame, riid)) {
|
||||
TRACE("(%p)->(IID_IHlinkFrame %p)\n", This, ppv);
|
||||
*ppv = HLINKFRAME(This);
|
||||
}else if(IsEqualGUID(&IID_ITargetFrame2, riid)) {
|
||||
TRACE("(%p)->(IID_ITargetFrame2 %p)\n", This, ppv);
|
||||
*ppv = TARGETFRAME2(This);
|
||||
}else {
|
||||
return FALSE;
|
||||
}
|
||||
|
@ -1119,12 +1122,8 @@ BOOL HlinkFrame_QI(HlinkFrame *This, REFIID riid, void **ppv)
|
|||
void HlinkFrame_Init(HlinkFrame *This, IUnknown *outer, DocHost *doc_host)
|
||||
{
|
||||
This->lpIHlinkFrameVtbl = &HlinkFrameVtbl;
|
||||
This->lpITargetFrame2Vtbl = &TargetFrame2Vtbl;
|
||||
|
||||
This->outer = outer;
|
||||
This->doc_host = doc_host;
|
||||
}
|
||||
|
||||
void WebBrowser_HlinkFrame_Init(WebBrowser *This)
|
||||
{
|
||||
This->lpITargetFrame2Vtbl = &TargetFrame2Vtbl;
|
||||
}
|
||||
|
|
|
@ -68,6 +68,7 @@ typedef struct {
|
|||
|
||||
typedef struct {
|
||||
const IHlinkFrameVtbl *lpIHlinkFrameVtbl;
|
||||
const ITargetFrame2Vtbl *lpITargetFrame2Vtbl;
|
||||
|
||||
IUnknown *outer;
|
||||
DocHost *doc_host;
|
||||
|
@ -135,7 +136,6 @@ struct WebBrowser {
|
|||
const IViewObject2Vtbl *lpViewObjectVtbl;
|
||||
const IOleInPlaceActiveObjectVtbl *lpOleInPlaceActiveObjectVtbl;
|
||||
const IOleCommandTargetVtbl *lpOleCommandTargetVtbl;
|
||||
const ITargetFrame2Vtbl *lpITargetFrame2Vtbl;
|
||||
const IServiceProviderVtbl *lpServiceProviderVtbl;
|
||||
const IDataObjectVtbl *lpDataObjectVtbl;
|
||||
HlinkFrame hlink_frame;
|
||||
|
@ -196,7 +196,6 @@ struct InternetExplorer {
|
|||
#define ACTIVEOBJ(x) ((IOleInPlaceActiveObject*) &(x)->lpOleInPlaceActiveObjectVtbl)
|
||||
#define OLECMD(x) ((IOleCommandTarget*) &(x)->lpOleCommandTargetVtbl)
|
||||
#define DATAOBJECT(x) ((IDataObject*) &(x)->lpDataObjectVtbl)
|
||||
#define TARGETFRAME2(x) ((ITargetFrame2*) &(x)->lpITargetFrame2Vtbl)
|
||||
|
||||
#define CLIENTSITE(x) ((IOleClientSite*) &(x)->lpOleClientSiteVtbl)
|
||||
#define INPLACESITE(x) ((IOleInPlaceSite*) &(x)->lpOleInPlaceSiteVtbl)
|
||||
|
@ -210,13 +209,13 @@ struct InternetExplorer {
|
|||
#define INPLACEFRAME(x) ((IOleInPlaceFrame*) &(x)->lpOleInPlaceFrameVtbl)
|
||||
|
||||
#define HLINKFRAME(x) ((IHlinkFrame*) &(x)->lpIHlinkFrameVtbl)
|
||||
#define TARGETFRAME2(x) ((ITargetFrame2*) &(x)->lpITargetFrame2Vtbl)
|
||||
|
||||
void WebBrowser_OleObject_Init(WebBrowser*);
|
||||
void WebBrowser_ViewObject_Init(WebBrowser*);
|
||||
void WebBrowser_DataObject_Init(WebBrowser*);
|
||||
void WebBrowser_Persist_Init(WebBrowser*);
|
||||
void WebBrowser_ClassInfo_Init(WebBrowser*);
|
||||
void WebBrowser_HlinkFrame_Init(WebBrowser*);
|
||||
|
||||
void WebBrowser_OleObject_Destroy(WebBrowser*);
|
||||
|
||||
|
|
|
@ -100,9 +100,6 @@ static HRESULT WINAPI WebBrowser_QueryInterface(IWebBrowser2 *iface, REFIID riid
|
|||
}else if(IsEqualGUID(&IID_IOleCommandTarget, riid)) {
|
||||
TRACE("(%p)->(IID_IOleCommandTarget %p)\n", This, ppv);
|
||||
*ppv = OLECMD(This);
|
||||
}else if(IsEqualGUID(&IID_ITargetFrame2, riid)) {
|
||||
TRACE("(%p)->(IID_ITargetFrame2 %p)\n", This, ppv);
|
||||
*ppv = TARGETFRAME2(This);
|
||||
}else if(IsEqualGUID(&IID_IServiceProvider, riid)) {
|
||||
*ppv = SERVPROV(This);
|
||||
TRACE("(%p)->(IID_IServiceProvider %p)\n", This, ppv);
|
||||
|
@ -1156,7 +1153,6 @@ static HRESULT WebBrowser_Create(INT version, IUnknown *pOuter, REFIID riid, voi
|
|||
WebBrowser_DataObject_Init(ret);
|
||||
WebBrowser_Persist_Init(ret);
|
||||
WebBrowser_ClassInfo_Init(ret);
|
||||
WebBrowser_HlinkFrame_Init(ret);
|
||||
|
||||
HlinkFrame_Init(&ret->hlink_frame, (IUnknown*)WEBBROWSER2(ret), &ret->doc_host);
|
||||
|
||||
|
|
Loading…
Reference in New Issue