]> git.saurik.com Git - wxWidgets.git/commitdiff
Rename wxWebFileHandler to wxWebViewArchiveHandler, wxWebHandler to wxWebViewHandler...
authorSteve Lamerton <steve.lamerton@gmail.com>
Sun, 14 Aug 2011 12:15:34 +0000 (12:15 +0000)
committerSteve Lamerton <steve.lamerton@gmail.com>
Sun, 14 Aug 2011 12:15:34 +0000 (12:15 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/SOC2011_WEBVIEW@68689 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

15 files changed:
include/wx/gtk/webview_webkit.h
include/wx/msw/webview_ie.h
include/wx/osx/webview_webkit.h
include/wx/webview.h
include/wx/webviewarchivehandler.h [new file with mode: 0644]
include/wx/webviewfilehandler.h [deleted file]
interface/wx/webfilehandler.h [deleted file]
interface/wx/webview.h
interface/wx/webviewarchivehandler.h [new file with mode: 0644]
samples/web/web.cpp
src/common/webviewarchivehandler.cpp [new file with mode: 0644]
src/common/webviewfilehandler.cpp [deleted file]
src/gtk/webview_webkit.cpp
src/msw/webview_ie.cpp
src/osx/webview_webkit.mm

index 7d88128bedb9585f693f8bd3bbfc457dfc611821..72fc0259f23cb207d895ea95f8f2ba8e485ad3e6 100644 (file)
@@ -122,8 +122,8 @@ public:
     virtual void RunScript(const wxString& javascript);
     
     //Virtual Filesystem Support
-    virtual void RegisterHandler(wxSharedPtr<wxWebHandler> handler);
-    virtual wxVector<wxSharedPtr<wxWebHandler> > GetHandlers() { return m_handlerList; }
+    virtual void RegisterHandler(wxSharedPtr<wxWebViewHandler> handler);
+    virtual wxVector<wxSharedPtr<wxWebViewHandler> > GetHandlers() { return m_handlerList; }
 
     /** FIXME: hack to work around signals being received too early */
     bool m_ready;
@@ -155,7 +155,7 @@ private:
     GtkWidget *web_view;
     gint m_historyLimit;
 
-    wxVector<wxSharedPtr<wxWebHandler> > m_handlerList;
+    wxVector<wxSharedPtr<wxWebViewHandler> > m_handlerList;
 
     wxDECLARE_DYNAMIC_CLASS(wxWebViewWebKit);
 };
index 9d4671e422fade75085da8a6fd24668a97e81794..1ab66d5de3f7397f02ed738050f8e68a259317f9 100644 (file)
@@ -110,7 +110,7 @@ public:
     virtual void RunScript(const wxString& javascript);
 
     //Virtual Filesystem Support
-    virtual void RegisterHandler(wxSharedPtr<wxWebHandler> handler);
+    virtual void RegisterHandler(wxSharedPtr<wxWebViewHandler> handler);
 
     // ---- IE-specific methods
 
@@ -169,10 +169,10 @@ protected:
     VOID * fileP;
 
     wxFSFile* m_file;
-    wxSharedPtr<wxWebHandler> m_handler;
+    wxSharedPtr<wxWebViewHandler> m_handler;
 
 public:
-    VirtualProtocol(wxSharedPtr<wxWebHandler> handler);
+    VirtualProtocol(wxSharedPtr<wxWebViewHandler> handler);
     ~VirtualProtocol();
 
     //IUnknown
@@ -211,7 +211,7 @@ class ClassFactory : public IClassFactory
 private:
     ULONG m_refCount;
 public:
-    ClassFactory(wxSharedPtr<wxWebHandler> handler) : m_handler(handler) {}
+    ClassFactory(wxSharedPtr<wxWebViewHandler> handler) : m_handler(handler) {}
     //IUnknown
     ULONG STDMETHODCALLTYPE AddRef();
     HRESULT STDMETHODCALLTYPE QueryInterface(REFIID riid, void **ppvObject);
@@ -222,7 +222,7 @@ public:
                                              REFIID riid, void** ppvObject);
     HRESULT STDMETHODCALLTYPE LockServer(BOOL fLock);
 private:
-    wxSharedPtr<wxWebHandler> m_handler;
+    wxSharedPtr<wxWebViewHandler> m_handler;
 };
 
 #endif // wxUSE_WEBVIEW_IE && defined(__WXMSW__)
index 373439dd74c23b43f740c700ff632c69fa3d14c9..da88edfb6b88f9abb20450b56e7f80c7ac079fa9 100644 (file)
@@ -114,7 +114,7 @@ public:
     void RunScript(const wxString& javascript);
     
     //Virtual Filesystem Support
-    virtual void RegisterHandler(wxSharedPtr<wxWebHandler> handler);
+    virtual void RegisterHandler(wxSharedPtr<wxWebViewHandler> handler);
 
     // ---- methods not from the parent (common) interface
     bool  CanGetPageSource();
index b76cba897032c056c9d93c7490eacb0dace459ee..4d4db3ad4d7dff967e083282cf16a581879a4ac4 100644 (file)
@@ -101,11 +101,14 @@ enum wxWebViewBackend
 };
 
 //Base class for custom scheme handlers
-class WXDLLIMPEXP_WEB wxWebHandler
+class WXDLLIMPEXP_WEB wxWebViewHandler
 {
 public:
-    virtual wxString GetName() const = 0;
+    wxWebViewHandler(const wxString& scheme) : m_scheme(scheme) {}
+    virtual wxString GetName() const { return m_scheme; }
     virtual wxFSFile* GetFile(const wxString &uri) = 0;
+private:
+    wxString m_scheme;
 };
 
 extern WXDLLIMPEXP_DATA_WEB(const char) wxWebViewNameStr[];
@@ -339,7 +342,7 @@ public:
     virtual void Redo() = 0;
 
     //Virtual Filesystem Support
-    virtual void RegisterHandler(wxSharedPtr<wxWebHandler> handler) = 0;
+    virtual void RegisterHandler(wxSharedPtr<wxWebViewHandler> handler) = 0;
 
     wxDECLARE_ABSTRACT_CLASS(wxWebView);
 };
diff --git a/include/wx/webviewarchivehandler.h b/include/wx/webviewarchivehandler.h
new file mode 100644 (file)
index 0000000..da8a926
--- /dev/null
@@ -0,0 +1,36 @@
+/////////////////////////////////////////////////////////////////////////////
+// Name:        webviewarchivehandler.h
+// Purpose:     Custom webview handler to allow archive browsing
+// Author:      Steven Lamerton
+// Id:          $Id$
+// Copyright:   (c) 2011 Steven Lamerton
+// Licence:     wxWindows licence
+/////////////////////////////////////////////////////////////////////////////
+
+#ifndef _WX_WEB_VIEW_FILE_HANDLER_H_
+#define _WX_WEB_VIEW_FILE_HANDLER_H_
+
+#include "wx/setup.h"
+
+#if wxUSE_WEB
+
+class wxFSFile;
+class wxFileSystem;
+
+#include "wx/webview.h"
+
+//Loads from uris such as scheme:///C:/example/example.html or archives such as
+//scheme:///C:/example/example.zip;protocol=zip/example.html 
+
+class WXDLLIMPEXP_WEB wxWebViewArchiveHandler : public wxWebViewHandler
+{
+public:
+    wxWebViewArchiveHandler(const wxString& scheme);
+    virtual wxFSFile* GetFile(const wxString &uri);
+private:
+    wxFileSystem* m_fileSystem;
+};
+
+#endif
+
+#endif // _WX_WEB_VIEW_FILE_HANDLER_H_
diff --git a/include/wx/webviewfilehandler.h b/include/wx/webviewfilehandler.h
deleted file mode 100644 (file)
index 787a0c4..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
-/////////////////////////////////////////////////////////////////////////////
-// Name:        webviewfilehandler.h
-// Purpose:     Custom handler for the file scheme to allow archive browsing
-// Author:      Steven Lamerton
-// Id:          $Id$
-// Copyright:   (c) 2011 Steven Lamerton
-// Licence:     wxWindows licence
-/////////////////////////////////////////////////////////////////////////////
-
-#ifndef _WX_WEB_VIEW_FILE_HANDLER_H_
-#define _WX_WEB_VIEW_FILE_HANDLER_H_
-
-#include "wx/setup.h"
-
-#if wxUSE_WEB
-
-class wxFSFile;
-class wxFileSystem;
-
-#include "wx/webview.h"
-
-//Loads from uris such as file:///C:/example/example.html or archives such as
-//file:///C:/example/example.zip;protocol=zip/example.html 
-
-class WXDLLIMPEXP_WEB wxWebFileHandler : public wxWebHandler
-{
-public:
-    wxWebFileHandler();
-    virtual wxString GetName() const { return m_name; }
-    virtual wxFSFile* GetFile(const wxString &uri);
-private:
-    wxString m_name;
-    wxFileSystem* m_fileSystem;
-};
-
-#endif
-
-#endif // _WX_WEB_VIEW_FILE_HANDLER_H_
diff --git a/interface/wx/webfilehandler.h b/interface/wx/webfilehandler.h
deleted file mode 100644 (file)
index 74dd851..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-/////////////////////////////////////////////////////////////////////////////
-// Name:        webfilehandler.h
-// Purpose:     interface of wxWebFileHandler
-// Author:      wxWidgets team
-// RCS-ID:      $Id$
-// Licence:     wxWindows licence
-/////////////////////////////////////////////////////////////////////////////
-
-/**
-    @class wxWebFileHandler
-  
-    A custom handler for the file scheme which also supports loading from 
-    archives. The syntax for wxWebFileHandler differs from virtual file 
-    systems in the rest of wxWidgets by using a syntax such as
-    @c file:///C:/exmaple/docs.zip;protocol=zip/main.htm Currently the only
-    supported protocol is @c zip. 
-   
-    @library{wxweb}
-    @category{web}
-    
-    @see wxWebView, wxWebHandler
- */
-class wxWebFileHandler : public wxWebHandler
-{
-public:
-    /**
-        @return The string @c "file"
-    */
-    virtual wxString GetName() const;
-    virtual wxFSFile* GetFile(const wxString &uri);
-};
\ No newline at end of file
index e192e01ec5fe13395303b1385ac008f1729c65b4..e4641504df2f29978ba00712352f327cf8434465 100644 (file)
@@ -117,7 +117,7 @@ public:
 };
 
 /**
-    @class wxWebHandler
+    @class wxWebViewHandler
   
     The base class for handling custom schemes in wxWebView, for example to 
     allow virtual file system support.
@@ -127,16 +127,22 @@ public:
     
     @see wxWebView
  */
-class wxWebHandler
+class wxWebViewHandler
 {
 public:
+    /**
+        Constructor. Takes the name of the scheme that will be handled by this
+        class for example @c file or @c zip.
+    */
+    wxWebViewHandler(const wxString& scheme);
+
     /**
         @return A pointer to the file represented by @c uri.
     */  
     virtual wxFSFile* GetFile(const wxString &uri) = 0;
 
     /**
-        @return The name of the scheme, for example @c file or @c http.
+        @return The name of the scheme, as passed to the constructor.
     */
     virtual wxString GetName() const = 0;
 };
@@ -196,8 +202,7 @@ public:
     
     wxWebView supports the registering of custom scheme handlers, for example
     @c file or @c http. To do this create a new class which inherits from 
-    wxWebHandler, where the wxWebHandler::GetName() method returns the scheme
-    you wish to handle and wxWebHandler::GetFile() returns a pointer to a 
+    wxWebViewHandler, where wxWebHandler::GetFile() returns a pointer to a 
     wxFSFile which represents the given url. You can then register your handler
     with RegisterHandler() it will be called for all pages and resources.
     
@@ -338,7 +343,7 @@ public:
         Registers a custom scheme handler.
         @param handler A shared pointer to a wxWebHandler.
     */
-    virtual void RegisterHandler(wxSharedPtr<wxWebHandler> handler) = 0;
+    virtual void RegisterHandler(wxSharedPtr<wxWebViewHandler> handler) = 0;
 
     /**
         Reload the currently displayed URL.
diff --git a/interface/wx/webviewarchivehandler.h b/interface/wx/webviewarchivehandler.h
new file mode 100644 (file)
index 0000000..4077bc1
--- /dev/null
@@ -0,0 +1,31 @@
+/////////////////////////////////////////////////////////////////////////////
+// Name:        webfilehandler.h
+// Purpose:     interface of wxWebViewArchiveHandler
+// Author:      wxWidgets team
+// RCS-ID:      $Id$
+// Licence:     wxWindows licence
+/////////////////////////////////////////////////////////////////////////////
+
+/**
+    @class wxWebViewArchiveHandler
+  
+    A custom handler for the file scheme which also supports loading from 
+    archives. The syntax for wxWebViewArchiveHandler differs from virtual file 
+    systems in the rest of wxWidgets by using a syntax such as
+    <code> scheme:///C:/exmaple/docs.zip;protocol=zip/main.htm </code> 
+    Currently the only supported protocol is @c zip. 
+   
+    @library{wxweb}
+    @category{web}
+    
+    @see wxWebView, wxWebViewHandler
+ */
+class wxWebViewArchiveHandler : public wxWebViewHandler
+{
+public:
+    /**
+        Constructor.
+    */
+    wxWebViewArchiveHandler(const wxString& scheme);
+    virtual wxFSFile* GetFile(const wxString &uri);
+};
\ No newline at end of file
index f1019dd5855b4f8b758c26ba9baecbc41b13ab48..e013f445b84cc9060310dd01a2880c76a70e21fd 100644 (file)
@@ -26,7 +26,7 @@
 #include "wx/notifmsg.h"
 #include "wx/settings.h"
 #include "wx/webview.h"
-#include "wx/webviewfilehandler.h"
+#include "wx/webviewarchivehandler.h"
 #include "wx/infobar.h"
 #include "wx/filesys.h"
 #include "wx/fs_arc.h"
@@ -209,8 +209,8 @@ WebFrame::WebFrame() : wxFrame(NULL, wxID_ANY, "wxWebView Sample")
     m_browser = wxWebView::New(this, wxID_ANY, "http://www.wxwidgets.org");
     topsizer->Add(m_browser, wxSizerFlags().Expand().Proportion(1));
 
-    //We register the file:// protocol for testing purposes
-    m_browser->RegisterHandler(wxSharedPtr<wxWebHandler>(new wxWebFileHandler()));
+    //We register the wxfs:// protocol for testing purposes
+    m_browser->RegisterHandler(wxSharedPtr<wxWebViewHandler>(new wxWebViewArchiveHandler("wxfs")));
 
     SetSizer(topsizer);
 
diff --git a/src/common/webviewarchivehandler.cpp b/src/common/webviewarchivehandler.cpp
new file mode 100644 (file)
index 0000000..9a44552
--- /dev/null
@@ -0,0 +1,113 @@
+/////////////////////////////////////////////////////////////////////////////
+// Name:        webviewfilehandler.cpp
+// Purpose:     Custom webview handler to allow archive browsing
+// Author:      Steven Lamerton
+// Id:          $Id$
+// Copyright:   (c) 2011 Steven Lamerton
+// Licence:     wxWindows licence
+/////////////////////////////////////////////////////////////////////////////
+
+// For compilers that support precompilation, includes "wx.h".
+#include "wx/wxprec.h"
+
+#if wxUSE_WEB
+
+#if defined(__BORLANDC__)
+    #pragma hdrstop
+#endif
+
+#include "wx/webviewarchivehandler.h"
+#include "wx/filesys.h"
+
+//Taken from wx/filesys.cpp
+static wxString EscapeFileNameCharsInURL(const char *in)
+{
+    wxString s;
+
+    for ( const unsigned char *p = (const unsigned char*)in; *p; ++p )
+    {
+        const unsigned char c = *p;
+
+        if ( c == '/' || c == '-' || c == '.' || c == '_' || c == '~' ||
+             (c >= '0' && c <= '9') ||
+             (c >= 'a' && c <= 'z') ||
+             (c >= 'A' && c <= 'Z') )
+        {
+            s << c;
+        }
+        else
+        {
+            s << wxString::Format("%%%02x", c);
+        }
+    }
+
+    return s;
+}
+
+wxWebViewArchiveHandler::wxWebViewArchiveHandler(const wxString& scheme) :
+                         wxWebViewHandler(scheme)
+{
+    m_fileSystem = new wxFileSystem();
+}
+
+wxFSFile* wxWebViewArchiveHandler::GetFile(const wxString &uri)
+{
+    //If there is a fragment at the end of the path then we need to strip it
+    //off as not all backends do this for us
+    wxString path = uri;
+    size_t hashloc = uri.find('#');
+    if(hashloc != wxString::npos)
+    {
+        path = uri.substr(0, hashloc);
+    }
+
+    //We iterate through the string to see if there is a protocol description
+    size_t start = wxString::npos;
+    for(size_t i = 0; i < path.length(); i++)
+    {
+        if(path[i] == ';' && path.substr(i, 10) == ";protocol=")
+        {
+            start = i;
+            break;
+        }
+    }
+
+    //We do not have a protocol string so we just pass the path withouth the 
+    if(start == wxString::npos)
+    {
+        size_t doubleslash = path.find("//");
+        //The path is incorrectly formed without // after the scheme
+        if(doubleslash == wxString::npos)
+            return NULL;
+
+        wxString fspath = "file:" + 
+                          EscapeFileNameCharsInURL(path.substr(doubleslash + 2));
+        return m_fileSystem->OpenFile(fspath);
+    }
+    //Otherwise we need to extract the protocol
+    else
+    {
+        size_t end = path.find('/', start);
+        //For the path to be valid there must to a path after the protocol
+        if(end == wxString::npos)
+        {
+            return NULL;
+        }
+        wxString mainpath = path.substr(0, start);
+        wxString archivepath = path.substr(end);
+        wxString protstring = path.substr(start, end - start);
+        wxString protocol = protstring.substr(10);
+        //We can now construct the correct path
+        size_t doubleslash = path.find("//");
+        //The path is incorrectly formed without // after the first protocol
+        if(doubleslash == wxString::npos)
+            return NULL;
+
+        wxString fspath = "file:" + 
+                          EscapeFileNameCharsInURL(mainpath.substr(doubleslash + 2))
+                          + "#" + protocol +":" + archivepath;
+        return m_fileSystem->OpenFile(fspath);
+    }
+}
+
+#endif // wxUSE_WEB
diff --git a/src/common/webviewfilehandler.cpp b/src/common/webviewfilehandler.cpp
deleted file mode 100644 (file)
index 3dbbbb3..0000000
+++ /dev/null
@@ -1,113 +0,0 @@
-/////////////////////////////////////////////////////////////////////////////
-// Name:        webviewfilehandler.cpp
-// Purpose:     Custom handler for the file scheme to allow archive browsing
-// Author:      Steven Lamerton
-// Id:          $Id$
-// Copyright:   (c) 2011 Steven Lamerton
-// Licence:     wxWindows licence
-/////////////////////////////////////////////////////////////////////////////
-
-// For compilers that support precompilation, includes "wx.h".
-#include "wx/wxprec.h"
-
-#if wxUSE_WEB
-
-#if defined(__BORLANDC__)
-    #pragma hdrstop
-#endif
-
-#include "wx/webviewfilehandler.h"
-#include "wx/filesys.h"
-
-//Taken from wx/filesys.cpp
-static wxString EscapeFileNameCharsInURL(const char *in)
-{
-    wxString s;
-
-    for ( const unsigned char *p = (const unsigned char*)in; *p; ++p )
-    {
-        const unsigned char c = *p;
-
-        if ( c == '/' || c == '-' || c == '.' || c == '_' || c == '~' ||
-             (c >= '0' && c <= '9') ||
-             (c >= 'a' && c <= 'z') ||
-             (c >= 'A' && c <= 'Z') )
-        {
-            s << c;
-        }
-        else
-        {
-            s << wxString::Format("%%%02x", c);
-        }
-    }
-
-    return s;
-}
-
-wxWebFileHandler::wxWebFileHandler()
-{
-    m_name = "file";
-    m_fileSystem = new wxFileSystem();
-}
-
-wxFSFile* wxWebFileHandler::GetFile(const wxString &uri)
-{
-    //If there is a fragment at the end of the path then we need to strip it
-    //off as not all backends do this for us
-    wxString path = uri;
-    size_t hashloc = uri.find('#');
-    if(hashloc != wxString::npos)
-    {
-        path = uri.substr(0, hashloc);
-    }
-
-    //We iterate through the string to see if there is a protocol description
-    size_t start = wxString::npos;
-    for(size_t i = 0; i < path.length(); i++)
-    {
-        if(path[i] == ';' && path.substr(i, 10) == ";protocol=")
-        {
-            start = i;
-            break;
-        }
-    }
-
-    //We do not have a protocol string so we just pass the path withouth the 
-    if(start == wxString::npos)
-    {
-        size_t doubleslash = path.find("//");
-        //The path is incorrectly formed without // after the scheme
-        if(doubleslash == wxString::npos)
-            return NULL;
-
-        wxString fspath = "file:" + 
-                          EscapeFileNameCharsInURL(path.substr(doubleslash + 2));
-        return m_fileSystem->OpenFile(fspath);
-    }
-    //Otherwise we need to extract the protocol
-    else
-    {
-        size_t end = path.find('/', start);
-        //For the path to be valid there must to a path after the protocol
-        if(end == wxString::npos)
-        {
-            return NULL;
-        }
-        wxString mainpath = path.substr(0, start);
-        wxString archivepath = path.substr(end);
-        wxString protstring = path.substr(start, end - start);
-        wxString protocol = protstring.substr(10);
-        //We can now construct the correct path
-        size_t doubleslash = path.find("//");
-        //The path is incorrectly formed without // after the first protocol
-        if(doubleslash == wxString::npos)
-            return NULL;
-
-        wxString fspath = "file:" + 
-                          EscapeFileNameCharsInURL(mainpath.substr(doubleslash + 2))
-                          + "#" + protocol +":" + archivepath;
-        return m_fileSystem->OpenFile(fspath);
-    }
-}
-
-#endif // wxUSE_WEB
index c7c3d1c7a58534d237be60b5ddecbd2758ea048b..3b9f9f493085b91661c2efd1b5cbc64cd5d8acee 100644 (file)
@@ -104,10 +104,10 @@ wxgtk_webview_webkit_navigation(WebKitWebView *,
     else
     {
         wxString wxuri = uri;
-        wxSharedPtr<wxWebHandler> handler;
-        wxVector<wxSharedPtr<wxWebHandler> > hanlders = webKitCtrl->GetHandlers();
+        wxSharedPtr<wxWebViewHandler> handler;
+        wxVector<wxSharedPtr<wxWebViewHandler> > hanlders = webKitCtrl->GetHandlers();
         //We are not vetoed so see if we match one of the additional handlers
-        for(wxVector<wxSharedPtr<wxWebHandler> >::iterator it = hanlders.begin();
+        for(wxVector<wxSharedPtr<wxWebViewHandler> >::iterator it = hanlders.begin();
             it != hanlders.end(); ++it)
         {
             if(wxuri.substr(0, (*it)->GetName().length()) == (*it)->GetName())
@@ -329,11 +329,11 @@ wxgtk_webview_webkit_resource_req(WebKitWebView *,
 {
     wxString uri = webkit_network_request_get_uri(request);
     
-    wxSharedPtr<wxWebHandler> handler;
-    wxVector<wxSharedPtr<wxWebHandler> > hanlders = webKitCtrl->GetHandlers();
+    wxSharedPtr<wxWebViewHandler> handler;
+    wxVector<wxSharedPtr<wxWebViewHandler> > hanlders = webKitCtrl->GetHandlers();
     
     //We are not vetoed so see if we match one of the additional handlers
-    for(wxVector<wxSharedPtr<wxWebHandler> >::iterator it = hanlders.begin();
+    for(wxVector<wxSharedPtr<wxWebViewHandler> >::iterator it = hanlders.begin();
         it != hanlders.end(); ++it)
     {
         if(uri.substr(0, (*it)->GetName().length()) == (*it)->GetName())
@@ -911,7 +911,7 @@ void wxWebViewWebKit::RunScript(const wxString& javascript)
                                    javascript.mb_str(wxConvUTF8));
 }
 
-void wxWebViewWebKit::RegisterHandler(wxSharedPtr<wxWebHandler> handler)
+void wxWebViewWebKit::RegisterHandler(wxSharedPtr<wxWebViewHandler> handler)
 {
     m_handlerList.push_back(handler);
 }
index a02838dbdcbd6e4233235b67b2c61c32e77a470c..a8571a610916a7f6b753c1609d5395a6f80fdde3 100644 (file)
@@ -665,7 +665,7 @@ void wxWebViewIE::RunScript(const wxString& javascript)
     document->Release();
 }
 
-void wxWebViewIE::RegisterHandler(wxSharedPtr<wxWebHandler> handler)
+void wxWebViewIE::RegisterHandler(wxSharedPtr<wxWebViewHandler> handler)
 {
     ClassFactory* cf = new ClassFactory(handler);
     IInternetSession* session;
@@ -965,7 +965,7 @@ void wxWebViewIE::onActiveXEvent(wxActiveXEvent& evt)
     evt.Skip();
 }
 
-VirtualProtocol::VirtualProtocol(wxSharedPtr<wxWebHandler> handler)
+VirtualProtocol::VirtualProtocol(wxSharedPtr<wxWebViewHandler> handler)
 {
     m_refCount = 0;
     m_file = NULL;
index f3efc4e2e542fce0d092ef3b06031d57fc3ff547..f11a29a65563ad1cf250ebcc768645331f01d095 100644 (file)
@@ -315,8 +315,8 @@ DEFINE_ONE_SHOT_HANDLER_GETTER( wxWebViewWebKitEventHandler )
 
 @end
 
-//We use a hash to map scheme names to wxWebHandlers
-WX_DECLARE_STRING_HASH_MAP(wxSharedPtr<wxWebHandler>, wxStringToWebHandlerMap);
+//We use a hash to map scheme names to wxWebViewHandler
+WX_DECLARE_STRING_HASH_MAP(wxSharedPtr<wxWebViewHandler>, wxStringToWebHandlerMap);
 
 static wxStringToWebHandlerMap g_stringHandlerMap;
 
@@ -982,7 +982,7 @@ void wxWebViewWebKit::Redo()
     [[m_webView undoManager] redo];
 }
 
-void wxWebViewWebKit::RegisterHandler(wxSharedPtr<wxWebHandler> handler)
+void wxWebViewWebKit::RegisterHandler(wxSharedPtr<wxWebViewHandler> handler)
 {
     g_stringHandlerMap[handler->GetName()] = handler;
 }
@@ -1262,7 +1262,7 @@ wxString nsErrorToWxHtmlError(NSError* error, wxWebNavigationError* out)
 
 + (NSURLRequest *)canonicalRequestForRequest:(NSURLRequest *)request
 {
-    //We don't do any processing here as the wxWebHandler classes do it
+    //We don't do any processing here as the wxWebViewHandler classes do it
     return request;
 }