Use wxCOMPtr throughout wxWebViewIE to simplify the code and reduce the chance of memory leaks. Also mark PPV_ARGS_CHECK as inline so it can be used from multiple libraries.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71639 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -113,7 +113,7 @@ private:
|
||||
// Define a helper for the macro below: we just need a function taking a
|
||||
// pointer and not returning anything to avoid warnings about unused return
|
||||
// value of the cast in the macro itself.
|
||||
namespace wxPrivate { void PPV_ARGS_CHECK(void*) { } }
|
||||
namespace wxPrivate { inline void PPV_ARGS_CHECK(void*) { } }
|
||||
|
||||
// Takes the interface name and a pointer to a pointer of the interface type
|
||||
// and expands into the IID of this interface and the same pointer but after a
|
||||
|
@@ -19,6 +19,7 @@
|
||||
#include "wx/msw/ole/automtn.h"
|
||||
#include "wx/msw/ole/activex.h"
|
||||
#include "wx/msw/ole/oleutils.h"
|
||||
#include "wx/msw/private/comptr.h"
|
||||
#include "wx/msw/wrapwin.h"
|
||||
#include "wx/msw/missing.h"
|
||||
#include "wx/sharedptr.h"
|
||||
@@ -360,7 +361,7 @@ private:
|
||||
wxAutomationObject m_ie;
|
||||
IWebBrowser2* m_webBrowser;
|
||||
DWORD m_dwCookie;
|
||||
DocHostUIHandler* m_uiHandler;
|
||||
wxCOMPtr<DocHostUIHandler> m_uiHandler;
|
||||
|
||||
//We store the current zoom type;
|
||||
wxWebViewZoomType m_zoomType;
|
||||
@@ -383,7 +384,7 @@ private:
|
||||
//Generic helper functions for IHtmlDocument commands
|
||||
bool CanExecCommand(wxString command) const;
|
||||
void ExecCommand(wxString command);
|
||||
IHTMLDocument2* GetDocument() const;
|
||||
wxCOMPtr<IHTMLDocument2> GetDocument() const;
|
||||
//Toggles control features see INTERNETFEATURELIST for values.
|
||||
bool EnableControlFeature(long flag, bool enable = true);
|
||||
|
||||
|
Reference in New Issue
Block a user