資源簡介
Cef3博文的配套源代碼,注意其中沒有放 Cef3 庫的資源(因為太大了...)。建議配合博文一起查看。博文地址:http://blog.csdn.net/u011304970/article/details/77592775

代碼片段和文件信息
#include?“include/cef_app.h“
#include?“include/cef_browser.h“
#include?“include/cef_client.h“
#include?“include/wrapper/cef_closure_task.h“
#include?“include/wrapper/cef_helpers.h“
#include?
class?MyClient?:?public?CefClient?public?CefLifeSpanHandler
{
public:
????virtual?~MyClient()?{}
????virtual?CefRefPtr?GetLifeSpanHandler()?override?{?return?this;?}
????virtual?void?OnBeforeClose(CefRefPtr?browser)?override?{?CefQuitMessageLoop();?}
private:
????IMPLEMENT_REFCOUNTING(MyClient);
};
class?MyApp?:?public?CefApp?public?CefBrowserProcessHandler
{
public:
????virtual?~MyApp()?{}
????virtual?CefRefPtr?GetBrowserProcessHandler()?override?{?return?this;?}
????virtual?void?OnContextInitialized()?override?
????{
????????CEF_REQUIRE_UI_THREAD();
????????CefWindowInfo?window_info;
????????window_info.SetAsPopup(NULL?“cefsimple“);
????????CefRefPtr?client(new?MyClient());
????????CefString?url?=?“http://www.baidu.com“;
????????CefBrowserSettings?browser_settings;
????????CefBrowserHost::CreateBrowser(window_info?client?url?browser_settings?NULL);
????}
private:
????IMPLEMENT_REFCOUNTING(MyApp);
};
int?APIENTRY?wWinMain(HINSTANCE?hInstance?HINSTANCE?hPrevInstance?LPTSTR?lpCmdLine?int?nCmdShow)?
{
????CefMainArgs?main_args(hInstance);
????CefSettings?settings;
????settings.no_sandbox?=?true;
????//?獲取子進程路徑
????WCHAR?subProcessPath[MAX_PATH]?=?{?0?};
????GetModuleFileNameW(hInstance?subProcessPath?MAX_PATH);
????*(wcsrchr(subProcessPath?L‘\\‘)?+?1)?=?L‘\0‘;
????LPCWSTR?SUB_PROCESS_NAME?=?L“BrowserSubProcess.exe“;
????wcsncat_s(subProcessPath?MAX_PATH?SUB_PROCESS_NAME?wcslen(SUB_PROCESS_NAME));
????//?設置子進程路徑
????cef_string_from_wide(subProcessPath?MAX_PATH?&settings.browser_subprocess_path);
????auto?myApp?=?CefRefPtr(new?MyApp());
????CefInitialize(main_args?settings?myApp.get()?NULL);
????CefRunMessageLoop();
????CefShutdown();
????return?0;
}
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????目錄???????????0??2017-12-28?09:31??BrowserProcess\
?????文件????????8092??2017-08-29?15:13??BrowserProcess\BrowserProcess.vcxproj
?????文件?????????945??2017-08-29?15:13??BrowserProcess\BrowserProcess.vcxproj.filters
?????文件????????2049??2017-12-28?09:22??BrowserProcess\main.cpp
?????目錄???????????0??2017-12-28?09:31??CustomJS\
?????文件????????8086??2017-09-13?15:30??CustomJS\CustomJS.vcxproj
?????文件?????????945??2017-09-13?15:30??CustomJS\CustomJS.vcxproj.filters
?????目錄???????????0??2017-09-14?14:26??CustomJS\html\
?????文件????????3927??2017-09-14?14:26??CustomJS\html\annotated.html
?????文件?????????676??2017-09-14?14:26??CustomJS\html\bc_s.png
?????文件?????????147??2017-09-14?14:26??CustomJS\html\bdwn.png
?????文件????????3733??2017-09-14?14:26??CustomJS\html\classes.html
?????文件????????4055??2017-09-14?14:26??CustomJS\html\class_app_browser-members.html
?????文件????????6435??2017-09-14?14:26??CustomJS\html\class_app_browser.html
?????文件?????????894??2017-09-14?14:26??CustomJS\html\class_app_browser.png
?????文件????????3355??2017-09-14?14:26??CustomJS\html\class_app_other-members.html
?????文件????????4293??2017-09-14?14:26??CustomJS\html\class_app_other.html
?????文件?????????417??2017-09-14?14:26??CustomJS\html\class_app_other.png
?????文件????????4652??2017-09-14?14:26??CustomJS\html\class_app_renderer-members.html
?????文件????????7600??2017-09-14?14:26??CustomJS\html\class_app_renderer.html
?????文件?????????885??2017-09-14?14:26??CustomJS\html\class_app_renderer.png
?????文件????????4616??2017-09-14?14:26??CustomJS\html\class_browser_client-members.html
?????文件????????7491??2017-09-14?14:26??CustomJS\html\class_browser_client.html
?????文件?????????767??2017-09-14?14:26??CustomJS\html\class_browser_client.png
?????文件?????????132??2017-09-14?14:26??CustomJS\html\closed.png
?????文件?????????746??2017-09-14?14:26??CustomJS\html\doc.png
?????文件???????27960??2017-09-14?14:26??CustomJS\html\doxygen.css
?????文件????????3779??2017-09-14?14:26??CustomJS\html\doxygen.png
?????文件????????3140??2017-09-14?14:26??CustomJS\html\dynsections.js
?????文件?????????616??2017-09-14?14:26??CustomJS\html\folderclosed.png
?????文件?????????597??2017-09-14?14:26??CustomJS\html\folderopen.png
............此處省略109個文件信息
- 上一篇:CAD去除教育版印戳軟件
- 下一篇:MybatisPlugin crack 完美破解
評論
共有 條評論