virtual void RunScript(const wxString& javascript);
//Virtual Filesystem Support
- virtual void RegisterHandler(wxWebHandler* handler);
- virtual wxVector<wxWebHandler*> GetHandlers() { return m_handlerList; }
+ virtual void RegisterHandler(wxSharedPtr<wxWebHandler> handler);
+ virtual wxVector<wxSharedPtr<wxWebHandler> > GetHandlers() { return m_handlerList; }
/** FIXME: hack to work around signals being received too early */
bool m_ready;
* user)
*/
bool m_busy;
-
- bool m_guard;
+
wxString m_vfsurl;
//We use this flag to stop recursion when we load a page from the navigation
GtkWidget *web_view;
gint m_historyLimit;
- wxVector<wxWebHandler*> m_handlerList;
+ wxVector<wxSharedPtr<wxWebHandler> > m_handlerList;
wxDECLARE_DYNAMIC_CLASS(wxWebViewWebKit);
};
virtual void RunScript(const wxString& javascript);
//Virtual Filesystem Support
- virtual void RegisterHandler(wxWebHandler* handler);
+ virtual void RegisterHandler(wxSharedPtr<wxWebHandler> handler);
// ---- IE-specific methods
VOID * fileP;
wxFSFile* m_file;
- wxWebHandler* m_handler;
+ wxSharedPtr<wxWebHandler> m_handler;
public:
- VirtualProtocol(wxWebHandler *handler);
+ VirtualProtocol(wxSharedPtr<wxWebHandler> handler);
~VirtualProtocol();
//IUnknown
private:
ULONG m_refCount;
public:
- ClassFactory(wxWebHandler* handler) : m_handler(handler) {}
+ ClassFactory(wxSharedPtr<wxWebHandler> handler) : m_handler(handler) {}
//IUnknown
ULONG STDMETHODCALLTYPE AddRef();
HRESULT STDMETHODCALLTYPE QueryInterface(REFIID riid, void **ppvObject);
REFIID riid, void** ppvObject);
HRESULT STDMETHODCALLTYPE LockServer(BOOL fLock);
private:
- wxWebHandler* m_handler;
+ wxSharedPtr<wxWebHandler> m_handler;
};
#endif // wxUSE_WEBVIEW_IE && defined(__WXMSW__)
void RunScript(const wxString& javascript);
//Virtual Filesystem Support
- virtual void RegisterHandler(wxWebHandler* WXUNUSED(handler)) {};
+ virtual void RegisterHandler(wxSharedPtr<wxWebHandler> WXUNUSED(handler)) {};
// ---- methods not from the parent (common) interface
bool CanGetPageSource();
virtual void Redo() = 0;
//Virtual Filesystem Support
- virtual void RegisterHandler(wxWebHandler* handler) = 0;
+ virtual void RegisterHandler(wxSharedPtr<wxWebHandler> handler) = 0;
wxDECLARE_ABSTRACT_CLASS(wxWebView);
};
/**
Registers a custom scheme handler.
- @param handler A pointer to a heap allocated wxWebHandler.
+ @param handler A shared pointer to a wxWebHandler.
*/
- virtual void RegisterHandler(wxWebHandler* handler) = 0;
+ virtual void RegisterHandler(wxSharedPtr<wxWebHandler> handler) = 0;
/**
Reload the currently displayed URL.
topsizer->Add(m_browser, wxSizerFlags().Expand().Proportion(1));
//We register the test:// protocol for testing purposes
- m_browser->RegisterHandler(new wxWebFileHandler());
+ m_browser->RegisterHandler(wxSharedPtr<wxWebHandler>(new wxWebFileHandler()));
SetSizer(topsizer);
else
{
wxString wxuri = uri;
- wxWebHandler *handler = NULL;
- wxVector<wxWebHandler*> hanlders = webKitCtrl->GetHandlers();
+ wxSharedPtr<wxWebHandler> handler;
+ wxVector<wxSharedPtr<wxWebHandler> > hanlders = webKitCtrl->GetHandlers();
//We are not vetoed so see if we match one of the additional handlers
- for(wxVector<wxWebHandler*>::iterator it = hanlders.begin();
+ for(wxVector<wxSharedPtr<wxWebHandler> >::iterator it = hanlders.begin();
it != hanlders.end(); ++it)
{
if(wxuri.substr(0, (*it)->GetName().length()) == (*it)->GetName())
{
wxString uri = webkit_network_request_get_uri(request);
- wxWebHandler *handler = NULL;
- wxVector<wxWebHandler*> hanlders = webKitCtrl->GetHandlers();
+ wxSharedPtr<wxWebHandler> handler;
+ wxVector<wxSharedPtr<wxWebHandler> > hanlders = webKitCtrl->GetHandlers();
//We are not vetoed so see if we match one of the additional handlers
- for(wxVector<wxWebHandler*>::iterator it = hanlders.begin();
+ for(wxVector<wxSharedPtr<wxWebHandler> >::iterator it = hanlders.begin();
it != hanlders.end(); ++it)
{
if(uri.substr(0, (*it)->GetName().length()) == (*it)->GetName())
javascript.mb_str(wxConvUTF8));
}
-void wxWebViewWebKit::RegisterHandler(wxWebHandler* handler)
+void wxWebViewWebKit::RegisterHandler(wxSharedPtr<wxWebHandler> handler)
{
m_handlerList.push_back(handler);
}
document->Release();
}
-void wxWebViewIE::RegisterHandler(wxWebHandler* handler)
+void wxWebViewIE::RegisterHandler(wxSharedPtr<wxWebHandler> handler)
{
ClassFactory* cf = new ClassFactory(handler);
IInternetSession* session;
evt.Skip();
}
-VirtualProtocol::VirtualProtocol(wxWebHandler *handler)
+VirtualProtocol::VirtualProtocol(wxSharedPtr<wxWebHandler> handler)
{
m_refCount = 0;
m_file = NULL;