Jacek Caban : mshtml: Added support for plugin in place activation.
Alexandre Julliard
julliard at winehq.org
Mon Dec 13 10:43:21 CST 2010
Module: wine
Branch: master
Commit: c65f4c495684380d67ff169ddade3f57b9d7cd69
URL: http://source.winehq.org/git/wine.git/?a=commit;h=c65f4c495684380d67ff169ddade3f57b9d7cd69
Author: Jacek Caban <jacek at codeweavers.com>
Date: Mon Dec 13 16:00:29 2010 +0100
mshtml: Added support for plugin in place activation.
---
dlls/mshtml/pluginhost.c | 28 ++++++++++++++++++++++++----
dlls/mshtml/pluginhost.h | 1 +
2 files changed, 25 insertions(+), 4 deletions(-)
diff --git a/dlls/mshtml/pluginhost.c b/dlls/mshtml/pluginhost.c
index 5b8ab71..8a7e2a6 100644
--- a/dlls/mshtml/pluginhost.c
+++ b/dlls/mshtml/pluginhost.c
@@ -298,6 +298,8 @@ static ULONG WINAPI PHClientSite_Release(IOleClientSite *iface)
TRACE("(%p) ref=%d\n", This, ref);
if(!ref) {
+ if(This->ip_object)
+ IOleInPlaceObject_Release(This->ip_object);
list_remove(&This->entry);
if(This->element)
This->element->plugin_host = NULL;
@@ -351,8 +353,10 @@ static HRESULT WINAPI PHClientSite_GetContainer(IOleClientSite *iface, IOleConta
static HRESULT WINAPI PHClientSite_ShowObject(IOleClientSite *iface)
{
PluginHost *This = impl_from_IOleClientSite(iface);
- FIXME("(%p)\n", This);
- return E_NOTIMPL;
+
+ TRACE("(%p)\n", This);
+
+ return S_OK;
}
static HRESULT WINAPI PHClientSite_OnShowWindow(IOleClientSite *iface, BOOL fShow)
@@ -684,8 +688,24 @@ static HRESULT WINAPI PHInPlaceSite_OnPosRectChange(IOleInPlaceSiteEx *iface, LP
static HRESULT WINAPI PHInPlaceSiteEx_OnInPlaceActivateEx(IOleInPlaceSiteEx *iface, BOOL *pfNoRedraw, DWORD dwFlags)
{
PluginHost *This = impl_from_IOleInPlaceSiteEx(iface);
- FIXME("(%p)->(%p %x)\n", This, pfNoRedraw, dwFlags);
- return E_NOTIMPL;
+ HWND hwnd;
+ HRESULT hres;
+
+ TRACE("(%p)->(%p %x)\n", This, pfNoRedraw, dwFlags);
+
+ if(This->ip_object)
+ return S_OK;
+
+ hres = IUnknown_QueryInterface(This->plugin_unk, &IID_IOleInPlaceObject, (void**)&This->ip_object);
+ if(FAILED(hres))
+ return hres;
+
+ hres = IOleInPlaceObject_GetWindow(This->ip_object, &hwnd);
+ if(SUCCEEDED(hres))
+ FIXME("Use hwnd %p\n", hwnd);
+
+ *pfNoRedraw = FALSE;
+ return S_OK;
}
static HRESULT WINAPI PHInPlaceSiteEx_OnInPlaceDeactivateEx(IOleInPlaceSiteEx *iface, BOOL fNoRedraw)
diff --git a/dlls/mshtml/pluginhost.h b/dlls/mshtml/pluginhost.h
index ee1fed6..30af989 100644
--- a/dlls/mshtml/pluginhost.h
+++ b/dlls/mshtml/pluginhost.h
@@ -31,6 +31,7 @@ typedef struct {
LONG ref;
IUnknown *plugin_unk;
+ IOleInPlaceObject *ip_object;
CLSID clsid;
HWND hwnd;
RECT rect;
More information about the wine-cvs
mailing list