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:
Steve Lamerton
2012-06-03 17:41:32 +00:00
parent 41087dc90a
commit f40f8e1722
3 changed files with 34 additions and 67 deletions

View File

@@ -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);