Commit 86163e7a authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

shdocvw: Added WebBrowser v1 implementation.

parent c0d1f91a
......@@ -124,7 +124,8 @@ HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, void **ppv)
{
HRESULT hres;
static IClassFactoryImpl WBClassFactory = {&WBCF_Vtbl, WebBrowser_Create};
static IClassFactoryImpl WB1ClassFactory = {&WBCF_Vtbl, WebBrowserV1_Create};
static IClassFactoryImpl WB2ClassFactory = {&WBCF_Vtbl, WebBrowserV2_Create};
TRACE("\n");
......@@ -132,9 +133,13 @@ HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, void **ppv)
hres = create_mozctl(riid, ppv);
if(SUCCEEDED(hres))
return hres;
return IClassFactory_QueryInterface(FACTORY(&WBClassFactory), riid, ppv);
return IClassFactory_QueryInterface(FACTORY(&WB2ClassFactory), riid, ppv);
}
if(IsEqualGUID(&CLSID_WebBrowser_V1, rclsid))
return IClassFactory_QueryInterface(FACTORY(&WB1ClassFactory), riid, ppv);
/* As a last resort, figure if the CLSID belongs to a 'Shell Instance Object' */
return SHDOCVW_GetShellInstanceObjectClassObject(rclsid, riid, ppv);
}
......
......@@ -104,6 +104,8 @@ typedef struct {
LONG ref;
INT version;
IOleClientSite *client;
IOleContainer *container;
IOleInPlaceSite *inplace;
......@@ -182,7 +184,8 @@ void DocHost_ClientSite_Release(DocHost*);
void ConnectionPointContainer_Init(ConnectionPointContainer*,IUnknown*);
void ConnectionPointContainer_Destroy(ConnectionPointContainer*);
HRESULT WebBrowser_Create(IUnknown*,REFIID,void**);
HRESULT WebBrowserV1_Create(IUnknown*,REFIID,void**);
HRESULT WebBrowserV2_Create(IUnknown*,REFIID,void**);
void create_doc_view_hwnd(DocHost*);
void deactivate_document(DocHost*);
......
......@@ -918,7 +918,7 @@ static const IWebBrowser2Vtbl WebBrowser2Vtbl =
WebBrowser_put_Resizable
};
HRESULT WebBrowser_Create(IUnknown *pOuter, REFIID riid, void **ppv)
static HRESULT WebBrowser_Create(INT version, IUnknown *pOuter, REFIID riid, void **ppv)
{
WebBrowser *ret;
HRESULT hres;
......@@ -929,6 +929,7 @@ HRESULT WebBrowser_Create(IUnknown *pOuter, REFIID riid, void **ppv)
ret->lpWebBrowser2Vtbl = &WebBrowser2Vtbl;
ret->ref = 0;
ret->version = version;
DocHost_Init(&ret->doc_host, (IDispatch*)WEBBROWSER2(ret));
......@@ -954,3 +955,13 @@ HRESULT WebBrowser_Create(IUnknown *pOuter, REFIID riid, void **ppv)
return hres;
}
HRESULT WebBrowserV1_Create(IUnknown *pOuter, REFIID riid, void **ppv)
{
return WebBrowser_Create(1, pOuter, riid, ppv);
}
HRESULT WebBrowserV2_Create(IUnknown *pOuter, REFIID riid, void **ppv)
{
return WebBrowser_Create(2, pOuter, 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