1 Star 0 Fork 25

Lyon/php_desktop

forked from lobtao/php_desktop 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
unCEF.pas 1.41 KB
一键复制 编辑 原始数据 按行查看 历史
lobtao 提交于 2018-09-08 11:23 . add support workerman
unit unCEF;
interface
uses
uCEFv8Handler, uCEFApplication, uCEFConstants,
uCEFInterfaces, uCEFMiscFunctions, unV8Extension, unConfig, SysUtils;
procedure CreateGlobalCEFApp;
implementation
procedure GlobalCEFApp_OnWebKitInitializedEvent;
begin
TCefRTTIExtension.Register('app', TV8Extension);
end;
procedure CreateGlobalCEFApp;
var
strFlashPath: string;
begin
GlobalCEFApp := TCefApplication.Create;
GlobalCEFApp.OnWebKitInitialized := GlobalCEFApp_OnWebKitInitializedEvent;
GlobalCEFApp.Locale := 'zh-CN';
strFlashPath := unConfig.FAppPath + 'PepperFlash';
if DirectoryExists(strFlashPath) then
GlobalCEFApp.CustomFlashPath := strFlashPath
else
GlobalCEFApp.FlashEnabled := True;
GlobalCEFApp.EnableGPU := False;
GlobalCEFApp.DisableWebSecurity := True;
// GlobalCEFApp.MuteAudio := True;//开启后会导致flash播放没有声音
// GlobalCEFApp.FastUnload := True;
GlobalCEFApp.DisableSafeBrowsing := True;
// GlobalCEFApp.LogFile := 'log\debug.log';
// GlobalCEFApp.LogSeverity := LOGSEVERITY_INFO;
GlobalCEFApp.EnableMediaStream := True;
// GlobalCEFApp.EnableSpeechInput := False;
GlobalCEFApp.NoSandbox := False;
// GlobalCEFApp.SingleProcess := True;
// GlobalCEFApp.Cookies := 'cookies';
GlobalCEFApp.Cache := 'cache';
GlobalCEFApp.SetCurrentDir := True;
// GlobalCEFApp.BrowserSubprocessPath := 'browse.exe';
// ShowMessage(IntToStr(GlobalCEFApp.ChildProcessesCount));
end;
end.
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
PHP
1
https://gitee.com/LyonH/php_desktop.git
git@gitee.com:LyonH/php_desktop.git
LyonH
php_desktop
php_desktop
master

搜索帮助