Overview   Project   Class   Tree   Index 
CEF C++ API Docs - Revision 439
FRAMES    NO FRAMES
SUMMARY:  INNER | FIELD | CONSTR | METHOD

(default)
( globals)

   in cef.h
   in cef_nplugin.h
   in cef_version.h
   in cef_string_list.h
   in cef_string_map.h
   in cef_string_multimap.h
   in cef_string_types.h
   in cef_time.h
   in cef_types_wrappers.h

( globals)


Method Summary
 CEF_EXPORT int cef_build_revision()
          Returns the CEF build revision of the libcef library.
 CEF_EXPORT int cef_string_ascii_to_utf16( const char* src, size_t src_len, cef_string_utf16_t* output )
          
 CEF_EXPORT int cef_string_ascii_to_wide( const char* src, size_t src_len, cef_string_wide_t* output )
          These functions convert an ASCII string, typically a hardcoded constant, to a Wide/UTF16 string.
 CEF_EXPORT cef_string_list_t cef_string_list_alloc()
          Allocate a new string map.
 CEF_EXPORT void cef_string_list_append( cef_string_list_t list, const cef_string_t* value )
          Append a new value at the end of the string list.
 CEF_EXPORT void cef_string_list_clear( cef_string_list_t list )
          Clear the string list.
 CEF_EXPORT cef_string_list_t cef_string_list_copy( cef_string_list_t list )
          Creates a copy of an existing string list.
 CEF_EXPORT void cef_string_list_free( cef_string_list_t list )
          Free the string list.
 CEF_EXPORT int cef_string_list_size( cef_string_list_t list )
          Return the number of elements in the string list.
 CEF_EXPORT int cef_string_list_value( cef_string_list_t list, int index, cef_string_t* value )
          Retrieve the value at the specified zero-based string list index.
 CEF_EXPORT cef_string_map_t cef_string_map_alloc()
          Allocate a new string map.
 CEF_EXPORT int cef_string_map_append( cef_string_map_t map, const cef_string_t* key, const cef_string_t* value )
          Append a new key/value pair at the end of the string map.
 CEF_EXPORT void cef_string_map_clear( cef_string_map_t map )
          Clear the string map.
 CEF_EXPORT int cef_string_map_find( cef_string_map_t map, const cef_string_t* key, cef_string_t* value )
          Return the value assigned to the specified key.
 CEF_EXPORT void cef_string_map_free( cef_string_map_t map )
          Free the string map.
 CEF_EXPORT int cef_string_map_key( cef_string_map_t map, int index, cef_string_t* key )
          Return the key at the specified zero-based string map index.
 CEF_EXPORT int cef_string_map_size( cef_string_map_t map )
          Return the number of elements in the string map.
 CEF_EXPORT int cef_string_map_value( cef_string_map_t map, int index, cef_string_t* value )
          Return the value at the specified zero-based string map index.
 CEF_EXPORT cef_string_multimap_t cef_string_multimap_alloc()
          Allocate a new string multimap.
 CEF_EXPORT int cef_string_multimap_append( cef_string_multimap_t map, const cef_string_t* key, const cef_string_t* value )
          Append a new key/value pair at the end of the string multimap.
 CEF_EXPORT void cef_string_multimap_clear( cef_string_multimap_t map )
          Clear the string multimap.
 CEF_EXPORT int cef_string_multimap_enumerate( cef_string_multimap_t map, const cef_string_t* key, int value_index, cef_string_t* value )
          Return the value_index-th value with the specified key.
 CEF_EXPORT int cef_string_multimap_find_count( cef_string_multimap_t map, const cef_string_t* key )
          Return the number of values with the specified key.
 CEF_EXPORT void cef_string_multimap_free( cef_string_multimap_t map )
          Free the string multimap.
 CEF_EXPORT int cef_string_multimap_key( cef_string_multimap_t map, int index, cef_string_t* key )
          Return the key at the specified zero-based string multimap index.
 CEF_EXPORT int cef_string_multimap_size( cef_string_multimap_t map )
          Return the number of elements in the string multimap.
 CEF_EXPORT int cef_string_multimap_value( cef_string_multimap_t map, int index, cef_string_t* value )
          Return the value at the specified zero-based string multimap index.
 CEF_EXPORT cef_string_userfree_utf16_t cef_string_userfree_utf16_alloc()
          
 CEF_EXPORT void cef_string_userfree_utf16_free( cef_string_userfree_utf16_t str )
          
 CEF_EXPORT cef_string_userfree_utf8_t cef_string_userfree_utf8_alloc()
          
 CEF_EXPORT void cef_string_userfree_utf8_free( cef_string_userfree_utf8_t str )
          
 CEF_EXPORT cef_string_userfree_wide_t cef_string_userfree_wide_alloc()
          These functions allocate a new string structure.
 CEF_EXPORT void cef_string_userfree_wide_free( cef_string_userfree_wide_t str )
          These functions free the string structure allocated by the associated alloc function.
 CEF_EXPORT void cef_string_utf16_clear( cef_string_utf16_t* str )
          
 CEF_EXPORT int cef_string_utf16_cmp( const cef_string_utf16_t* str1, const cef_string_utf16_t* str2 )
          
 CEF_EXPORT int cef_string_utf16_set( const char16* src, size_t src_len, cef_string_utf16_t* output, int copy )
          
 CEF_EXPORT int cef_string_utf16_to_utf8( const char16* src, size_t src_len, cef_string_utf8_t* output )
          
 CEF_EXPORT int cef_string_utf16_to_wide( const char16* src, size_t src_len, cef_string_wide_t* output )
          
 CEF_EXPORT void cef_string_utf8_clear( cef_string_utf8_t* str )
          
 CEF_EXPORT int cef_string_utf8_cmp( const cef_string_utf8_t* str1, const cef_string_utf8_t* str2 )
          
 CEF_EXPORT int cef_string_utf8_set( const char* src, size_t src_len, cef_string_utf8_t* output, int copy )
          
 CEF_EXPORT int cef_string_utf8_to_utf16( const char* src, size_t src_len, cef_string_utf16_t* output )
          
 CEF_EXPORT int cef_string_utf8_to_wide( const char* src, size_t src_len, cef_string_wide_t* output )
          
 CEF_EXPORT void cef_string_wide_clear( cef_string_wide_t* str )
          These functions clear string values.
 CEF_EXPORT int cef_string_wide_cmp( const cef_string_wide_t* str1, const cef_string_wide_t* str2 )
          These functions compare two string values with the same results as strcmp().
 CEF_EXPORT int cef_string_wide_set( const wchar_t* src, size_t src_len, cef_string_wide_t* output, int copy )
          These functions set string values.
 CEF_EXPORT int cef_string_wide_to_utf16( const wchar_t* src, size_t src_len, cef_string_utf16_t* output )
          
 CEF_EXPORT int cef_string_wide_to_utf8( const wchar_t* src, size_t src_len, cef_string_utf8_t* output )
          These functions convert between UTF-8, -16, and -32 strings.
 CEF_EXPORT int cef_time_from_doublet( double time, cef_time_t* cef_time )
          
 CEF_EXPORT int cef_time_from_timet( time_t time, cef_time_t* cef_time )
          
 CEF_EXPORT int cef_time_to_doublet( const cef_time_t* cef_time, double* time )
          Converts cef_time_t to/from a double which is the number of seconds since epoch (Jan 1, 1970).
 CEF_EXPORT int cef_time_to_timet( const cef_time_t* cef_time, time_t* time )
          Converts cef_time_t to/from time_t.
 bool CefAddCrossOriginWhitelistEntry( const CefString& source_origin, const CefString& target_protocol, const CefString& target_domain, bool allow_target_subdomains )
          Add an entry to the cross-origin access whitelist.
 bool CefClearCrossOriginWhitelist()
          Remove all entries from the cross-origin access whitelist.
 bool CefClearSchemeHandlerFactories()
          Clear all registered scheme handler factories.
 bool CefCreateURL( const CefURLParts& parts, CefString& url )
          Creates a URL from the specified |parts|, which must contain a non-empty spec or a non-empty host and path (at a minimum), but not both.
 bool CefCurrentlyOn( CefThreadId threadId )
          CEF maintains multiple internal threads that are used for handling different types of tasks.
 bool CefDeleteCookies( const CefString& url, const CefString& cookie_name )
          Delete all cookies that match the specified parameters.
 bool CefDeleteStorage( CefStorageType type, const CefString& origin, const CefString& key )
          Deletes all storage of the specified type.
 void CefDoMessageLoopWork()
          Perform a single iteration of CEF message loop processing.
 bool CefInitialize( const CefSettings& settings, CefRefPtr< CefApp > application )
          This function should be called on the main application thread to initialize CEF when the application is started.
 bool CefParseURL( const CefString& url, CefURLParts& parts )
          Parse the specified |url| into its component parts.
 bool CefPostDelayedTask( CefThreadId threadId, CefRefPtr< CefTask > task, long delay_ms )
          Post a task for delayed execution on the specified thread.
 bool CefPostTask( CefThreadId threadId, CefRefPtr< CefTask > task )
          Post a task for execution on the specified thread.
 void CefQuitMessageLoop()
          Quit the CEF message loop that was started by calling CefRunMessageLoop().
 bool CefRegisterCustomScheme( const CefString& scheme_name, bool is_standard, bool is_local, bool is_display_isolated )
          Register a custom scheme.
 bool CefRegisterExtension( const CefString& extension_name, const CefString& javascript_code, CefRefPtr< CefV8Handler > handler )
          Register a new V8 extension with the specified JavaScript extension code and handler.
 bool CefRegisterPlugin( const CefPluginInfo& plugin_info )
          Register a plugin with the system.
 bool CefRegisterSchemeHandlerFactory( const CefString& scheme_name, const CefString& domain_name, CefRefPtr< CefSchemeHandlerFactory > factory )
          Register a scheme handler factory for the specified |scheme_name| and optional |domain_name|.
 bool CefRemoveCrossOriginWhitelistEntry( const CefString& source_origin, const CefString& target_protocol, const CefString& target_domain, bool allow_target_subdomains )
          Remove an entry from the cross-origin access whitelist.
 void CefRunMessageLoop()
          Run the CEF message loop.
 bool CefSetCookie( const CefString& url, const CefCookie& cookie )
          Sets a cookie given a valid URL and explicit user-provided cookie attributes.
 bool CefSetCookiePath( const CefString& path )
          Sets the directory path that will be used for storing cookie data.
 bool CefSetStorage( CefStorageType type, const CefString& origin, const CefString& key, const CefString& value )
          Sets storage of the specified type, origin, key and value.
 bool CefSetStoragePath( CefStorageType type, const CefString& path )
          Sets the directory path that will be used for storing data of the specified type.
 void CefShutdown()
          This function should be called on the main application thread to shut down CEF before the application exits.
 bool CefVisitAllCookies( CefRefPtr< CefCookieVisitor > visitor )
          Visit all cookies.
 bool CefVisitStorage( CefStorageType type, const CefString& origin, const CefString& key, CefRefPtr< CefStorageVisitor > visitor )
          Visit storage of the specified type.
 bool CefVisitUrlCookies( const CefString& url, bool includeHttpOnly, CefRefPtr< CefCookieVisitor > visitor )
          Visit a subset of cookies.
 inline bool operator!=( const CefRect& a, const CefRect& b )
          
 inline bool operator==( const CefRect& a, const CefRect& b )
          
 

Method Detail

cef_build_revision

 CEF_EXPORT int cef_build_revision();
Returns the CEF build revision of the libcef library.

cef_string_ascii_to_utf16

 CEF_EXPORT int cef_string_ascii_to_utf16( const char* src, size_t src_len, cef_string_utf16_t* output );

cef_string_ascii_to_wide

 CEF_EXPORT int cef_string_ascii_to_wide( const char* src, size_t src_len, cef_string_wide_t* output );
These functions convert an ASCII string, typically a hardcoded constant, to a Wide/UTF16 string. Use instead of the UTF8 conversion routines if you know the string is ASCII.

cef_string_list_alloc

 CEF_EXPORT cef_string_list_t cef_string_list_alloc();
Allocate a new string map.

cef_string_list_append

 CEF_EXPORT void cef_string_list_append( cef_string_list_t list, const cef_string_t* value );
Append a new value at the end of the string list.

cef_string_list_clear

 CEF_EXPORT void cef_string_list_clear( cef_string_list_t list );
Clear the string list.

cef_string_list_copy

 CEF_EXPORT cef_string_list_t cef_string_list_copy( cef_string_list_t list );
Creates a copy of an existing string list.

cef_string_list_free

 CEF_EXPORT void cef_string_list_free( cef_string_list_t list );
Free the string list.

cef_string_list_size

 CEF_EXPORT int cef_string_list_size( cef_string_list_t list );
Return the number of elements in the string list.

cef_string_list_value

 CEF_EXPORT int cef_string_list_value( cef_string_list_t list, int index, cef_string_t* value );
Retrieve the value at the specified zero-based string list index. Returns true (1) if the value was successfully retrieved.

cef_string_map_alloc

 CEF_EXPORT cef_string_map_t cef_string_map_alloc();
Allocate a new string map.

cef_string_map_append

 CEF_EXPORT int cef_string_map_append( cef_string_map_t map, const cef_string_t* key, const cef_string_t* value );
Append a new key/value pair at the end of the string map.

cef_string_map_clear

 CEF_EXPORT void cef_string_map_clear( cef_string_map_t map );
Clear the string map.

cef_string_map_find

 CEF_EXPORT int cef_string_map_find( cef_string_map_t map, const cef_string_t* key, cef_string_t* value );
Return the value assigned to the specified key.

cef_string_map_free

 CEF_EXPORT void cef_string_map_free( cef_string_map_t map );
Free the string map.

cef_string_map_key

 CEF_EXPORT int cef_string_map_key( cef_string_map_t map, int index, cef_string_t* key );
Return the key at the specified zero-based string map index.

cef_string_map_size

 CEF_EXPORT int cef_string_map_size( cef_string_map_t map );
Return the number of elements in the string map.

cef_string_map_value

 CEF_EXPORT int cef_string_map_value( cef_string_map_t map, int index, cef_string_t* value );
Return the value at the specified zero-based string map index.

cef_string_multimap_alloc

 CEF_EXPORT cef_string_multimap_t cef_string_multimap_alloc();
Allocate a new string multimap.

cef_string_multimap_append

 CEF_EXPORT int cef_string_multimap_append( cef_string_multimap_t map, const cef_string_t* key, const cef_string_t* value );
Append a new key/value pair at the end of the string multimap.

cef_string_multimap_clear

 CEF_EXPORT void cef_string_multimap_clear( cef_string_multimap_t map );
Clear the string multimap.

cef_string_multimap_enumerate

 CEF_EXPORT int cef_string_multimap_enumerate( cef_string_multimap_t map, const cef_string_t* key, int value_index, cef_string_t* value );
Return the value_index-th value with the specified key.

cef_string_multimap_find_count

 CEF_EXPORT int cef_string_multimap_find_count( cef_string_multimap_t map, const cef_string_t* key );
Return the number of values with the specified key.

cef_string_multimap_free

 CEF_EXPORT void cef_string_multimap_free( cef_string_multimap_t map );
Free the string multimap.

cef_string_multimap_key

 CEF_EXPORT int cef_string_multimap_key( cef_string_multimap_t map, int index, cef_string_t* key );
Return the key at the specified zero-based string multimap index.

cef_string_multimap_size

 CEF_EXPORT int cef_string_multimap_size( cef_string_multimap_t map );
Return the number of elements in the string multimap.

cef_string_multimap_value

 CEF_EXPORT int cef_string_multimap_value( cef_string_multimap_t map, int index, cef_string_t* value );
Return the value at the specified zero-based string multimap index.

cef_string_userfree_utf16_alloc

 CEF_EXPORT cef_string_userfree_utf16_t cef_string_userfree_utf16_alloc();

cef_string_userfree_utf16_free

 CEF_EXPORT void cef_string_userfree_utf16_free( cef_string_userfree_utf16_t str );

cef_string_userfree_utf8_alloc

 CEF_EXPORT cef_string_userfree_utf8_t cef_string_userfree_utf8_alloc();

cef_string_userfree_utf8_free

 CEF_EXPORT void cef_string_userfree_utf8_free( cef_string_userfree_utf8_t str );

cef_string_userfree_wide_alloc

 CEF_EXPORT cef_string_userfree_wide_t cef_string_userfree_wide_alloc();
These functions allocate a new string structure. They must be freed by calling the associated free function.

cef_string_userfree_wide_free

 CEF_EXPORT void cef_string_userfree_wide_free( cef_string_userfree_wide_t str );
These functions free the string structure allocated by the associated alloc function. Any string contents will first be cleared.

cef_string_utf16_clear

 CEF_EXPORT void cef_string_utf16_clear( cef_string_utf16_t* str );

cef_string_utf16_cmp

 CEF_EXPORT int cef_string_utf16_cmp( const cef_string_utf16_t* str1, const cef_string_utf16_t* str2 );

cef_string_utf16_set

 CEF_EXPORT int cef_string_utf16_set( const char16* src, size_t src_len, cef_string_utf16_t* output, int copy );

cef_string_utf16_to_utf8

 CEF_EXPORT int cef_string_utf16_to_utf8( const char16* src, size_t src_len, cef_string_utf8_t* output );

cef_string_utf16_to_wide

 CEF_EXPORT int cef_string_utf16_to_wide( const char16* src, size_t src_len, cef_string_wide_t* output );

cef_string_utf8_clear

 CEF_EXPORT void cef_string_utf8_clear( cef_string_utf8_t* str );

cef_string_utf8_cmp

 CEF_EXPORT int cef_string_utf8_cmp( const cef_string_utf8_t* str1, const cef_string_utf8_t* str2 );

cef_string_utf8_set

 CEF_EXPORT int cef_string_utf8_set( const char* src, size_t src_len, cef_string_utf8_t* output, int copy );

cef_string_utf8_to_utf16

 CEF_EXPORT int cef_string_utf8_to_utf16( const char* src, size_t src_len, cef_string_utf16_t* output );

cef_string_utf8_to_wide

 CEF_EXPORT int cef_string_utf8_to_wide( const char* src, size_t src_len, cef_string_wide_t* output );

cef_string_wide_clear

 CEF_EXPORT void cef_string_wide_clear( cef_string_wide_t* str );
These functions clear string values. The structure itself is not freed.

cef_string_wide_cmp

 CEF_EXPORT int cef_string_wide_cmp( const cef_string_wide_t* str1, const cef_string_wide_t* str2 );
These functions compare two string values with the same results as strcmp().

cef_string_wide_set

 CEF_EXPORT int cef_string_wide_set( const wchar_t* src, size_t src_len, cef_string_wide_t* output, int copy );
These functions set string values. If |copy| is true (1) the value will be copied instead of referenced. It is up to the user to properly manage the lifespan of references.

cef_string_wide_to_utf16

 CEF_EXPORT int cef_string_wide_to_utf16( const wchar_t* src, size_t src_len, cef_string_utf16_t* output );

cef_string_wide_to_utf8

 CEF_EXPORT int cef_string_wide_to_utf8( const wchar_t* src, size_t src_len, cef_string_utf8_t* output );
These functions convert between UTF-8, -16, and -32 strings. They are potentially slow so unnecessary conversions should be avoided. The best possible result will always be written to |output| with the boolean return value indicating whether the conversion is 100% valid.

cef_time_from_doublet

 CEF_EXPORT int cef_time_from_doublet( double time, cef_time_t* cef_time );

cef_time_from_timet

 CEF_EXPORT int cef_time_from_timet( time_t time, cef_time_t* cef_time );

cef_time_to_doublet

 CEF_EXPORT int cef_time_to_doublet( const cef_time_t* cef_time, double* time );
Converts cef_time_t to/from a double which is the number of seconds since epoch (Jan 1, 1970). Webkit uses this format to represent time. A value of 0 means "not initialized". Returns true (1) on success and false (0) on failure.

cef_time_to_timet

 CEF_EXPORT int cef_time_to_timet( const cef_time_t* cef_time, time_t* time );
Converts cef_time_t to/from time_t. Returns true (1) on success and false (0) on failure.

CefAddCrossOriginWhitelistEntry

 bool CefAddCrossOriginWhitelistEntry( const CefString& source_origin, const CefString& target_protocol, const CefString& target_domain, bool allow_target_subdomains );
Add an entry to the cross-origin access whitelist. The same-origin policy restricts how scripts hosted from different origins (scheme + domain + port) can communicate. By default, scripts can only access resources with the same origin. Scripts hosted on the HTTP and HTTPS schemes (but no other schemes) can use the "Access-Control-Allow-Origin" header to allow cross-origin requests. For example, https://source.example.com can make XMLHttpRequest requests on http://target.example.com if the http://target.example.com request returns an "Access-Control-Allow-Origin: https://source.example.com" response header. Scripts in separate frames or iframes and hosted from the same protocol and domain suffix can execute cross-origin JavaScript if both pages set the document.domain value to the same domain suffix. For example, scheme://foo.example.com and scheme://bar.example.com can communicate using JavaScript if both domains set document.domain="example.com". This method is used to allow access to origins that would otherwise violate the same-origin policy. Scripts hosted underneath the fully qualified |source_origin| URL (like http://www.example.com) will be allowed access to all resources hosted on the specified |target_protocol| and |target_domain|. If |allow_target_subdomains| is true access will also be allowed to all subdomains of the target domain. This method cannot be used to bypass the restrictions on local or display isolated schemes. See the comments on CefRegisterCustomScheme for more information. This function may be called on any thread. Returns false if |source_origin| is invalid or the whitelist cannot be accessed.

CefClearCrossOriginWhitelist

 bool CefClearCrossOriginWhitelist();
Remove all entries from the cross-origin access whitelist. Returns false if the whitelist cannot be accessed.

CefClearSchemeHandlerFactories

 bool CefClearSchemeHandlerFactories();
Clear all registered scheme handler factories. Returns false on error. This function may be called on any thread.

CefCreateURL

 bool CefCreateURL( const CefURLParts& parts, CefString& url );
Creates a URL from the specified |parts|, which must contain a non-empty spec or a non-empty host and path (at a minimum), but not both. Returns false if |parts| isn't initialized as described.

CefCurrentlyOn

 bool CefCurrentlyOn( CefThreadId threadId );
CEF maintains multiple internal threads that are used for handling different types of tasks. The UI thread creates the browser window and is used for all interaction with the WebKit rendering engine and V8 JavaScript engine (The UI thread will be the same as the main application thread if CefInitialize() is called with a CefSettings.multi_threaded_message_loop value of false.) The IO thread is used for handling schema and network requests. The FILE thread is used for the application cache and other miscellaneous activities. This function will return true if called on the specified thread.

CefDeleteCookies

 bool CefDeleteCookies( const CefString& url, const CefString& cookie_name );
Delete all cookies that match the specified parameters. If both |url| and |cookie_name| are specified all host and domain cookies matching both values will be deleted. If only |url| is specified all host cookies (but not domain cookies) irrespective of path will be deleted. If |url| is empty all cookies for all hosts and domains will be deleted. Returns false if a non-empty invalid URL is specified or if cookies cannot be accessed. This method must be called on the IO thread.

CefDeleteStorage

 bool CefDeleteStorage( CefStorageType type, const CefString& origin, const CefString& key );
Deletes all storage of the specified type. If |origin| is non-empty only data matching that origin will be cleared. If |key| is non-empty only data matching that key will be cleared. Otherwise, all data for the storage type will be cleared. Returns false if storage cannot be accessed. This method must be called on the UI thread.

CefDoMessageLoopWork

 void CefDoMessageLoopWork();
Perform a single iteration of CEF message loop processing. This function is used to integrate the CEF message loop into an existing application message loop. Care must be taken to balance performance against excessive CPU usage. This function should only be called on the main application thread and only if CefInitialize() is called with a CefSettings.multi_threaded_message_loop value of false. This function will not block.

CefInitialize

 bool CefInitialize( const CefSettings& settings, CefRefPtr< CefApp > application );
This function should be called on the main application thread to initialize CEF when the application is started. The |application| parameter may be empty. A return value of true indicates that it succeeded and false indicates that it failed.

CefParseURL

 bool CefParseURL( const CefString& url, CefURLParts& parts );
Parse the specified |url| into its component parts. Returns false if the URL is empty or invalid.

CefPostDelayedTask

 bool CefPostDelayedTask( CefThreadId threadId, CefRefPtr< CefTask > task, long delay_ms );
Post a task for delayed execution on the specified thread. This function may be called on any thread.

CefPostTask

 bool CefPostTask( CefThreadId threadId, CefRefPtr< CefTask > task );
Post a task for execution on the specified thread. This function may be called on any thread.

CefQuitMessageLoop

 void CefQuitMessageLoop();
Quit the CEF message loop that was started by calling CefRunMessageLoop(). This function should only be called on the main application thread and only if CefRunMessageLoop() was used.

CefRegisterCustomScheme

 bool CefRegisterCustomScheme( const CefString& scheme_name, bool is_standard, bool is_local, bool is_display_isolated );
Register a custom scheme. This method should not be called for the built-in HTTP, HTTPS, FILE, FTP, ABOUT and DATA schemes. If |is_standard| is true the scheme will be treated as a standard scheme. Standard schemes are subject to URL canonicalization and parsing rules as defined in the Common Internet Scheme Syntax RFC 1738 Section 3.1 available at http://www.ietf.org/rfc/rfc1738.txt In particular, the syntax for standard scheme URLs must be of the form:
 [scheme]://[username]:[password]@[host]:[port]/[url-path]
Standard scheme URLs must have a host component that is a fully qualified domain name as defined in Section 3.5 of RFC 1034 [13] and Section 2.1 of RFC 1123. These URLs will be canonicalized to "scheme://host/path" in the simplest case and "scheme://username:password@host:port/path" in the most explicit case. For example, "scheme:host/path" and "scheme:///host/path" will both be canonicalized to "scheme://host/path". The origin of a standard scheme URL is the combination of scheme, host and port (i.e., "scheme://host:port" in the most explicit case). For non-standard scheme URLs only the "scheme:" component is parsed and canonicalized. The remainder of the URL will be passed to the handler as-is. For example, "scheme:///some%20text" will remain the same. Non-standard scheme URLs cannot be used as a target for form submission. If |is_local| is true the scheme will be treated as local (i.e., with the same security rules as those applied to "file" URLs). Normal pages cannot link to or access local URLs. Also, by default, local URLs can only perform XMLHttpRequest calls to the same URL (origin + path) that originated the request. To allow XMLHttpRequest calls from a local URL to other URLs with the same origin set the CefSettings.file_access_from_file_urls_allowed value to true. To allow XMLHttpRequest calls from a local URL to all origins set the CefSettings.universal_access_from_file_urls_allowed value to true. If |is_display_isolated| is true the scheme will be treated as display- isolated. This means that pages cannot display these URLs unless they are from the same scheme. For example, pages in another origin cannot create iframes or hyperlinks to URLs with this scheme. This function may be called on any thread. It should only be called once per unique |scheme_name| value. If |scheme_name| is already registered or if an error occurs this method will return false.

CefRegisterExtension

 bool CefRegisterExtension( const CefString& extension_name, const CefString& javascript_code, CefRefPtr< CefV8Handler > handler );
Register a new V8 extension with the specified JavaScript extension code and handler. Functions implemented by the handler are prototyped using the keyword 'native'. The calling of a native function is restricted to the scope in which the prototype of the native function is defined. This function may be called on any thread. Example JavaScript extension code:
  // create the 'example' global object if it doesn't already exist.
  if (!example)
    example = {};
  // create the 'example.test' global object if it doesn't already exist.
  if (!example.test)
    example.test = {};
  (function() {
    // Define the function 'example.test.myfunction'.
    example.test.myfunction = function() {
      // Call CefV8Handler::Execute() with the function name 'MyFunction'
      // and no arguments.
      native function MyFunction();
      return MyFunction();
    };
    // Define the getter function for parameter 'example.test.myparam'.
    example.test.__defineGetter__('myparam', function() {
      // Call CefV8Handler::Execute() with the function name 'GetMyParam'
      // and no arguments.
      native function GetMyParam();
      return GetMyParam();
    });
    // Define the setter function for parameter 'example.test.myparam'.
    example.test.__defineSetter__('myparam', function(b) {
      // Call CefV8Handler::Execute() with the function name 'SetMyParam'
      // and a single argument.
      native function SetMyParam();
      if(b) SetMyParam(b);
    });
    // Extension definitions can also contain normal JavaScript variables
    // and functions.
    var myint = 0;
    example.test.increment = function() {
      myint += 1;
      return myint;
    };
  })();
Example usage in the page:
  // Call the function.
  example.test.myfunction();
  // Set the parameter.
  example.test.myparam = value;
  // Get the parameter.
  value = example.test.myparam;
  // Call another function.
  example.test.increment();

CefRegisterPlugin

 bool CefRegisterPlugin( const CefPluginInfo& plugin_info );
Register a plugin with the system.

CefRegisterSchemeHandlerFactory

 bool CefRegisterSchemeHandlerFactory( const CefString& scheme_name, const CefString& domain_name, CefRefPtr< CefSchemeHandlerFactory > factory );
Register a scheme handler factory for the specified |scheme_name| and optional |domain_name|. An empty |domain_name| value for a standard scheme will cause the factory to match all domain names. The |domain_name| value will be ignored for non-standard schemes. If |scheme_name| is a built-in scheme and no handler is returned by |factory| then the built-in scheme handler factory will be called. If |scheme_name| is a custom scheme the CefRegisterCustomScheme() function should be called for that scheme. This function may be called multiple times to change or remove the factory that matches the specified |scheme_name| and optional |domain_name|. Returns false if an error occurs. This function may be called on any thread.

CefRemoveCrossOriginWhitelistEntry

 bool CefRemoveCrossOriginWhitelistEntry( const CefString& source_origin, const CefString& target_protocol, const CefString& target_domain, bool allow_target_subdomains );
Remove an entry from the cross-origin access whitelist. Returns false if |source_origin| is invalid or the whitelist cannot be accessed.

CefRunMessageLoop

 void CefRunMessageLoop();
Run the CEF message loop. Use this function instead of an application- provided message loop to get the best balance between performance and CPU usage. This function should only be called on the main application thread and only if CefInitialize() is called with a CefSettings.multi_threaded_message_loop value of false. This function will block until a quit message is received by the system.

CefSetCookie

 bool CefSetCookie( const CefString& url, const CefCookie& cookie );
Sets a cookie given a valid URL and explicit user-provided cookie attributes. This function expects each attribute to be well-formed. It will check for disallowed characters (e.g. the ';' character is disallowed within the cookie value attribute) and will return false without setting the cookie if such characters are found. This method must be called on the IO thread.

CefSetCookiePath

 bool CefSetCookiePath( const CefString& path );
Sets the directory path that will be used for storing cookie data. If |path| is empty data will be stored in memory only. By default the cookie path is the same as the cache path. Returns false if cookies cannot be accessed.

CefSetStorage

 bool CefSetStorage( CefStorageType type, const CefString& origin, const CefString& key, const CefString& value );
Sets storage of the specified type, origin, key and value. Returns false if storage cannot be accessed. This method must be called on the UI thread.

CefSetStoragePath

 bool CefSetStoragePath( CefStorageType type, const CefString& path );
Sets the directory path that will be used for storing data of the specified type. Currently only the ST_LOCALSTORAGE type is supported by this method. If |path| is empty data will be stored in memory only. By default the storage path is the same as the cache path. Returns false if the storage cannot be accessed.

CefShutdown

 void CefShutdown();
This function should be called on the main application thread to shut down CEF before the application exits.

CefVisitAllCookies

 bool CefVisitAllCookies( CefRefPtr< CefCookieVisitor > visitor );
Visit all cookies. The returned cookies are ordered by longest path, then by earliest creation date. Returns false if cookies cannot be accessed.

CefVisitStorage

 bool CefVisitStorage( CefStorageType type, const CefString& origin, const CefString& key, CefRefPtr< CefStorageVisitor > visitor );
Visit storage of the specified type. If |origin| is non-empty only data matching that origin will be visited. If |key| is non-empty only data matching that key will be visited. Otherwise, all data for the storage type will be visited. Origin should be of the form scheme://domain. If no origin is specified only data currently in memory will be returned. Returns false if the storage cannot be accessed.

CefVisitUrlCookies

 bool CefVisitUrlCookies( const CefString& url, bool includeHttpOnly, CefRefPtr< CefCookieVisitor > visitor );
Visit a subset of cookies. The results are filtered by the given url scheme, host, domain and path. If |includeHttpOnly| is true HTTP-only cookies will also be included in the results. The returned cookies are ordered by longest path, then by earliest creation date. Returns false if cookies cannot be accessed.

operator!=

 inline bool operator!=( const CefRect& a, const CefRect& b );

operator==

 inline bool operator==( const CefRect& a, const CefRect& b );

 Overview   Project   Class   Tree   Index 
CEF C++ API Docs - Revision 439
FRAMES    NO FRAMES
SUMMARY:  INNER | FIELD | CONSTR | METHOD

Chromium Embedded Framework (CEF) Copyright © 2011 Marshall A. Greenblatt