Commit 9c3c5704 authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

ieframe: Added IWebBrowser2::Refresh implementation.

parent d22a8bbd
......@@ -453,6 +453,32 @@ void deactivate_document(DocHost *This)
This->document = NULL;
}
HRESULT refresh_document(DocHost *This)
{
IOleCommandTarget *cmdtrg;
VARIANT vin, vout;
HRESULT hres;
if(!This->document) {
FIXME("no document\n");
return E_FAIL;
}
hres = IUnknown_QueryInterface(This->document, &IID_IOleCommandTarget, (void**)&cmdtrg);
if(FAILED(hres))
return hres;
V_VT(&vin) = VT_EMPTY;
V_VT(&vout) = VT_EMPTY;
hres = IOleCommandTarget_Exec(cmdtrg, NULL, OLECMDID_REFRESH, OLECMDEXECOPT_PROMPTUSER, &vin, &vout);
IOleCommandTarget_Release(cmdtrg);
if(FAILED(hres))
return hres;
VariantClear(&vout);
return S_OK;
}
void release_dochost_client(DocHost *This)
{
if(This->hwnd) {
......
......@@ -182,8 +182,10 @@ static HRESULT WINAPI InternetExplorer_Navigate(IWebBrowser2 *iface, BSTR szUrl,
static HRESULT WINAPI InternetExplorer_Refresh(IWebBrowser2 *iface)
{
InternetExplorer *This = impl_from_IWebBrowser2(iface);
FIXME("(%p)\n", This);
return E_NOTIMPL;
TRACE("(%p)\n", This);
return refresh_document(&This->doc_host->doc_host);
}
static HRESULT WINAPI InternetExplorer_Refresh2(IWebBrowser2 *iface, VARIANT *Level)
......
......@@ -265,6 +265,7 @@ void call_sink(ConnectionPoint*,DISPID,DISPPARAMS*) DECLSPEC_HIDDEN;
HRESULT navigate_url(DocHost*,LPCWSTR,const VARIANT*,const VARIANT*,VARIANT*,VARIANT*) DECLSPEC_HIDDEN;
HRESULT go_home(DocHost*) DECLSPEC_HIDDEN;
HRESULT go_back(DocHost*) DECLSPEC_HIDDEN;
HRESULT refresh_document(DocHost*) DECLSPEC_HIDDEN;
HRESULT get_location_url(DocHost*,BSTR*) DECLSPEC_HIDDEN;
HRESULT set_dochost_url(DocHost*,const WCHAR*) DECLSPEC_HIDDEN;
void handle_navigation_error(DocHost*,HRESULT,BSTR,IHTMLWindow2*) DECLSPEC_HIDDEN;
......
......@@ -292,8 +292,10 @@ static HRESULT WINAPI WebBrowser_Navigate(IWebBrowser2 *iface, BSTR szUrl,
static HRESULT WINAPI WebBrowser_Refresh(IWebBrowser2 *iface)
{
WebBrowser *This = impl_from_IWebBrowser2(iface);
FIXME("(%p)\n", This);
return E_NOTIMPL;
TRACE("(%p)\n", This);
return refresh_document(&This->doc_host);
}
static HRESULT WINAPI WebBrowser_Refresh2(IWebBrowser2 *iface, VARIANT *Level)
......
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