cef

Options for embedding Chromium instead of IE WebBrowser control with WPF/C#

匿名 (未验证) 提交于 2019-12-03 02:11:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: Internet Explorer-based WPF WebBrowser control suffers from some keyboard and focus issues and memory leak issues . As an alternative solution to these problems, we're considering available options for hosting Chromium instead of WebBrowser control in our WPF/C# project based around HTML editing. Similar questions have been asked here previously. I've read the answers and done my own research, but I hope to obtain some more feedback from people who have actually used any of the following options in production-quality projects :

CEF 3 Disable WebRTC - Ip leaks

匿名 (未验证) 提交于 2019-12-03 01:45:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: Can we disable WebRTC in CEF 3 ? I`m referring specifically to JavaScript access to local ips. Chrome seems to have settings like chrome.privacy.network.webRTCMultipleRoutesEnabled that help - but these do not seem to exist in CEF. 回答1: I had same problem and ended up rebuilding CEF and Chrome without WebRTC support. Here is steps, which I use: Download automate-git.py script in c:/code/automate folder from here: https://bitbucket.org/chromiumembedded/cef/raw/master/tools/automate/automate-git.py Create batch with following content and run

CEF CefRenderProcessHandler::OnContextCreated not called

匿名 (未验证) 提交于 2019-12-03 01:45:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: Who tried add native function to javascript in CEF? It was not work, simple to reappear: download the CEF3 binary package (1750) open cefclient2010.sln open client_app.cpp which in cefclient project goto line 110, set a breakpoint F5 input any url, any try, the breakpoint never breaked Am I missed some steps? or some settings? 回答1: i had the same problem you must add CefRenderProcessHandler interface in SimpleApp ,then the most important is you must implement CefApp::GetRenderProcessHandler() method . just like this: virtual CefRefPtr

How to enable H264 support in CEF3 latest version ?

匿名 (未验证) 提交于 2019-12-03 01:27:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I have known that cef3's older version like 2623 can enable H264 support through modify chromium\src\cef\cef.gypi file. But in recent versions like 3071 or 3029, cef3 has removed cef.gypi file. I have googled this, but what I found is still through modify the cef.gypi file. Since this methold is only valid for older versions. Is there another way that I can make newer version enable H264 support ? Thanks very much! 回答1: Indeed the compile option to support proprietary codecs was moved. the magic now happens here: set GN_DEFINES=is_official

CEF3 single process mode in production

匿名 (未验证) 提交于 2019-12-03 00:50:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: Are there any real pitfalls in using single process mode in production? The official statement seems to discourage this, but so far the application has been stable. CEF1 seems to have been abandoned, and if CEF3 single process is used for dev, then the latter should be at the very least be part of the test suite, and therefore stable. Or is that not true? Also, is CEF3 single process not equivalent to CEF1? The new Battle.net launcher is using CEFl (1453). I wonder if that was for legacy reasons or if that was a conscious decision to avoid

基于cef3浏览器开发精力

匿名 (未验证) 提交于 2019-12-03 00:22:01
cef3下载地址 说明: 1. Standard Distribution 里面包含了一些动态和静态库及源码 3. Sample Application 一个典型的示例程序 2. Release 里面仅有一个libcef.pdb 下载好后,需要自行编译一个libcef_dll_wrapper.lib库文件,编译方法: 1. 下载一个cmake程序 2. 安装好,配置环境变量,保证cmake命令能够响应(或使用gui) 3.解压下载好的源码(例如解压到:D:\Longruan\third\trunk\cef_3.3396.1775)文件夹 4.进入文件夹下(D:\Longruan\third\trunk\cef_3.3396.1775)目录 5.输入命令如下 cmake -G "Visual Studio 10" 等待执行完毕 6. 打开cef.sln工程,编译libcef_dll_wrapper工程,即可。 cef3开发的浏览器,关闭时程序崩溃 CefShutdown() ; // 执行这句话,程序崩溃 相信使用最新的cef库的同学会遇到这个问题。cef的示例程序里有完整的示例,基本能够满足要求。但是cef的示例使用了单例,在自己的程序里,如果把cef嵌入到自己的对话框中,cef是作为一个child存在的,需要把单例去掉(使用类成员可解决这个问题)。 单例模式去掉

【Cef编译】 CefSharp编译失败,检测到“RuntimeLibrary”的不匹配项: 值“MT_StaticRelease”不匹配值“MD_DynamicRelease”

匿名 (未验证) 提交于 2019-12-03 00:08:02
编译CefSharp生成后一个libcef_dll_wrapper.lib时,供CefSharp使用。结果CefSharp编译的时候报错。遇到以下异常: 原因: C++项目设置,运行库属性不匹配。 运行库属性,有四个选项及含义分别如下: 多线程调试Dll (/MDd) 对应的是MD_DynamicDebug 多线程Dll (/MD) 对应的是MD_DynamicRelease 多线程(/MT) 对应的是MD_StaticRelease 多线程(/MTd)对应的是MD_StaticDebug 详细文档见官网: /MD、/MT、/LD(使用运行时库) 解决方案: 在libcef_dll_wrapper.lib的项目属性中,修改为多线程调试Dll (/MDd) 来源:博客园 作者: 唐宋元明清2188 链接:https://www.cnblogs.com/kybs0/p/11538290.html

CEF:注册JS回调

匿名 (未验证) 提交于 2019-12-02 23:42:01
前面我们学习了C++和JS的基本交互。例如C++调用js。 browser->GetMainFrame()->ExecuteJavaScript(js, L"", 0); 但是在实际应用过程中可能我们事先并不知道函数原型,而是使用的函数指针来回调结果。例如: do_event(call_back,parama1,parama2,....paramaN) 此时需要使用CEF::ExecuteFunction 和ExecuteFunctionWithContext()方法执行JS函数。ExecuteFunction()方法只允许用在V8中,且V8在“使用上下文”所描述的上下文中。ExecuteFunctionWithContext()方法允许应用程序指定即将执行的上下文。 下面我们将实现一个最简单的回调模型:注册+回调。 步骤: CefV8Handler实现register 保存Callback的上下文 进入上下文调用回调 执行完退出上下文 //Render进程注册回调函数 void CRenderApp::OnWebKitInitialized() { CEF_REQUIRE_RENDERER_THREAD(); // Define the extension contents. std::string extensionCode = "var MyMath;" "if (

CEF3编译添加mp4支持(对应CefSharp63.0.3),chromium63(3239),附release下载

匿名 (未验证) 提交于 2019-12-02 22:10:10
编译环境需求(3239版本) win7或更高,64位 vs2017 15.3.2+ 默认位置安装 不需要安装附带的win10sdk,sdk单独装 Windows 10.0.15063.468 SDK 默认位置安装 下载相应版本sdk 8g ram 和 40g disk 实测 完全不够 ,最终编译成功时是16g内存+32g虚拟内存+110g左右的磁盘空间,据说是因为新版official编译巨耗内存 可以不可描述的互联网 我是用proxfixer配合ss实现全局代理 其他 https://bitbucket.org/chromiumembedded/cef/wiki/BranchesAndBuilding.md 在这里可以查看不同的branch版本需要的具体环境 WARNING: If you are using VS2017 15.5.* to build 3282 branch then you must add enable_precompiled_headers=false to GN_DEFINES to avoid a known issue with clang. 步骤 使用cmd命令行操作 盘符和路径可改,保证目录结构即可,留足至少100g空间 创建文件夹 c:\code\automate c:\code\chromium_git 下载depot_tools.zip

CEF编译 执行gn args out\\Release_GN_x86异常

久未见 提交于 2019-11-29 23:54:49
gn args out\Debug_GN_x86 用来配置编译参数,执行gn args out\Release_GN_x86时异常: Toolchain is out of date. Run "gclient runhooks" to update the toolchain, or set DEPOT_TOOLS_WIN_TOOLCHAIN=0 to use the locally installed toolchain. 解决方案: 先执行set DEPOT_TOOLS_WIN_TOOLCHAIN=0,使用本地安装的工具链 然后再执行gn args out\Release_GN_x86 来源: https://www.cnblogs.com/kybs0/p/11540936.html