Use shared pointers throughout when managing history with the ie backend, simplifying memory management. Also add more comments explaining how the history is managed.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/SOC2011_WEBVIEW@68119 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Steve Lamerton
2011-07-01 10:01:45 +00:00
parent 60ec28290b
commit 3e7968c2da
2 changed files with 10 additions and 6 deletions

View File

@@ -58,7 +58,7 @@ public:
const wxString& name = wxWebViewNameStr);
virtual void LoadUrl(const wxString& url);
virtual void LoadHistoryItem(wxWebHistoryItem* item);
virtual void LoadHistoryItem(wxSharedPtr<wxWebHistoryItem> item);
virtual bool CanGoForward();
virtual bool CanGoBack();
@@ -124,7 +124,10 @@ private:
* Busy property is false but should be true.
*/
bool m_isBusy;
//We manage our own history
//We manage our own history, the history list contains the history items
//which are added as documentcomplete events arrive, unless we are loading
//an item from the history. The position is stored as an int, and reflects
//where we are in the history list.
wxVector<wxSharedPtr<wxWebHistoryItem> > m_historyList;
int m_historyPosition;
bool m_historyLoadingFromList;