File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change 1
1
我来说windows下CEF3.2171的关闭流程,里面会引用一部分官方库的文档和个人的伪代码,为了辅助理解——
2
2
以下是截取自cef_life_span_handler.h的头文件文档,所以一部分文档他还是写在头文件里的,根据他的流程,能很快的去梳理相关逻辑
3
3
4
- > // The CefLifeSpanHandler::OnBeforeClose() method will be called immediately
4
+ ```
5
+ // The CefLifeSpanHandler::OnBeforeClose() method will be called immediately
5
6
// before the browser object is destroyed. The application should only exit
6
7
// after OnBeforeClose() has been called for all existing browsers.
7
8
//
33
34
// the browser object is destroyed.
34
35
// 11. Application exits by calling CefQuitMessageLoop() if no other browsers
35
36
// exist.
37
+ ```
36
38
37
39
pre1. 如果你要管理CefBrowser的生命周期,意味者你必须实现相关 CefLifeSpanHandler接口,在OnAfterCreated里管理和获取CefBrowser的每一个browser,在DoClose和OnBeforeClose里管理关闭
38
40
pre2. 这里要注意整个流程对应开发者来说不是线性代码,都是基于消息、事件投递、接口切面的一种编程习惯,大家要对异步接口的开发有心理准备,你实现的一个接口都是等待框架或者别人调用。
You can’t perform that action at this time.
0 commit comments