Click or drag to resize

ExtensionHandler Class

Version 92.0.260
Implement this interface to handle events related to browser extensions. The methods of this class will be called on the CEF UI thread. See LoadExtension(String, String, IExtensionHandler) for information about extension loading.
Inheritance Hierarchy
SystemObject
  CefSharp.HandlerExtensionHandler

Namespace:  CefSharp.Handler
Assembly:  CefSharp (in CefSharp.dll) Version: 92.0.260.0 (92.0.260.0)
Syntax
public class ExtensionHandler : IExtensionHandler, 
	IDisposable

The ExtensionHandler type exposes the following members.

Constructors
  NameDescription
Public methodExtensionHandler
Initializes a new instance of the ExtensionHandler class
Top
Properties
  NameDescription
Public propertyIsDisposed
IsDisposed
Top
Methods
  NameDescription
Protected methodCanAccessBrowser
Called when the tabId associated with targetBrowser is specified to an extension API call that accepts a tabId parameter (e.g. chrome.tabs.*).
Protected methodDispose
Releases the unmanaged resources used by the ExtensionHandler and optionally releases the managed resources
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Protected methodGetActiveBrowser
Called when no tabId is specified to an extension API call that accepts a tabId parameter (e.g. chrome.tabs.*).
Protected methodGetExtensionResource
Called to retrieve an extension resource that would normally be loaded from disk (e.g. if a file parameter is specified to chrome.tabs.executeScript). Localization substitutions will not be applied to resources handled via this method.
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Protected methodOnBeforeBackgroundBrowser
Called when an extension needs a browser to host a background script specified via the "background" manifest key. The browser will have no visible window and cannot be displayed. To allow creation of the browser optionally modify newBrowser and settings and return false. To cancel creation of the browser (and consequently cancel load of the background script) return true. Successful creation will be indicated by a call to ILifeSpanHandler.OnAfterCreated, and IBrowserHost.IsBackgroundHost will return true for the resulting browser. See https://developer.chrome.com/extensions/event_pages for more information about extension background script usage.
Protected methodOnBeforeBrowser
Called when an extension API (e.g. chrome.tabs.create) requests creation of a new browser. Successful creation will be indicated by a call to OnAfterCreated(IWebBrowser, IBrowser).
Protected methodOnExtensionLoaded
Called if the LoadExtension(String, String, IExtensionHandler) request succeeds.
Protected methodOnExtensionLoadFailed
Protected methodOnExtensionUnloaded
Called after the IExtension.Unload request has completed.
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Top
See Also