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
c05558a2
Commit
c05558a2
authored
Nov 15, 2011
by
Jacek Caban
Committed by
Alexandre Julliard
Nov 15, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ieframe: Store ShellBrowser in DocHost instead of creating it on every QueryService call.
parent
dcf1a81d
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
40 additions
and
25 deletions
+40
-25
client.c
dlls/ieframe/client.c
+8
-7
ieframe.h
dlls/ieframe/ieframe.h
+16
-1
shellbrowser.c
dlls/ieframe/shellbrowser.c
+16
-16
webbrowser.c
dlls/ieframe/webbrowser.c
+0
-1
No files found.
dlls/ieframe/client.c
View file @
c05558a2
...
...
@@ -672,18 +672,17 @@ static HRESULT WINAPI ClServiceProvider_QueryService(IServiceProvider *iface, RE
}
if
(
IsEqualGUID
(
&
IID_IShellBrowser
,
guidService
))
{
IShellBrowser
*
sb
;
HRESULT
hres
;
TRACE
(
"(%p)->(IID_IShellBrowser %s %p)
\n
"
,
This
,
debugstr_guid
(
riid
),
ppv
);
hres
=
ShellBrowser_Create
(
&
sb
);
if
(
!
This
->
browser_service
)
{
HRESULT
hres
;
hres
=
create_browser_service
(
This
,
&
This
->
browser_service
);
if
(
FAILED
(
hres
))
return
hres
;
}
hres
=
IShellBrowser_QueryInterface
(
sb
,
riid
,
ppv
);
IShellBrowser_Release
(
sb
);
return
hres
;
return
IShellBrowser_QueryInterface
(
&
This
->
browser_service
->
IShellBrowser_iface
,
riid
,
ppv
);
}
FIXME
(
"(%p)->(%s %s %p)
\n
"
,
This
,
debugstr_guid
(
guidService
),
debugstr_guid
(
riid
),
ppv
);
...
...
@@ -710,6 +709,8 @@ void DocHost_ClientSite_Init(DocHost *This)
void
DocHost_ClientSite_Release
(
DocHost
*
This
)
{
if
(
This
->
browser_service
)
detach_browser_service
(
This
->
browser_service
);
if
(
This
->
view
)
IOleDocumentView_Release
(
This
->
view
);
}
dlls/ieframe/ieframe.h
View file @
c05558a2
...
...
@@ -35,6 +35,8 @@
#include "exdisp.h"
#include "hlink.h"
#include "htiframe.h"
#include "shdeprecated.h"
#include "docobjectservice.h"
#include "wine/unicode.h"
#include "wine/list.h"
...
...
@@ -71,6 +73,16 @@ typedef struct _task_header_t {
task_destr_t
destr
;
}
task_header_t
;
typedef
struct
{
IShellBrowser
IShellBrowser_iface
;
IBrowserService
IBrowserService_iface
;
IDocObjectService
IDocObjectService_iface
;
LONG
ref
;
DocHost
*
doc_host
;
}
ShellBrowser
;
typedef
struct
_IDocHostContainerVtbl
{
ULONG
(
*
addref
)(
DocHost
*
);
...
...
@@ -123,6 +135,8 @@ struct DocHost {
DWORD
prop_notif_cookie
;
BOOL
is_prop_notif
;
ShellBrowser
*
browser_service
;
ConnectionPointContainer
cps
;
};
...
...
@@ -213,7 +227,8 @@ void release_dochost_client(DocHost*) DECLSPEC_HIDDEN;
void
HlinkFrame_Init
(
HlinkFrame
*
,
IUnknown
*
,
DocHost
*
)
DECLSPEC_HIDDEN
;
BOOL
HlinkFrame_QI
(
HlinkFrame
*
,
REFIID
,
void
**
)
DECLSPEC_HIDDEN
;
HRESULT
ShellBrowser_Create
(
IShellBrowser
**
)
DECLSPEC_HIDDEN
;
HRESULT
create_browser_service
(
DocHost
*
,
ShellBrowser
**
)
DECLSPEC_HIDDEN
;
void
detach_browser_service
(
ShellBrowser
*
)
DECLSPEC_HIDDEN
;
void
ConnectionPointContainer_Init
(
ConnectionPointContainer
*
,
IUnknown
*
)
DECLSPEC_HIDDEN
;
void
ConnectionPointContainer_Destroy
(
ConnectionPointContainer
*
)
DECLSPEC_HIDDEN
;
...
...
dlls/ieframe/shellbrowser.c
View file @
c05558a2
...
...
@@ -18,23 +18,14 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include
"ieframe.h"
#include
<assert.h>
#include "shdeprecated.h"
#include "docobjectservice.h"
#include "ieframe.h"
#include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
ieframe
);
typedef
struct
{
IShellBrowser
IShellBrowser_iface
;
IBrowserService
IBrowserService_iface
;
IDocObjectService
IDocObjectService_iface
;
LONG
ref
;
}
ShellBrowser
;
static
inline
ShellBrowser
*
impl_from_IShellBrowser
(
IShellBrowser
*
iface
)
{
return
CONTAINING_RECORD
(
iface
,
ShellBrowser
,
IShellBrowser_iface
);
...
...
@@ -77,16 +68,18 @@ static ULONG WINAPI ShellBrowser_AddRef(
return
ref
;
}
static
ULONG
WINAPI
ShellBrowser_Release
(
IShellBrowser
*
iface
)
static
ULONG
WINAPI
ShellBrowser_Release
(
IShellBrowser
*
iface
)
{
ShellBrowser
*
This
=
impl_from_IShellBrowser
(
iface
);
LONG
ref
=
InterlockedDecrement
(
&
This
->
ref
);
TRACE
(
"(%p) ref=%d
\n
"
,
This
,
ref
);
if
(
!
ref
)
if
(
!
ref
)
{
assert
(
!
This
->
doc_host
);
heap_free
(
This
);
}
return
ref
;
}
...
...
@@ -759,7 +752,7 @@ static const IDocObjectServiceVtbl DocObjectServiceVtbl = {
DocObjectService_IsErrorUrl
};
HRESULT
ShellBrowser_Create
(
IShellBrowser
**
ppv
)
HRESULT
create_browser_service
(
DocHost
*
doc_host
,
ShellBrowser
**
ret
)
{
ShellBrowser
*
sb
;
...
...
@@ -772,7 +765,14 @@ HRESULT ShellBrowser_Create(IShellBrowser **ppv)
sb
->
IDocObjectService_iface
.
lpVtbl
=
&
DocObjectServiceVtbl
;
sb
->
ref
=
1
;
sb
->
doc_host
=
doc_host
;
*
ppv
=
&
sb
->
IShellBrowser_iface
;
*
ret
=
sb
;
return
S_OK
;
}
void
detach_browser_service
(
ShellBrowser
*
sb
)
{
sb
->
doc_host
=
NULL
;
IShellBrowser_Release
(
&
sb
->
IShellBrowser_iface
);
}
dlls/ieframe/webbrowser.c
View file @
c05558a2
...
...
@@ -23,7 +23,6 @@
#include "exdispid.h"
#include "mshtml.h"
#include "shdeprecated.h"
#include "wine/debug.h"
...
...
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