Quantcast
Channel: HTML5
Viewing all articles
Browse latest Browse all 663

An HTML5 Project with Chromium Embedded Framework

$
0
0

As applications developed with HTML5 increases, developers tend to face the initial obstacle that their applications may be constrained by the browsers at which they are accessed through. The Chromium Embedded Framework (CEF) is an open source project that allows for a desktop application to support HTML5 features and plugins in web browser controls that are similarly supported by Google* Chrome. Chromium Embedded Framework is also available for use on Windows, Linux and Mac OS X systems. C/C++ is the programming languages that CEF is developed with via native libraries based on your platform of choice. There are two distinct versions of the framework that are currently maintained. CEF1 is a single process architecture implementation that provides reduced memory usage and supports the Webkit API as well as the Netscape Plugin Application Programming Interface (NPAPI) plugins. Reduced performance is apparent when running accelerated content as well as plugins such as Adobe* Flash while support for HTML5 audio & video is not present. CEF3 is a multi-process implementation that provides improved performance and a close relationship to Chrome due to their shared code as well as the Chromium Content API. CF3 also supports GPU acceleration, WebRTC, and more HTML5 features than CEF1.

Building a Windows application with HTML5 & Chromium Embedded Framework (CEF)
When it comes to building a Windows application to implement your HTML5 project outside of a standard browser, a few resources is needed.

1. Visual Studio 2005, 2008 or 2010
2. CEF binary files (https://code.google.com/p/chromiumembedded/downloads/list)

Visual Studio is used to navigate the solution's file structure and edit the necessary .cpp files. In order to have the CEF client sample application load a HTML5 project (for example "html5app" folder in the “Release” directory),  changes should be made to the "client_hander.cpp" file under the “cefclient” folder.

//client_handler.cpp – line 32
m_StartupURL = "file:///<path_to_index_file>";
//m_StartupURL = "file:///html5app/index.html"

With this line change, execute a Rebuild of the solution to create a new “cefclient.exe” file which will be located under the Release folder.  Your HTML5 project should be viewable in the application's window.

Here are a few references:

图标图像: 


Viewing all articles
Browse latest Browse all 663


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>