Implement basic support for virtual file systems for the ie backend. Registering a temporary namespace allows us to use the existing wxFileSystem work to load virtual files.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/SOC2011_WEBVIEW@68326 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -23,6 +23,9 @@
|
||||
|
||||
struct IHTMLDocument2;
|
||||
|
||||
class wxFSFile;
|
||||
class wxFileSystem;
|
||||
|
||||
class WXDLLIMPEXP_WEB wxWebViewIE : public wxWebView
|
||||
{
|
||||
public:
|
||||
@@ -157,6 +160,65 @@ private:
|
||||
|
||||
};
|
||||
|
||||
class VirtualProtocol : public IInternetProtocol
|
||||
{
|
||||
protected:
|
||||
ULONG m_refCount;
|
||||
IInternetProtocolSink* m_protocolSink;
|
||||
wxString m_html;
|
||||
VOID * fileP;
|
||||
|
||||
wxFSFile* m_file;
|
||||
wxFileSystem* m_fileSys;
|
||||
|
||||
public:
|
||||
VirtualProtocol();
|
||||
~VirtualProtocol();
|
||||
|
||||
//IUnknown
|
||||
ULONG STDMETHODCALLTYPE AddRef();
|
||||
HRESULT STDMETHODCALLTYPE QueryInterface(REFIID riid, void **ppvObject);
|
||||
ULONG STDMETHODCALLTYPE Release();
|
||||
|
||||
//IInternetProtocolRoot
|
||||
HRESULT STDMETHODCALLTYPE Abort(HRESULT hrReason, DWORD dwOptions)
|
||||
{ return E_NOTIMPL; }
|
||||
HRESULT STDMETHODCALLTYPE Continue(PROTOCOLDATA *pProtocolData)
|
||||
{ return S_OK; }
|
||||
HRESULT STDMETHODCALLTYPE Resume() { return S_OK; }
|
||||
HRESULT STDMETHODCALLTYPE Start(LPCWSTR szUrl,
|
||||
IInternetProtocolSink *pOIProtSink,
|
||||
IInternetBindInfo *pOIBindInfo,
|
||||
DWORD grfPI,
|
||||
HANDLE_PTR dwReserved);
|
||||
HRESULT STDMETHODCALLTYPE Suspend() { return S_OK; }
|
||||
HRESULT STDMETHODCALLTYPE Terminate(DWORD dwOptions) { return S_OK; }
|
||||
|
||||
//IInternetProtocol
|
||||
HRESULT STDMETHODCALLTYPE LockRequest(DWORD dwOptions) { return S_OK; }
|
||||
HRESULT STDMETHODCALLTYPE Read(void *pv, ULONG cb, ULONG *pcbRead);
|
||||
HRESULT STDMETHODCALLTYPE Seek(LARGE_INTEGER dlibMove, DWORD dwOrigin,
|
||||
ULARGE_INTEGER* plibNewPosition)
|
||||
{ return E_FAIL; }
|
||||
HRESULT STDMETHODCALLTYPE UnlockRequest() { return S_OK; }
|
||||
};
|
||||
|
||||
class ClassFactory : public IClassFactory
|
||||
{
|
||||
private:
|
||||
ULONG m_refCount;
|
||||
public:
|
||||
//IUnknown
|
||||
ULONG STDMETHODCALLTYPE AddRef();
|
||||
HRESULT STDMETHODCALLTYPE QueryInterface(REFIID riid, void **ppvObject);
|
||||
ULONG STDMETHODCALLTYPE Release();
|
||||
|
||||
//IClassFactory
|
||||
HRESULT STDMETHODCALLTYPE CreateInstance(IUnknown* pUnkOuter,
|
||||
REFIID riid, void** ppvObject);
|
||||
HRESULT STDMETHODCALLTYPE LockServer(BOOL fLock);
|
||||
};
|
||||
|
||||
#endif // wxUSE_WEBVIEW_IE
|
||||
|
||||
#endif // wxWebViewIE_H
|
||||
|
Reference in New Issue
Block a user