Set cef messageloop running inside wxWebviewChromium instead of client
side.
This commit is contained in:
parent
49f183ce41
commit
d51a8d20f7
3 changed files with 5 additions and 9 deletions
|
|
@ -221,7 +221,7 @@ public:
|
|||
// If using a separate subprocess then return the result of this function
|
||||
static int StartUpSubprocess();
|
||||
static void Shutdown();
|
||||
static void RunMessageLoopOnce();
|
||||
static void RunCEFMessageLoopOnIdle(wxIdleEvent& event);
|
||||
|
||||
protected:
|
||||
virtual void DoSetPage(const wxString& html, const wxString& baseUrl);
|
||||
|
|
|
|||
|
|
@ -72,7 +72,7 @@ public:
|
|||
|
||||
virtual bool OnInit();
|
||||
virtual int OnExit();
|
||||
virtual bool ProcessIdle();
|
||||
|
||||
/*
|
||||
#if wxUSE_CMDLINE_PARSER
|
||||
virtual void OnInitCmdLine(wxCmdLineParser& parser)
|
||||
|
|
@ -150,6 +150,7 @@ public:
|
|||
void OnFindOptions(wxCommandEvent& evt);
|
||||
void OnEnableContextMenu(wxCommandEvent& evt);
|
||||
|
||||
|
||||
private:
|
||||
wxTextCtrl* m_url;
|
||||
wxWebView* m_browser;
|
||||
|
|
@ -266,11 +267,6 @@ int WebApp::OnExit()
|
|||
return wxApp::OnExit();
|
||||
}
|
||||
|
||||
bool WebApp::ProcessIdle() {
|
||||
wxWebViewChromium::RunMessageLoopOnce();
|
||||
return wxApp::ProcessIdle();
|
||||
}
|
||||
|
||||
WebFrame::WebFrame(const wxString& url) :
|
||||
wxFrame(NULL, wxID_ANY, "wxWebView Sample")
|
||||
{
|
||||
|
|
|
|||
|
|
@ -111,7 +111,7 @@ bool wxWebViewChromium::Create(wxWindow* parent,
|
|||
gtk_widget_show_all(GTK_WIDGET(window));
|
||||
#endif
|
||||
this->Bind(wxEVT_SIZE, &wxWebViewChromium::OnSize, this);
|
||||
|
||||
this->Bind(wxEVT_IDLE, &wxWebViewChromium::RunCEFMessageLoopOnIdle);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
@ -457,7 +457,7 @@ int wxWebViewChromium::StartUpSubprocess()
|
|||
return CefExecuteProcess(args, NULL);
|
||||
}
|
||||
|
||||
void wxWebViewChromium::RunMessageLoopOnce()
|
||||
void wxWebViewChromium::RunCEFMessageLoopOnIdle(wxIdleEvent& event)
|
||||
{
|
||||
CefDoMessageLoopWork();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue