Google Chromium的CEF 试用笔记

一、下载项目

我从网上没直接找到网址,我是从群“WebKit 内核浏览器开发”里下载的,在这里特提出感谢。

文件名是:cef_binary_3.2171.1949_windows32


二、VS打开项目,展开如下:

Google Chromium的CEF 试用笔记_第1张图片

cefsimple是一个简单的示例,如果自己的代码里要引用网址,可以使用cefsimple直接加载自己的项目。

要加载默认网址,在命令行设置网址:

Google Chromium的CEF 试用笔记_第2张图片

运行简易版时,cefclient项目可以卸载。


在代码里改变初始加载的URL,可以修改simple_app.cpp

	// Specify CEF browser settings here.
	CefBrowserSettings browser_settings;

	std::string url;

	

	// Check if a "--url=" value was provided via the command-line. If so, use
	// that instead of the default URL.
	CefRefPtr<CefCommandLine> command_line = CefCommandLine::GetGlobalCommandLine();
	url = command_line->GetSwitchValue("url");
	if (url.empty())
		url = "http://blog.csdn.net/xundh";


	// Create the first browser window.
	CefBrowserHost::CreateBrowser(window_info, handler.get(), url,browser_settings, NULL);


你可能感兴趣的:(windows,浏览器,Google,webkit,chromium)