Commit graph

23 commits

Author SHA1 Message Date
Tobias Taschner
98a91eef40
Use single code base for webview_chromium and webview sample
While extra project/build files are required because of
extra linked libraries the core UI source only needs a few
small tweaks.
2018-02-20 18:33:13 +01:00
Steven Lamerton
40f7908232
Update wxWebViewChromium copyright dates. 2018-02-20 18:33:07 +01:00
Steven Lamerton
7d236bfa31
Increase speed of wxWebViewChromium timer. 2018-02-20 18:33:05 +01:00
Haojian Wu
87c9643748
Avoid compiler's warning of unused parameters. 2018-02-20 18:32:43 +01:00
Haojian Wu
52974a90da
Use wxUSE_WEBVIEW_CHROMIUM marco check in sample. 2018-02-20 18:32:11 +01:00
Haojian Wu
53e70394f9
Cleanup some commented code. 2018-02-20 18:32:00 +01:00
Haojian Wu
8be92e3c3e
Restore OnExit method.
Althrough there is fine to exit the program without calling CEFShutdown on Win/Linux platforms, it's better to
call it explicitly.
2018-02-20 18:31:59 +01:00
Haojian Wu
3be9e2bf3d
Running CEFMessageLoop in wxTimer instead of OnIdle.
Running CEFMessageLoop form OnIdle, which may pontentially starve CEF
messageloop when application is busy with other UI-operation.

Change it to timer to avoid the starvation.
2018-02-20 18:31:58 +01:00
Haojian Wu
012567f6e1
Rename RunCEFMessageLoopOnIdle to DoCEFWork for better understanding. 2018-02-20 18:31:57 +01:00
Haojian Wu
7e2ed11b62
Correct help/doc.zip loading path.
Due to webview sample building directory is different from platforms and
compilers, we need to retrieve the `<wxwidgets-src>/help/` absolute path
from building directory.
2018-02-20 18:31:53 +01:00
Haojian Wu
e3026f9e8b
[Win/Linux] A temporary fix crashing when closing WebFrame. 2018-02-20 18:31:51 +01:00
Haojian Wu
8e6b115a1b
Use Connect method instead of EVENT_TABLE to hook WebFrame::OnClose event. 2018-02-20 18:31:50 +01:00
Haojian Wu
5ad175f36b
Remove unnecessary code. 2018-02-20 18:31:47 +01:00
Haojian Wu
dbf0e9721a
Fix a crash issue when close wxwebview_chromium sample.
On Mac OS X, it will trigger a crash issue when user close the window
(It also appear in other platforms, but the crash doesn't appear.)

The crash is caused by calling `CefShutdown` in wxApp::OnExit(). When
wx application running in wxApp::OnExit function, the webframe has been
deleted, we need to call `CefShutdown` in webframe `Close` period.
2018-02-20 18:31:46 +01:00
Haojian Wu
8138f09683
[Mac] Resize browser window. 2018-02-20 18:31:45 +01:00
Haojian Wu
5ba2b8692f
[Mac] Fix find bar is overrided by webview window issue. 2018-02-20 18:31:44 +01:00
Haojian Wu
fa3bdd32a7
Enable webview_chromium building through xcode on mac OS X. 2018-02-20 18:31:40 +01:00
Haojian Wu
1c2885b290
Fix argument inconsistency issue. 2018-02-20 18:31:31 +01:00
Haojian Wu
9061615ec6
Remove CEF message loop running to client.
Running CEF message loop inside wxWebviewChromium internal will get
segument fault, while moving to client doesn't.

Reset to the previous client solution to avoid segument falut, since I
don't figure out the segument fault reason.
2018-02-20 18:31:31 +01:00
Haojian Wu
d51a8d20f7
Set cef messageloop running inside wxWebviewChromium instead of client
side.
2018-02-20 18:31:27 +01:00
Haojian Wu
9eca39a928
Integrate CEF MessageLoop to wxWidgets MessageLoop.
* Enable webview_chromium on Linux, webview_chromium runs normally,
  but browser window is split out of wxWidget window now and we need to
  host it in wxWidgets window later.
* Make cef messageloop processing in wx::ProcessIdle period, this way
works on windows and linux.
* Don't use multiple_message_loop on Windows.
2018-02-20 18:31:24 +01:00
Haojian Wu
a556deffb8
Remove unnecessary subprocess.exe during webview startups. 2018-02-20 18:31:13 +01:00
Haojian Wu
02b72bee46
Integrate wxWebChromium to wxwidgets
Also add webview_chromium usage samples.
2018-02-20 18:31:03 +01:00