Move the wxWebFileProtocolHandler from the IE backend to the common source, add the RegisterProtocol method to all classes (as a stub in GTK and OSX). Register the file protocol handler in the sample for testing purposes.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/SOC2011_WEBVIEW@68446 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -27,6 +27,8 @@
|
||||
#include <wx/settings.h>
|
||||
#include <wx/webview.h>
|
||||
#include <wx/infobar.h>
|
||||
#include <wx/filesys.h>
|
||||
#include <wx/fs_arc.h>
|
||||
|
||||
#if !defined(__WXMSW__) && !defined(__WXPM__)
|
||||
#include "../sample.xpm"
|
||||
@@ -139,6 +141,9 @@ bool WebApp::OnInit()
|
||||
|
||||
WebFrame::WebFrame() : wxFrame(NULL, wxID_ANY, "wxWebView Sample")
|
||||
{
|
||||
//Required from virtual file system archive support
|
||||
wxFileSystem::AddHandler(new wxArchiveFSHandler);
|
||||
|
||||
// set the frame icon
|
||||
SetIcon(wxICON(sample));
|
||||
SetTitle("wxWebView Sample");
|
||||
@@ -184,6 +189,9 @@ 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 test:// protocol for testing purposes
|
||||
m_browser->RegisterProtocol(new wxWebFileProtocolHandler());
|
||||
|
||||
SetSizer(topsizer);
|
||||
|
||||
//Set a more sensible size for web browsing
|
||||
|
Reference in New Issue
Block a user