Click or drag to resize

CefRequestContext Methods

The CefRequestContext type exposes the following members.

Methods
  NameDescription
Public methodCanSetPreference
Returns true if the preference with the specified |name| can be modified using SetPreference. As one example preferences set via the command-line usually cannot be modified. This method must be called on the browser process UI thread.
Public methodClearCertificateExceptions
Clears all certificate exceptions that were added as part of handling CefRequestHandler::OnCertificateError(). If you call this it is recommended that you also call CloseAllConnections() or you risk not being prompted again for server certificates if you reconnect quickly. If |callback| is non-NULL it will be executed on the UI thread after completion.
Public methodClearSchemeHandlerFactories
Clear all registered scheme handler factories. Returns false on error. This function may be called on any thread in the browser process.
Public methodCloseAllConnections
Clears all active and idle connections that Chromium currently has. This is only recommended if you have released all other CEF objects but don't yet want to call CefShutdown(). If |callback| is non-NULL it will be executed on the UI thread after completion.
Public methodStatic memberCreateContext(CefRequestContext, CefRequestContextHandler)
Creates a new context object that shares storage with |other| and uses an optional |handler|.
Public methodStatic memberCreateContext(CefRequestContextSettings, CefRequestContextHandler)
Creates a new context object with the specified |settings| and optional |handler|.
Public methodDispose
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Protected methodFinalize (Overrides ObjectFinalize.)
Public methodGetAllPreferences
Returns all preferences as a dictionary. If |include_defaults| is true then preferences currently at their default value will be included. The returned object contains a copy of the underlying preference values and modifications to the returned object will not modify the underlying preference values. This method must be called on the browser process UI thread.
Public methodGetDefaultCookieManager
Returns the default cookie manager for this object. This will be the global cookie manager if this object is the global request context. Otherwise, this will be the default cookie manager used when this request context does not receive a value via CefRequestContextHandler::GetCookieManager(). If |callback| is non-NULL it will be executed asnychronously on the IO thread after the manager's storage has been initialized.
Public methodStatic memberGetGlobalContext
Returns the global context object.
Public methodGetHandler
Returns the handler for this context if any.
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetPreference
Returns the value for the preference with the specified |name|. Returns NULL if the preference does not exist. The returned object contains a copy of the underlying preference value and modifications to the returned object will not modify the underlying preference value. This method must be called on the browser process UI thread.
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodHasPreference
Returns true if a preference with the specified |name| exists. This method must be called on the browser process UI thread.
Public methodIsSame
Returns true if this object is pointing to the same context as |that| object.
Public methodIsSharingWith
Returns true if this object is sharing the same storage as |that| object.
Public methodPurgePluginListCache
Tells all renderer processes associated with this context to throw away their plugin list cache. If |reload_pages| is true they will also reload all pages with plugins. CefRequestContextHandler::OnBeforePluginLoad may be called to rebuild the plugin list cache.
Public methodRegisterSchemeHandlerFactory
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 then you must also implement the CefApp::OnRegisterCustomSchemes() method in all processes. 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 in the browser process.
Public methodResolveHost
Attempts to resolve |origin| to a list of associated IP addresses. |callback| will be executed on the UI thread after completion.
Public methodResolveHostCached
Attempts to resolve |origin| to a list of associated IP addresses using cached data. |resolved_ips| will be populated with the list of resolved IP addresses or empty if no cached data is available. Returns ERR_NONE on success. This method must be called on the browser process IO thread.
Public methodSetPreference
Set the |value| associated with preference |name|. Returns true if the value is set successfully and false otherwise. If |value| is NULL the preference will be restored to its default value. If setting the preference fails then |error| will be populated with a detailed description of the problem. This method must be called on the browser process UI thread.
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Top
Extension Methods
See Also