]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/webview_ie.cpp
fixing osx_cocoa
[wxWidgets.git] / src / msw / webview_ie.cpp
index 9f0c1168b406385aca22cc79d204b6fe30287aaa..868877c9ef330a6d664702b16ebc3ccbf0bed6b5 100644 (file)
@@ -27,6 +27,8 @@
 #include "wx/msw/missing.h"
 #include "wx/filesys.h"
 
+wxIMPLEMENT_DYNAMIC_CLASS(wxWebViewIE, wxWebView);
+
 //We link to urlmon as it is required for CoInternetGetSession
 #pragma comment(lib, "urlmon")
 
@@ -663,7 +665,7 @@ void wxWebViewIE::RunScript(const wxString& javascript)
     document->Release();
 }
 
-void wxWebViewIE::RegisterHandler(wxWebHandler* handler)
+void wxWebViewIE::RegisterHandler(wxSharedPtr<wxWebHandler> handler)
 {
     ClassFactory* cf = new ClassFactory(handler);
     IInternetSession* session;
@@ -957,7 +959,7 @@ void wxWebViewIE::onActiveXEvent(wxActiveXEvent& evt)
     evt.Skip();
 }
 
-VirtualProtocol::VirtualProtocol(wxWebHandler *handler)
+VirtualProtocol::VirtualProtocol(wxSharedPtr<wxWebHandler> handler)
 {
     m_refCount = 0;
     m_file = NULL;
@@ -983,12 +985,6 @@ HRESULT VirtualProtocol::QueryInterface(REFIID riid, void **ppvObject)
         AddRef();
         return S_OK;
     }
-    else if(riid == IID_IInternetProtocolInfo)
-    {
-        *ppvObject = (IInternetProtocolInfo*)this;
-        AddRef();
-        return S_OK;
-    }
     else
     {
         *ppvObject = NULL;
@@ -1076,50 +1072,6 @@ HRESULT VirtualProtocol::Read(void *pv, ULONG cb, ULONG *pcbRead)
     }
 }
 
-HRESULT VirtualProtocol::CombineUrl(LPCWSTR pwzBaseUrl, LPCWSTR pwzRelativeUrl,
-                                    DWORD WXUNUSED(dwCombineFlags), 
-                                    LPWSTR pwzResult, 
-                                    DWORD cchResult, DWORD *pcchResult, 
-                                    DWORD WXUNUSED(dwReserved))
-{
-
-    wxString newuri = m_handler->CombineURIs(pwzBaseUrl, pwzRelativeUrl);
-    //Check the buffer we are given can hold the new url
-    if(wxStrlen(newuri) > cchResult)
-        return S_FALSE;
-
-    wxStrcpy(pwzResult, newuri.c_str());
-    *pcchResult = wxStrlen(newuri);
-    return S_OK;
-}
-
-HRESULT VirtualProtocol::ParseUrl(LPCWSTR pwzUrl, 
-                                  PARSEACTION WXUNUSED(ParseAction),
-                                  DWORD WXUNUSED(dwParseFlags), 
-                                  LPWSTR pwzResult,
-                                  DWORD cchResult, DWORD *pcchResult,
-                                  DWORD WXUNUSED(dwReserved))
-{
-    //Check the buffer we are given can hold the new url
-    if(wxStrlen(pwzUrl) > cchResult)
-        return S_FALSE;
-
-    wxStrcpy(pwzResult, pwzUrl);
-    *pcchResult = wxStrlen(pwzResult);
-    return S_OK;
-}
-    
-HRESULT VirtualProtocol::QueryInfo(LPCWSTR WXUNUSED(pwzUrl), 
-                                   QUERYOPTION WXUNUSED(OueryOption), 
-                                   DWORD WXUNUSED(dwQueryFlags), 
-                                   LPVOID WXUNUSED(pBuffer),
-                                   DWORD WXUNUSED(cbBuffer), 
-                                   DWORD* WXUNUSED(pcbBuf),  
-                                   DWORD WXUNUSED(dwReserved))
-{
-    return INET_E_DEFAULT_ACTION;
-}
-
 HRESULT ClassFactory::CreateInstance(IUnknown* pUnkOuter, REFIID riid,
                                      void ** ppvObject)
 {