Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
61560b87
Commit
61560b87
authored
Apr 18, 2006
by
Jacek Caban
Committed by
Alexandre Julliard
Apr 18, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
shdocvw: Move connection points to DocHost object.
parent
22b6d548
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
52 additions
and
34 deletions
+52
-34
client.c
dlls/shdocvw/client.c
+3
-3
dochost.c
dlls/shdocvw/dochost.c
+9
-2
events.c
dlls/shdocvw/events.c
+25
-16
navigate.c
dlls/shdocvw/navigate.c
+1
-1
shdocvw.h
dlls/shdocvw/shdocvw.h
+12
-10
webbrowser.c
dlls/shdocvw/webbrowser.c
+2
-2
No files found.
dlls/shdocvw/client.c
View file @
61560b87
...
...
@@ -475,8 +475,8 @@ void DocHost_ClientSite_Init(DocHost *This)
This
->
view
=
NULL
;
}
void
WebBrowser_ClientSite_Destroy
(
WebBrowser
*
This
)
void
DocHost_ClientSite_Release
(
DocHost
*
This
)
{
if
(
This
->
doc_host
.
view
)
IOleDocumentView_Release
(
This
->
doc_host
.
view
);
if
(
This
->
view
)
IOleDocumentView_Release
(
This
->
view
);
}
dlls/shdocvw/dochost.c
View file @
61560b87
...
...
@@ -51,8 +51,8 @@ static void navigate_complete(WebBrowser *This)
V_VT
(
&
url
)
=
VT_BSTR
;
V_BSTR
(
&
url
)
=
This
->
url
;
call_sink
(
This
->
cp_wbe2
,
DISPID_NAVIGATECOMPLETE2
,
&
dispparams
);
call_sink
(
This
->
cp_wbe2
,
DISPID_DOCUMENTCOMPLETE
,
&
dispparams
);
call_sink
(
This
->
doc_host
.
cp_wbe2
,
DISPID_NAVIGATECOMPLETE2
,
&
dispparams
);
call_sink
(
This
->
doc_host
.
cp_wbe2
,
DISPID_DOCUMENTCOMPLETE
,
&
dispparams
);
if
(
disp
)
IDispatch_Release
(
disp
);
...
...
@@ -491,4 +491,11 @@ void DocHost_Init(DocHost *This)
DocHost_ClientSite_Init
(
This
);
DocHost_Frame_Init
(
This
);
DocHost_Events_Init
(
This
);
}
void
DocHost_Release
(
DocHost
*
This
)
{
DocHost_ClientSite_Release
(
This
);
DocHost_Events_Release
(
This
);
}
dlls/shdocvw/events.c
View file @
61560b87
...
...
@@ -30,7 +30,8 @@ WINE_DEFAULT_DEBUG_CHANNEL(shdocvw);
struct
ConnectionPoint
{
const
IConnectionPointVtbl
*
lpConnectionPointVtbl
;
WebBrowser
*
webbrowser
;
DocHost
*
doc_host
;
IConnectionPointContainer
*
container
;
IDispatch
**
sinks
;
DWORD
sinks_size
;
...
...
@@ -87,13 +88,13 @@ static HRESULT WINAPI ConnectionPointContainer_FindConnectionPoint(IConnectionPo
if
(
IsEqualGUID
(
&
DIID_DWebBrowserEvents2
,
riid
))
{
TRACE
(
"(%p)->(DIID_DWebBrowserEvents2 %p)
\n
"
,
This
,
ppCP
);
*
ppCP
=
CONPOINT
(
This
->
cp_wbe2
);
*
ppCP
=
CONPOINT
(
This
->
doc_host
.
cp_wbe2
);
}
else
if
(
IsEqualGUID
(
&
DIID_DWebBrowserEvents
,
riid
))
{
TRACE
(
"(%p)->(DIID_DWebBrowserEvents %p)
\n
"
,
This
,
ppCP
);
*
ppCP
=
CONPOINT
(
This
->
cp_wbe
);
*
ppCP
=
CONPOINT
(
This
->
doc_host
.
cp_wbe
);
}
else
if
(
IsEqualGUID
(
&
IID_IPropertyNotifySink
,
riid
))
{
TRACE
(
"(%p)->(IID_IPropertyNotifySink %p)
\n
"
,
This
,
ppCP
);
*
ppCP
=
CONPOINT
(
This
->
cp_pns
);
*
ppCP
=
CONPOINT
(
This
->
doc_host
.
cp_pns
);
}
if
(
*
ppCP
)
{
...
...
@@ -139,7 +140,7 @@ static HRESULT WINAPI ConnectionPoint_QueryInterface(IConnectionPoint *iface,
}
if
(
*
ppv
)
{
I
WebBrowser2_AddRef
(
WEBBROWSER
(
This
->
webbrowser
));
I
OleClientSite_AddRef
(
CLIENTSITE
(
This
->
doc_host
));
return
S_OK
;
}
...
...
@@ -150,13 +151,13 @@ static HRESULT WINAPI ConnectionPoint_QueryInterface(IConnectionPoint *iface,
static
ULONG
WINAPI
ConnectionPoint_AddRef
(
IConnectionPoint
*
iface
)
{
ConnectionPoint
*
This
=
CONPOINT_THIS
(
iface
);
return
I
WebBrowser2_AddRef
(
WEBBROWSER
(
This
->
webbrowser
));
return
I
OleClientSite_AddRef
(
CLIENTSITE
(
This
->
doc_host
));
}
static
ULONG
WINAPI
ConnectionPoint_Release
(
IConnectionPoint
*
iface
)
{
ConnectionPoint
*
This
=
CONPOINT_THIS
(
iface
);
return
I
WebBrowser2_Release
(
WEBBROWSER
(
This
->
webbrowser
));
return
I
OleClientSite_Release
(
CLIENTSITE
(
This
->
doc_host
));
}
static
HRESULT
WINAPI
ConnectionPoint_GetConnectionInterface
(
IConnectionPoint
*
iface
,
IID
*
pIID
)
...
...
@@ -176,8 +177,8 @@ static HRESULT WINAPI ConnectionPoint_GetConnectionPointContainer(IConnectionPoi
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
ppCPC
);
*
ppCPC
=
CONPTCONT
(
This
->
webbrowser
)
;
IConnectionPointContainer_AddRef
(
CONPTCONT
(
This
->
webbrowser
)
);
*
ppCPC
=
This
->
container
;
IConnectionPointContainer_AddRef
(
This
->
container
);
return
S_OK
;
}
...
...
@@ -267,15 +268,16 @@ void call_sink(ConnectionPoint *This, DISPID dispid, DISPPARAMS *dispparams)
}
}
static
void
ConnectionPoint_Create
(
WebBrowser
*
wb
,
REFIID
riid
,
ConnectionPoint
**
cp
)
static
void
ConnectionPoint_Create
(
DocHost
*
doc_host
,
REFIID
riid
,
ConnectionPoint
**
cp
)
{
ConnectionPoint
*
ret
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
ConnectionPoint
));
ret
->
lpConnectionPointVtbl
=
&
ConnectionPointVtbl
;
ret
->
webbrowser
=
wb
;
ret
->
doc_host
=
doc_host
;
ret
->
sinks
=
NULL
;
ret
->
sinks_size
=
0
;
ret
->
container
=
NULL
;
memcpy
(
&
ret
->
iid
,
riid
,
sizeof
(
IID
));
...
...
@@ -295,18 +297,25 @@ static void ConnectionPoint_Destroy(ConnectionPoint *This)
HeapFree
(
GetProcessHeap
(),
0
,
This
);
}
void
WebBrowser_Events_Init
(
WebBrowser
*
This
)
void
DocHost_Events_Init
(
DocHost
*
This
)
{
This
->
lpConnectionPointContainerVtbl
=
&
ConnectionPointContainerVtbl
;
ConnectionPoint_Create
(
This
,
&
DIID_DWebBrowserEvents2
,
&
This
->
cp_wbe2
);
ConnectionPoint_Create
(
This
,
&
DIID_DWebBrowserEvents
,
&
This
->
cp_wbe
);
ConnectionPoint_Create
(
This
,
&
DIID_DWebBrowserEvents
,
&
This
->
cp_wbe
);
ConnectionPoint_Create
(
This
,
&
IID_IPropertyNotifySink
,
&
This
->
cp_pns
);
}
void
WebBrowser_Events_Destroy
(
WebBrowser
*
This
)
void
DocHost_Events_Release
(
DocHost
*
This
)
{
ConnectionPoint_Destroy
(
This
->
cp_wbe2
);
ConnectionPoint_Destroy
(
This
->
cp_wbe
);
ConnectionPoint_Destroy
(
This
->
cp_pns
);
}
void
WebBrowser_Events_Init
(
WebBrowser
*
This
)
{
This
->
lpConnectionPointContainerVtbl
=
&
ConnectionPointContainerVtbl
;
This
->
doc_host
.
cp_wbe2
->
container
=
CONPTCONT
(
This
);
This
->
doc_host
.
cp_wbe
->
container
=
CONPTCONT
(
This
);
This
->
doc_host
.
cp_pns
->
container
=
CONPTCONT
(
This
);
}
dlls/shdocvw/navigate.c
View file @
61560b87
...
...
@@ -371,7 +371,7 @@ static void on_before_navigate2(WebBrowser *This, LPWSTR url, PBYTE post_data, U
V_VT
(
params
+
6
)
=
(
VT_DISPATCH
);
V_DISPATCH
(
params
+
6
)
=
(
IDispatch
*
)
WEBBROWSER2
(
This
);
call_sink
(
This
->
cp_wbe2
,
DISPID_BEFORENAVIGATE2
,
&
dispparams
);
call_sink
(
This
->
doc_host
.
cp_wbe2
,
DISPID_BEFORENAVIGATE2
,
&
dispparams
);
SysFreeString
(
V_BSTR
(
&
var_url
));
if
(
post_data_len
)
...
...
dlls/shdocvw/shdocvw.h
View file @
61560b87
...
...
@@ -73,6 +73,12 @@ typedef struct {
HWND
hwnd
;
HWND
frame_hwnd
;
/* Connection points */
ConnectionPoint
*
cp_wbe2
;
ConnectionPoint
*
cp_wbe
;
ConnectionPoint
*
cp_pns
;
}
DocHost
;
typedef
struct
WebBrowser
{
...
...
@@ -111,12 +117,6 @@ typedef struct WebBrowser {
HWND
shell_embedding_hwnd
;
/* Connection points */
ConnectionPoint
*
cp_wbe2
;
ConnectionPoint
*
cp_wbe
;
ConnectionPoint
*
cp_pns
;
DocHost
doc_host
;
}
WebBrowser
;
...
...
@@ -153,14 +153,16 @@ void WebBrowser_ClassInfo_Init(WebBrowser*);
void
WebBrowser_Events_Init
(
WebBrowser
*
);
void
WebBrowser_HlinkFrame_Init
(
WebBrowser
*
);
void
WebBrowser_OleObject_Destroy
(
WebBrowser
*
);
void
DocHost_Init
(
DocHost
*
);
void
DocHost_ClientSite_Init
(
DocHost
*
);
void
DocHost_Events_Init
(
DocHost
*
);
void
DocHost_Frame_Init
(
DocHost
*
);
void
WebBrowser_OleObject_Destroy
(
WebBrowser
*
);
void
WebBrowser_Events_Destroy
(
WebBrowser
*
);
void
WebBrowser_ClientSite_Destroy
(
WebBrowser
*
);
void
DocHost_Release
(
DocHost
*
);
void
DocHost_ClientSite_Release
(
DocHost
*
);
void
DocHost_Events_Release
(
DocHost
*
);
HRESULT
WebBrowser_Create
(
IUnknown
*
,
REFIID
,
void
**
);
...
...
dlls/shdocvw/webbrowser.c
View file @
61560b87
...
...
@@ -128,9 +128,9 @@ static ULONG WINAPI WebBrowser_Release(IWebBrowser2 *iface)
if
(
This
->
doc_host
.
document
)
IUnknown_Release
(
This
->
doc_host
.
document
);
DocHost_Release
(
&
This
->
doc_host
);
WebBrowser_OleObject_Destroy
(
This
);
WebBrowser_Events_Destroy
(
This
);
WebBrowser_ClientSite_Destroy
(
This
);
SysFreeString
(
This
->
url
);
HeapFree
(
GetProcessHeap
(),
0
,
This
);
...
...
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