C# : CEF操作
代码挺差的,仅供学习、参考
class CEFGlueLoader
{
class CefAppImpl : CefApp
{
protected override void OnBeforeCommandLineProcessing(string processType, CefCommandLine commandLine)
{
commandLine.AppendArgument("enable-npapi");
commandLine.AppendSwitch("enable-media-stream", "enable-media-stream");
commandLine.AppendSwitch("process-per-site");
commandLine.AppendSwitch("ppapi-flash-version", "23.0.0.185");//PepperFlash\manifest.json中的version
commandLine.AppendSwitch("ppapi-flash-path", "PepperFlash\\pepflashplayer.dll");
}
} public static void InitCEF()
{
#if !_ORG_MANAGER && !_MBMAKER
CefRuntime.Load();
string[] args = new string[];
var mainArgs = new CefMainArgs(args);
var app = new CefAppImpl();
var exitCode = CefRuntime.ExecuteProcess(mainArgs, app);
System.Diagnostics.Trace.WriteLine("CefRuntime.ExecuteProcess return: " + exitCode);
if (exitCode != -)
{
return;
} var settings = new CefSettings
{
BrowserSubprocessPath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, @"bin\Cef3Process.exe"),
SingleProcess = false,
MultiThreadedMessageLoop = true,
LogSeverity = CefLogSeverity.Default,
LogFile = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, @"log\CefGlue.log"),
CachePath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, @"cache"),
CommandLineArgsDisabled = true,
Locale = "zh_CN",
LocalesDirPath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, @"bin\locales"),
RemoteDebuggingPort = , };
CefRuntime.Initialize(mainArgs, settings, app); if (!settings.MultiThreadedMessageLoop)
{
System.Windows.Forms.Application.Idle += (sender, e) => { CefRuntime.DoMessageLoopWork(); };
}
#endif
} private static string GetPath(string v)
{
return Path.GetFullPath(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, v));
} public static void ShutDownCEF()
{
#if !_ORG_MANAGER && !_MBMAKER
try
{
CefRuntime.Shutdown();
}
catch (Exception)
{
}
#endif
}
}
C# : CEF操作的更多相关文章
- CEF 支持JSON操作
转载:https://blog.csdn.net/foruok/article/details/50687864(解析json) 转载:https://blog.csdn.net/foruok/art ...
- cisco 下CEF(简介)[转载]
cisco 下CEF(简介) 转自:http://blog.51cto.com/chengmingshu/803358 cms_cmd1人评论2570人阅读2012-03-12 00:09:29 ...
- qt添加cef库嵌入web [转]
qt cef嵌入web 原文http://blog.sina.com.cn/s/blog_9e59cf590102vnfc.html 最近项目需要,研究了下libcef库. Cef(Chromium ...
- 使用C#在CEF中拦截并响应请求
一.前言 忙里偷闲,研究了一下如何在CEF中拦截请求,并作出响应.这个功能对某些需要修改服务器响应的需求来说必不可少,可以直接读取本地文件作为响应内容. C#的CEF封装项目有很多,我使用的是Chro ...
- Duilib嵌入CEF以及JavaScript与C++交互
转载:http://blog.csdn.net/foruok/article/details/50573612 转载:http://blog.csdn.net/foruok/article/detai ...
- 初识CEF
介绍 CEF全称Chromium Embedded Framework,是一个基于Google Chromium 的开源项目.Google Chromium项目主要是为Google Chrome应用开 ...
- CEF使用的几个注意点
CEF为chrome浏览器的切入其他浏览器中的轻量级框架. 开发的客户端的时候,这是作为界面显示的首先,可以增强客户的易变性,可塑性. 在开发的过程中(侧重于C,C++解决),遇到的几个问题,以及自己 ...
- 允许CEF跨域访问iframe
默认情况下,如果嵌入本地Web页面,并在页面内部使用iframe来显示一个在线页面,加载的过程中会触发一个未捕获异常,虚函数CefV8ContextHandler::OnUncaughtExcepti ...
- CEF中文教程(google chrome浏览器控件) -- Windows下编译Chromium
CEF中文教程(google chrome浏览器控件) -- CEF简介 2013-04-10 16:48 42928人阅读 评论(4) 收藏 举报 分类: CEF(2) 目录(?)[+] ...
随机推荐
- PHP 使用 password_hash() 给密码加密
PHP >= 5.5 时,可以使用 password_hash() 和 password_verify() 来对用户的密码进行加密和验证,例如在用户注册(加密存储)和登陆(验证): <?p ...
- ubuntu开启SSH服务
SSH分客户端openssh-client和openssh-server 如果你只是想登陆别的机器的SSH只需要安装openssh-client(ubuntu有默认安装,如果没有则sudo apt-g ...
- ruby 随笔
1.A Server is running获取PID lsof -wni tcp:3000关闭PID kill -9 pID2.rubymine注册码http://idea.lanyus.com/ 3 ...
- node.js环境
1.首先获得node环境 node -v; 2.判断node包管理器的版本 npm-v;查看node包管理器的版本; 3.npm install -g express 安装node.js的web开发框 ...
- tp的极光推送demo
原文地址:http://blog.csdn.net/zhihua_w/article/details/52197611 极光推送(JPush)是独立的第三方云推送平台,致力于为全球移动应用开发者提供专 ...
- 解决点击cell时,UILabel的背景颜色消失的问题
-(void)setSelected:(BOOL)selected animated:(BOOL)animated{ [super setSelected:selected animated:anim ...
- java测试框架整理
Test: Junit4+Hamcrest 不多说了,就靠着两个 import static org.hamcrest.Matchers.equalTo; import static org.juni ...
- phyton 相关学习
http://www.nowamagic.net/academy/category/13/ http://www.runoob.com/python/python-reg-expressions.ht ...
- 【OpenWRT】【RT5350】【二】烧写OpenWrt到RT5350开发板
烧写bin文件到开发板的方式有很多种,我采用的是通过web页面直接上传文件的方式 首先通过浏览器登陆路由器(192.168.1.1),作者的开发板已经烧好了OpenWrt并且可以通过Luci登陆,所以 ...
- Android JavaMail
一.简介 JavaMail API提供了一种与平台无关和协议独立的框架来构建邮件和消息应用程序. JavaMail API提供了一组抽象类定义构成一个邮件系统的对象.它是阅读,撰写和发送电子信息的可选 ...