1 Star 0 Fork 40

307677814 / EasyCKL

forked from daemon_process / EasyCKL 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
simple_app.cpp 1.15 KB
一键复制 编辑 原始数据 按行查看 历史
#include "simple_app.h"
#include "CKLMain.h"
#ifdef _WIN32
extern HANDLE hEvent;
#endif
extern Chrome_CallBack_V8 v8contextcreate;
extern Chrome_CallBack_AddCmdline addCmdlineFunc;
extern CefString szProxyServer;
extern BOOL bEnableFlash;
extern CefString szFlashPath;
extern BOOL bDisableGpu;
SimpleApp::SimpleApp() {
}
void SimpleApp::OnContextInitialized() {
CEF_REQUIRE_UI_THREAD();
#ifdef _WIN32
SetEvent(hEvent);
#endif
}
void SimpleApp::OnContextCreated(CefRefPtr<CefBrowser> browser, CefRefPtr<CefFrame> frame, CefRefPtr<CefV8Context> context) {
if (v8contextcreate) {
v8contextcreate(context.get());
}
}
void SimpleApp::OnBeforeCommandLineProcessing(const CefString& process_type, CefRefPtr<CefCommandLine> command_line) {
if (bEnableFlash) {
if (!szFlashPath.empty())
command_line->AppendSwitchWithValue(L"ppapi-flash-path", szFlashPath);
else command_line->AppendSwitch(L"enable-system-flash");
}
if (!szProxyServer.empty())
command_line->AppendSwitchWithValue(L"proxy-server", szProxyServer);
if(bDisableGpu)
command_line->AppendSwitchWithValue(L"disable-gpu", szProxyServer);
if (addCmdlineFunc)
addCmdlineFunc(&command_line);
}
C++
1
https://gitee.com/307677814/EasyCKL.git
git@gitee.com:307677814/EasyCKL.git
307677814
EasyCKL
EasyCKL
master

搜索帮助