Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
5d0df14e
Commit
5d0df14e
authored
Dec 06, 2010
by
Jacek Caban
Committed by
Alexandre Julliard
Dec 06, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Added plugin host's IOleClientSite stub implementation.
parent
81233042
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
212 additions
and
3 deletions
+212
-3
Makefile.in
dlls/mshtml/Makefile.in
+1
-0
npplugin.c
dlls/mshtml/npplugin.c
+20
-3
pluginhost.c
dlls/mshtml/pluginhost.c
+162
-0
pluginhost.h
dlls/mshtml/pluginhost.h
+29
-0
No files found.
dlls/mshtml/Makefile.in
View file @
5d0df14e
...
...
@@ -62,6 +62,7 @@ C_SRCS = \
olewnd.c
\
omnavigator.c
\
persist.c
\
pluginhost.c
\
protocol.c
\
script.c
\
secmgr.c
\
...
...
dlls/mshtml/npplugin.c
View file @
5d0df14e
...
...
@@ -29,6 +29,7 @@
#include "shlobj.h"
#include "mshtml_private.h"
#include "pluginhost.h"
#include "wine/debug.h"
#include "wine/unicode.h"
...
...
@@ -268,8 +269,16 @@ static NPError CDECL NPP_New(NPMIMEType pluginType, NPP instance, UINT16 mode, I
obj
=
create_activex_object
(
window
,
nselem
);
if
(
obj
)
{
FIXME
(
"Embed objet %p
\n
"
,
obj
);
PluginHost
*
host
;
HRESULT
hres
;
hres
=
create_plugin_host
(
obj
,
&
host
);
nsIDOMElement_Release
(
nselem
);
IUnknown_Release
(
obj
);
if
(
SUCCEEDED
(
hres
))
instance
->
pdata
=
host
;
else
err
=
NPERR_GENERIC_ERROR
;
}
else
{
err
=
NPERR_GENERIC_ERROR
;
}
...
...
@@ -280,8 +289,16 @@ static NPError CDECL NPP_New(NPMIMEType pluginType, NPP instance, UINT16 mode, I
static
NPError
CDECL
NPP_Destroy
(
NPP
instance
,
NPSavedData
**
save
)
{
FIXME
(
"(%p %p)
\n
"
,
instance
,
save
);
return
NPERR_GENERIC_ERROR
;
PluginHost
*
host
=
instance
->
pdata
;
TRACE
(
"(%p %p)
\n
"
,
instance
,
save
);
if
(
!
host
)
return
NPERR_GENERIC_ERROR
;
IOleClientSite_Release
(
&
host
->
IOleClientSite_iface
);
instance
->
pdata
=
NULL
;
return
NPERR_NO_ERROR
;
}
static
NPError
CDECL
NPP_SetWindow
(
NPP
instance
,
NPWindow
*
window
)
...
...
dlls/mshtml/pluginhost.c
0 → 100644
View file @
5d0df14e
/*
* Copyright 2010 Jacek Caban for CodeWeavers
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include "config.h"
#include <stdarg.h>
#define COBJMACROS
#include "windef.h"
#include "winbase.h"
#include "winuser.h"
#include "ole2.h"
#include "shlobj.h"
#include "mshtml_private.h"
#include "pluginhost.h"
#include "wine/debug.h"
#include "wine/unicode.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
mshtml
);
static
inline
PluginHost
*
impl_from_IOleClientSite
(
IOleClientSite
*
iface
)
{
return
CONTAINING_RECORD
(
iface
,
PluginHost
,
IOleClientSite_iface
);
}
static
HRESULT
WINAPI
PHClientSite_QueryInterface
(
IOleClientSite
*
iface
,
REFIID
riid
,
void
**
ppv
)
{
PluginHost
*
This
=
impl_from_IOleClientSite
(
iface
);
if
(
IsEqualGUID
(
&
IID_IUnknown
,
riid
))
{
TRACE
(
"(%p)->(IID_IUnknown %p)
\n
"
,
This
,
ppv
);
*
ppv
=
&
This
->
IOleClientSite_iface
;
}
else
if
(
IsEqualGUID
(
&
IID_IOleClientSite
,
riid
))
{
TRACE
(
"(%p)->(IID_IOleClientSite %p)
\n
"
,
This
,
ppv
);
*
ppv
=
&
This
->
IOleClientSite_iface
;
}
else
{
WARN
(
"Unsupported interface %s
\n
"
,
debugstr_guid
(
riid
));
*
ppv
=
NULL
;
return
E_NOINTERFACE
;
}
IOleClientSite_AddRef
((
IUnknown
*
)
*
ppv
);
return
S_OK
;
}
static
ULONG
WINAPI
PHClientSite_AddRef
(
IOleClientSite
*
iface
)
{
PluginHost
*
This
=
impl_from_IOleClientSite
(
iface
);
LONG
ref
=
InterlockedIncrement
(
&
This
->
ref
);
TRACE
(
"(%p) ref=%d
\n
"
,
This
,
ref
);
return
ref
;
}
static
ULONG
WINAPI
PHClientSite_Release
(
IOleClientSite
*
iface
)
{
PluginHost
*
This
=
impl_from_IOleClientSite
(
iface
);
LONG
ref
=
InterlockedDecrement
(
&
This
->
ref
);
TRACE
(
"(%p) ref=%d
\n
"
,
This
,
ref
);
if
(
!
ref
)
{
if
(
This
->
plugin_unk
)
IUnknown_Release
(
This
->
plugin_unk
);
heap_free
(
This
);
}
return
ref
;
}
static
HRESULT
WINAPI
PHClientSite_SaveObject
(
IOleClientSite
*
iface
)
{
PluginHost
*
This
=
impl_from_IOleClientSite
(
iface
);
FIXME
(
"(%p)
\n
"
,
This
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
PHClientSite_GetMoniker
(
IOleClientSite
*
iface
,
DWORD
dwAssign
,
DWORD
dwWhichMoniker
,
IMoniker
**
ppmk
)
{
PluginHost
*
This
=
impl_from_IOleClientSite
(
iface
);
FIXME
(
"(%p)->(%d %d %p)
\n
"
,
This
,
dwAssign
,
dwWhichMoniker
,
ppmk
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
PHClientSite_GetContainer
(
IOleClientSite
*
iface
,
IOleContainer
**
ppContainer
)
{
PluginHost
*
This
=
impl_from_IOleClientSite
(
iface
);
FIXME
(
"(%p)->(%p)
\n
"
,
This
,
ppContainer
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
PHClientSite_ShowObject
(
IOleClientSite
*
iface
)
{
PluginHost
*
This
=
impl_from_IOleClientSite
(
iface
);
FIXME
(
"(%p)
\n
"
,
This
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
PHClientSite_OnShowWindow
(
IOleClientSite
*
iface
,
BOOL
fShow
)
{
PluginHost
*
This
=
impl_from_IOleClientSite
(
iface
);
FIXME
(
"(%p)->(%x)
\n
"
,
This
,
fShow
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
PHClientSite_RequestNewObjectLayout
(
IOleClientSite
*
iface
)
{
PluginHost
*
This
=
impl_from_IOleClientSite
(
iface
);
FIXME
(
"(%p)
\n
"
,
This
);
return
E_NOTIMPL
;
}
static
const
IOleClientSiteVtbl
OleClientSiteVtbl
=
{
PHClientSite_QueryInterface
,
PHClientSite_AddRef
,
PHClientSite_Release
,
PHClientSite_SaveObject
,
PHClientSite_GetMoniker
,
PHClientSite_GetContainer
,
PHClientSite_ShowObject
,
PHClientSite_OnShowWindow
,
PHClientSite_RequestNewObjectLayout
};
HRESULT
create_plugin_host
(
IUnknown
*
unk
,
PluginHost
**
ret
)
{
PluginHost
*
host
;
host
=
heap_alloc_zero
(
sizeof
(
*
host
));
if
(
!
host
)
return
E_OUTOFMEMORY
;
host
->
IOleClientSite_iface
.
lpVtbl
=
&
OleClientSiteVtbl
;
host
->
ref
=
1
;
IUnknown_AddRef
(
unk
);
host
->
plugin_unk
=
unk
;
*
ret
=
host
;
return
S_OK
;
}
dlls/mshtml/pluginhost.h
0 → 100644
View file @
5d0df14e
/*
* Copyright 2010 Jacek Caban for CodeWeavers
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
typedef
struct
HTMLObjectElement
HTMLObjectElement
;
typedef
struct
{
IOleClientSite
IOleClientSite_iface
;
LONG
ref
;
IUnknown
*
plugin_unk
;
}
PluginHost
;
HRESULT
create_plugin_host
(
IUnknown
*
,
PluginHost
**
);
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment