资源简介

CEF编译 开发,Chrome内核 CEF与JS交互,资源内容为动态库和测试demo,代码粗陋望包含 感谢 foruok和慕容昭雪 的文章,实在是没有积分,所以要了3分。

资源截图

代码片段和文件信息

#include “StdAfx.h“

#include “CefAppEx.h“
#include “CefClientEx.h“

#include “include/cef_browser.h“
#include “include/cef_command_line.h“
#include “include/wrapper/cef_helpers.h“


CefAppEx::CefAppEx(void)
{
}


CefAppEx::~CefAppEx(void)
{
}

void CefAppEx::OnContextInitialized() {

}

//注册 JS 代码
void CefAppEx::OnWebKitInitialized()
{
char javascriptCode[4096]={0};

strcat(javascriptCode“function Exam() {}\n“);
strcat(javascriptCode“if (!Exam) Exam = {};\n“);
strcat(javascriptCode“(function() {\n“);
strcat(javascriptCode“answerSubmit = function(id) {\n“);
strcat(javascriptCode“native function AnswerSubmit(id);\n“);
strcat(javascriptCode“return AnswerSubmit(id);\n“);
strcat(javascriptCode“};\n“);
strcat(javascriptCode“submitPage = function() {\n“);
strcat(javascriptCode“native function SubmitPage();\n“);
strcat(javascriptCode“return SubmitPage();\n“);
strcat(javascriptCode“};\n“);
strcat(javascriptCode“returnValue = function() {\n“);
strcat(javascriptCode“native function ReturnValue();\n“);
strcat(javascriptCode“return ReturnValue();\n“);
strcat(javascriptCode“};\n“);
strcat(javascriptCode“controlPlay = function(opid) {\n“);
strcat(javascriptCode“native function controlPlay(opid);\n“);
strcat(javascriptCode“return controlPlay(opid);\n“);
strcat(javascriptCode“};\n“);
strcat(javascriptCode“})();“);

CefRegisterExtension(“JsFunc“javascriptCodenew CefV8HandlerEx());

}


 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2016-05-11 16:38  CEF\
     目录           0  2016-05-11 16:02  CEF\CEFBrowser2\
     目录           0  2016-05-11 16:01  CEF\CEFBrowser2\CEFBrowser2\
     文件        1498  2016-05-09 16:48  CEF\CEFBrowser2\CEFBrowser2\CefAppEx.cpp
     文件         732  2016-05-09 15:49  CEF\CEFBrowser2\CEFBrowser2\CefAppEx.h
     文件      105824  2016-05-09 16:42  CEF\CEFBrowser2\CEFBrowser2\CEFBrowser2.aps
     文件        2058  2016-05-09 09:01  CEF\CEFBrowser2\CEFBrowser2\CEFBrowser2.cpp
     文件         472  2016-05-07 16:36  CEF\CEFBrowser2\CEFBrowser2\CEFBrowser2.h
     文件       10304  2016-05-09 16:42  CEF\CEFBrowser2\CEFBrowser2\CEFBrowser2.rc
     文件        6937  2016-05-09 16:06  CEF\CEFBrowser2\CEFBrowser2\CEFBrowser2.vcxproj
     文件        2763  2016-05-09 16:06  CEF\CEFBrowser2\CEFBrowser2\CEFBrowser2.vcxproj.filters
     文件         143  2016-05-07 16:36  CEF\CEFBrowser2\CEFBrowser2\CEFBrowser2.vcxproj.user
     文件        8164  2016-05-09 16:49  CEF\CEFBrowser2\CEFBrowser2\CEFBrowser2Dlg.cpp
     文件        1028  2016-05-09 16:44  CEF\CEFBrowser2\CEFBrowser2\CEFBrowser2Dlg.h
     文件        3300  2016-05-09 15:15  CEF\CEFBrowser2\CEFBrowser2\CefClientEx.cpp
     文件        1751  2016-05-09 10:34  CEF\CEFBrowser2\CEFBrowser2\CefClientEx.h
     文件        1974  2016-05-09 16:39  CEF\CEFBrowser2\CEFBrowser2\CefV8HandlerEx.cpp
     文件         662  2016-05-09 16:13  CEF\CEFBrowser2\CEFBrowser2\CefV8HandlerEx.h
     文件       74285  2016-05-09 16:51  CEF\CEFBrowser2\CEFBrowser2\debug.log
     文件         204  2016-05-09 16:35  CEF\CEFBrowser2\CEFBrowser2\MessageType.h
     文件        3217  2016-05-07 16:36  CEF\CEFBrowser2\CEFBrowser2\ReadMe.txt
     目录           0  2016-05-11 16:01  CEF\CEFBrowser2\CEFBrowser2\res\
     文件       67777  2009-08-31 02:31  CEF\CEFBrowser2\CEFBrowser2\res\CEFBrowser2.ico
     文件         678  2016-05-07 16:36  CEF\CEFBrowser2\CEFBrowser2\res\CEFBrowser2.rc2
     文件        1736  2016-05-09 16:42  CEF\CEFBrowser2\CEFBrowser2\resource.h
     文件         144  2016-05-07 16:36  CEF\CEFBrowser2\CEFBrowser2\stdafx.cpp
     文件        1656  2016-05-09 16:37  CEF\CEFBrowser2\CEFBrowser2\stdafx.h
     文件         234  2016-05-07 16:36  CEF\CEFBrowser2\CEFBrowser2\targetver.h
     文件         900  2016-05-07 16:36  CEF\CEFBrowser2\CEFBrowser2.sln
     文件       88576  2016-05-09 16:52  CEF\CEFBrowser2\CEFBrowser2.suo
     目录           0  2016-05-11 16:39  CEF\CEFBrowser2\Debug\
............此处省略74个文件信息

评论

共有 条评论