Click or drag to resize
Chromium.Event Namespace

[This is preliminary documentation and is subject to change.]

 
Classes
  ClassDescription
Public classCfxCanGetCookieEventArgs
Return true (1) if the specified cookie can be sent with the request or false (0) otherwise. If false (0) is returned for any cookie then no cookies will be sent with the request.
Public classCfxCanSetCookieEventArgs
Return true (1) if the specified cookie returned with the response can be set or false (0) otherwise.
Public classCfxCookieVisitorVisitEventArgs
Method that will be called once for each cookie. |Count| is the 0-based index for the current cookie. |Total| is the total number of cookies. Set |DeleteCookie| to true (1) to delete the cookie currently being visited. Return false (0) to stop visiting cookies. This function may never be called if no cookies are found.
Public classCfxDeleteCookiesCallbackOnCompleteEventArgs
Method that will be called upon completion. |NumDeleted| will be the number of cookies that were deleted or -1 if unknown.
Public classCfxDialogHandlerOnFileDialogEventArgs
Called to run a file chooser dialog. |Mode| represents the type of dialog to display. |Title| to the title to be used for the dialog and may be NULL to show the default title ("Open" or "Save" depending on the mode). |DefaultFilePath| is the path with optional directory and/or file name component that should be initially selected in the dialog. |AcceptFilters| are used to restrict the selectable file types and may any combination of (a) valid lower-cased MIME types (e.g. "text/*" or "image/*"), (b) individual file extensions (e.g. ".txt" or ".png"), or (c) combined description and file extension delimited using "|" and ";" (e.g. "Image Types|.png;.gif;.jpg"). |SelectedAcceptFilter| is the 0-based index of the filter that should be selected by default. To display a custom dialog return true (1) and execute |Callback| either inline or at a later time. To display the default dialog return false (0).
Public classCfxDoCloseEventArgs
Called when a browser has recieved a request to close. This may result directly from a call to CfxBrowserHost::*close_browser() or indirectly if the browser is parented to a top-level window created by CEF and the user attempts to close that window (by clicking the 'X', for example). The do_close() function will be called after the JavaScript 'onunload' event has been fired. An application should handle top-level owner window close notifications by calling CfxBrowserHost.TryCloseBrowser() or CfxBrowserHost.CloseBrowser(false (0)) instead of allowing the window to close immediately (see the examples below). This gives CEF an opportunity to process the 'onbeforeunload' event and optionally cancel the close before do_close() is called. When windowed rendering is enabled CEF will internally create a window or view to host the browser. In that case returning false (0) from do_close() will send the standard close notification to the browser's top-level owner window (e.g. WM_CLOSE on Windows, performClose: on OS X, "delete_event" on Linux or CfxWindowDelegate.CanClose() callback from Views). If the browser's host window/view has already been destroyed (via view hierarchy tear-down, for example) then do_close() will not be called for that browser since is no longer possible to cancel the close. When windowed rendering is disabled returning false (0) from do_close() will cause the browser object to be destroyed immediately. If the browser's top-level owner window requires a non-standard close notification then send that notification from do_close() and return true (1). The CfxLifeSpanHandler.OnBeforeClose() function will be called after do_close() (if do_close() is called) and immediately before the browser object is destroyed. The application should only exit after on_before_close() has been called for all existing browsers. The below examples describe what should happen during window close when the browser is parented to an application-provided top-level window. Example 1: Using CfxBrowserHost.TryCloseBrowser(). This is recommended for clients using standard close handling and windows created on the browser process UI thread. 1. User clicks the window close button which sends a close notification to the application's top-level window. 2. Application's top-level window receives the close notification and calls TryCloseBrowser() (which internally calls CloseBrowser(false)). TryCloseBrowser() returns false so the client cancels the window close. 3. JavaScript 'onbeforeunload' handler executes and shows the close confirmation dialog (which can be overridden via CfxJSDialogHandler.OnBeforeUnloadDialog()). 4. User approves the close. 5. JavaScript 'onunload' handler executes. 6. CEF sends a close notification to the application's top-level window (because DoClose() returned false by default). 7. Application's top-level window receives the close notification and calls TryCloseBrowser(). TryCloseBrowser() returns true so the client allows the window close. 8. Application's top-level window is destroyed. 9. Application's on_before_close() handler is called and the browser object is destroyed. 10. Application exits by calling cef_quit_message_loop() if no other browsers exist. Example 2: Using CfxBrowserHost.CloseBrowser(false (0)) and implementing the do_close() callback. This is recommended for clients using non-standard close handling or windows that were not created on the browser process UI thread. 1. User clicks the window close button which sends a close notification to the application's top-level window. 2. Application's top-level window receives the close notification and: A. Calls CfxBrowserHost.CloseBrowser(false). B. Cancels the window close. 3. JavaScript 'onbeforeunload' handler executes and shows the close confirmation dialog (which can be overridden via CfxJSDialogHandler.OnBeforeUnloadDialog()). 4. User approves the close. 5. JavaScript 'onunload' handler executes. 6. Application's do_close() handler is called. Application will: A. Set a flag to indicate that the next close attempt will be allowed. B. Return false. 7. CEF sends an close notification to the application's top-level window. 8. Application's top-level window receives the close notification and allows the window to close based on the flag from #6B. 9. Application's top-level window is destroyed. 10. Application's on_before_close() handler is called and the browser object is destroyed. 11. Application exits by calling cef_quit_message_loop() if no other browsers exist.
Public classCfxDomVisitorVisitEventArgs
Method executed for visiting the DOM. The document object passed to this function represents a snapshot of the DOM at the time this function is executed. DOM objects are only valid for the scope of this function. Do not keep references to or attempt to access any DOM objects outside the scope of this function.
Public classCfxDownloadImageCallbackOnDownloadImageFinishedEventArgs
Method that will be executed when the image download has completed. |ImageUrl| is the URL that was downloaded and |HttpStatusCode| is the resulting HTTP status code. |Image| is the resulting image, possibly at multiple scale factors, or NULL if the download failed.
Public classCfxEndTracingCallbackOnEndTracingCompleteEventArgs
Called after all processes have sent their trace data. |TracingFile| is the path at which tracing data was written. The client is responsible for deleting |TracingFile|.
Public classCfxExecuteCommandEventArgs
Perform the action associated with the specified |CommandId| and optional |EventFlags|.
Public classCfxFilterEventArgs
Called to filter a chunk of data. Expected usage is as follows: A. Read input data from |DataIn| and set |DataInRead| to the number of bytes that were read up to a maximum of |DataInSize|. |DataIn| will be NULL if |DataInSize| is zero. B. Write filtered output data to |DataOut| and set |DataOutWritten| to the number of bytes that were written up to a maximum of |DataOutSize|. If no output data was written then all data must be read from |DataIn| (user must set |DataInRead| = |DataInSize|). C. Return RESPONSE_FILTER_DONE if all output data was written or RESPONSE_FILTER_NEED_MORE_DATA if output data is still pending. This function will be called repeatedly until the input buffer has been fully read (user sets |DataInRead| = |DataInSize|) and there is no more input data to filter (the resource response is complete). This function may then be called an additional time with an NULL input buffer if the user filled the output buffer (set |DataOutWritten| = |DataOutSize|) and returned RESPONSE_FILTER_NEED_MORE_DATA to indicate that output data is still pending. Calls to this function will stop when one of the following conditions is met: A. There is no more input data to filter (the resource response is complete) and the user sets |DataOutWritten| = 0 or returns RESPONSE_FILTER_DONE to indicate that all data has been written, or; B. The user returns RESPONSE_FILTER_ERROR to indicate an error. Do not keep a reference to the buffers passed to this function.
Public classCfxFindHandlerOnFindResultEventArgs
Called to report find results returned by CfxBrowserHost.Find(). |Identifer| is the identifier passed to find(), |Count| is the number of matches currently identified, |SelectionRect| is the location of where the match was found (in window coordinates), |ActiveMatchOrdinal| is the current position in the search results, and |FinalUpdate| is true (1) if this is the last find notification.
Public classCfxFlushEventArgs
Flush the stream.
Public classCfxFormatLabelEventArgs
Optionally modify a menu item label. Return true (1) if |Label| was modified.
Public classCfxGetBrowserProcessHandlerEventArgs
Return the handler for functionality specific to the browser process. This function is called on multiple threads in the browser process.
Public classCfxGetByIndexEventArgs
Handle retrieval of the interceptor value identified by |Index|. |Object| is the receiver ('this' object) of the interceptor. If retrieval succeeds, set |Retval| to the return value. If the requested value does not exist, don't set either |Retval| or |Exception|. If retrieval fails, set |Exception| to the exception that will be thrown. Return true (1) if interceptor retrieval was handled, false (0) otherwise.
Public classCfxGetByNameEventArgs
Handle retrieval of the interceptor value identified by |Name|. |Object| is the receiver ('this' object) of the interceptor. If retrieval succeeds, set |Retval| to the return value. If the requested value does not exist, don't set either |Retval| or |Exception|. If retrieval fails, set |Exception| to the exception that will be thrown. If the property has an associated accessor, it will be called only if you don't set |Retval|. Return true (1) if interceptor retrieval was handled, false (0) otherwise.
Public classCfxGetContextMenuHandlerEventArgs
Return the handler for context menus. If no handler is provided the default implementation will be used.
Public classCfxGetCookieManagerEventArgs
Called on the browser process IO thread to retrieve the cookie manager. If this function returns NULL the default cookie manager retrievable via CfxRequestContext.GetDefaultCookieManager() will be used.
Public classCfxGetDataResourceEventArgs
Called to retrieve data for the specified scale independent |ResourceId|. To provide the resource data set |Data| and |DataSize| to the data pointer and size respectively and return true (1). To use the default resource data return false (0). The resource data will not be copied and must remain resident in memory. Include cef_pack_resources.h for a listing of valid resource ID values.
Public classCfxGetDataResourceForScaleEventArgs
Called to retrieve data for the specified |ResourceId| nearest the scale factor |ScaleFactor|. To provide the resource data set |Data| and |DataSize| to the data pointer and size respectively and return true (1). To use the default resource data return false (0). The resource data will not be copied and must remain resident in memory. Include cef_pack_resources.h for a listing of valid resource ID values.
Public classCfxGetDialogHandlerEventArgs
Return the handler for dialogs. If no handler is provided the default implementation will be used.
Public classCfxGetDisplayHandlerEventArgs
Return the handler for browser display state events.
Public classCfxGetDownloadHandlerEventArgs
Return the handler for download events. If no handler is returned downloads will not be allowed.
Public classCfxGetDragHandlerEventArgs
Return the handler for drag events.
Public classCfxGetFindHandlerEventArgs
Return the handler for find result events.
Public classCfxGetFocusHandlerEventArgs
Return the handler for focus events.
Public classCfxGetGeolocationCallbackOnLocationUpdateEventArgs
Called with the 'best available' location information or, if the location update failed, with error information.
Public classCfxGetGeolocationHandlerEventArgs
Return the handler for geolocation permissions requests. If no handler is provided geolocation access will be denied by default.
Public classCfxGetJsDialogHandlerEventArgs
Return the handler for JavaScript dialogs. If no handler is provided the default implementation will be used.
Public classCfxGetKeyboardHandlerEventArgs
Return the handler for keyboard events.
Public classCfxGetLifeSpanHandlerEventArgs
Return the handler for browser life span events.
Public classCfxGetLoadHandlerEventArgs
Return the handler for browser load status events.
Public classCfxGetLocalizedStringEventArgs
Called to retrieve a localized translation for the specified |StringId|. To provide the translation set |String| to the translation string and return true (1). To use the default translation return false (0). Include cef_pack_strings.h for a listing of valid string ID values.
Public classCfxGetPdfPaperSizeEventArgs
Return the PDF paper size in device units. Used in combination with CfxBrowserHost.PrintToPdf().
Public classCfxGetPrintHandlerEventArgs
Return the handler for printing on Linux. If a print handler is not provided then printing will not be supported on the Linux platform.
Public classCfxGetRenderHandlerEventArgs
Return the handler for off-screen rendering events.
Public classCfxGetRenderProcessHandlerEventArgs
Return the handler for functionality specific to the render process. This function is called on the render process main thread.
Public classCfxGetRequestHandlerEventArgs
Return the handler for browser request events.
Public classCfxGetResourceBundleHandlerEventArgs
Return the handler for resource bundle events. If CfxSettings.PackLoadingDisabled is true (1) a handler must be returned. If no handler is returned resources will be loaded from pack files. This function is called by the browser and render processes on multiple threads.
Public classCfxGetResourceHandlerEventArgs
Called on the IO thread before a resource is loaded. To allow the resource to load normally return NULL. To specify a handler for the resource return a CfxResourceHandler object. The |Request| object should not be modified in this callback.
Public classCfxGetResourceResponseFilterEventArgs
Called on the IO thread to optionally filter resource response content. |Request| and |Response| represent the request and response respectively and cannot be modified in this callback.
Public classCfxGetResponseHeadersEventArgs
Retrieve response header information. If the response length is not known set |ResponseLength| to -1 and read_response() will be called until it returns false (0). If the response length is known set |ResponseLength| to a positive value and read_response() will be called until it returns false (0) or the specified number of bytes have been read. Use the |Response| object to set the mime type, http status code and other optional header values. To redirect the request to a new URL set |RedirectUrl| to the new URL. If an error occured while setting up the request you can call set_error() on |Response| to indicate the error condition.
Public classCfxGetRootScreenRectEventArgs
Called to retrieve the root window rectangle in screen coordinates. Return true (1) if the rectangle was provided.
Public classCfxGetScreenInfoEventArgs
Called to allow the client to fill in the CfxScreenInfo object with appropriate values. Return true (1) if the |ScreenInfo| structure has been modified. If the screen info rectangle is left NULL the rectangle from GetViewRect will be used. If the rectangle is still NULL or invalid popups may not be drawn correctly.
Public classCfxGetScreenPointEventArgs
Called to retrieve the translation from view coordinates to actual screen coordinates. Return true (1) if the screen coordinates were provided.
Public classCfxGetViewRectEventArgs
Called to retrieve the view rectangle which is relative to screen coordinates. Return true (1) if the rectangle was provided.
Public classCfxInitFilterEventArgs
Initialize the response filter. Will only be called a single time. The filter will not be installed if this function returns false (0).
Public classCfxMayBlockEventArgs
Return true (1) if this handler performs work like accessing the file system which may block. Used as a hint for determining the thread to access the handler from.
Public classCfxMenuClosedEventArgs
The menu has closed.
Public classCfxMenuWillShowEventArgs
The menu is about to show.
Public classCfxNavigationEntryVisitorVisitEventArgs
Method that will be executed. Do not keep a reference to |Entry| outside of this callback. Return true (1) to continue visiting entries or false (0) to stop. |Current| is true (1) if this entry is the currently loaded navigation entry. |Index| is the 0-based index of this entry and |Total| is the total number of entries.
Public classCfxOnAddressChangeEventArgs
Called when a frame's address has changed.
Public classCfxOnAfterCreatedEventArgs
Called after a new browser is created. This callback will be the first notification that references |Browser|.
Public classCfxOnBeforeBrowseEventArgs
Called on the UI thread before browser navigation. Return true (1) to cancel the navigation or false (0) to allow the navigation to proceed. The |Request| object cannot be modified in this callback. CfxLoadHandler.OnLoadingStateChange will be called twice in all cases. If the navigation is allowed CfxLoadHandler.OnLoadStart and CfxLoadHandler.OnLoadEnd will be called. If the navigation is canceled CfxLoadHandler.OnLoadError will be called with an |ErrorCode| value of ERR_ABORTED.
Public classCfxOnBeforeChildProcessLaunchEventArgs
Called before a child process is launched. Will be called on the browser process UI thread when launching a render process and on the browser process IO thread when launching a GPU or plugin process. Provides an opportunity to modify the child process command line. Do not keep a reference to |CommandLine| outside of this function.
Public classCfxOnBeforeCloseEventArgs
Called just before a browser is destroyed. Release all references to the browser object and do not attempt to execute any functions on the browser object after this callback returns. This callback will be the last notification that references |Browser|. See do_close() documentation for additional usage information.
Public classCfxOnBeforeCommandLineProcessingEventArgs
Provides an opportunity to view and/or modify command-line arguments before processing by CEF and Chromium. The |ProcessType| value will be NULL for the browser process. Do not keep a reference to the CfxCommandLine object passed to this function. The CfxSettings.CommandLineArgsDisabled value can be used to start with an NULL command-line object. Any values specified in CfxSettings that equate to command-line arguments will be set before this function is called. Be cautious when using this function to modify command-line arguments for non-browser processes as this may result in undefined behavior including crashes.
Public classCfxOnBeforeContextMenuEventArgs
Called before a context menu is displayed. |Params| provides information about the context menu state. |Model| initially contains the default context menu. The |Model| can be cleared to show no context menu or modified to show a custom menu. Do not keep references to |Params| or |Model| outside of this callback.
Public classCfxOnBeforeDownloadEventArgs
Called before a download begins. |SuggestedName| is the suggested name for the download file. By default the download will be canceled. Execute |Callback| either asynchronously or in this function to continue the download if desired. Do not keep a reference to |DownloadItem| outside of this function.
Public classCfxOnBeforeNavigationEventArgs
Called before browser navigation. Return true (1) to cancel the navigation or false (0) to allow the navigation to proceed. The |Request| object cannot be modified in this callback.
Public classCfxOnBeforePluginLoadEventArgs
Called on multiple browser process threads before a plugin instance is loaded. |MimeType| is the mime type of the plugin that will be loaded. |PluginUrl| is the content URL that the plugin will load and may be NULL. |IsMainFrame| will be true (1) if the plugin is being loaded in the main (top-level) frame, |TopOriginUrl| is the URL for the top-level frame that contains the plugin when loading a specific plugin instance or NULL when building the initial list of enabled plugins for 'navigator.plugins' JavaScript state. |PluginInfo| includes additional information about the plugin that will be loaded. |PluginPolicy| is the recommended policy. Modify |PluginPolicy| and return true (1) to change the policy. Return false (0) to use the recommended policy. The default plugin policy can be set at runtime using the `--plugin-policy=[allow|Detect|block]` command- line flag. Decisions to mark a plugin as disabled by setting |PluginPolicy| to PLUGIN_POLICY_DISABLED may be cached when |TopOriginUrl| is NULL. To purge the plugin list cache and potentially trigger new calls to this function call CfxRequestContext.PurgePluginListCache.
Public classCfxOnBeforePopupEventArgs
Called on the IO thread before a new popup browser is created. The |Browser| and |Frame| values represent the source of the popup request. The |TargetUrl| and |TargetFrameName| values indicate where the popup browser should navigate and may be NULL if not specified with the request. The |TargetDisposition| value indicates where the user intended to open the popup (e.g. current tab, new tab, etc). The |UserGesture| value will be true (1) if the popup was opened via explicit user gesture (e.g. clicking a link) or false (0) if the popup opened automatically (e.g. via the DomContentLoaded event). The |PopupFeatures| structure contains additional information about the requested popup window. To allow creation of the popup browser optionally modify |WindowInfo|, |Client|, |Settings| and |NoJavascriptAccess| and return false (0). To cancel creation of the popup browser return true (1). The |Client| and |Settings| values will default to the source browser's values. If the |NoJavascriptAccess| value is set to false (0) the new browser will not be scriptable and may not be hosted in the same renderer process as the source browser. Any modifications to |WindowInfo| will be ignored if the parent browser is wrapped in a CfxBrowserView.
Public classCfxOnBeforeResourceLoadEventArgs
Called on the IO thread before a resource request is loaded. The |Request| object may be modified. Return RV_CONTINUE to continue the request immediately. Return RV_CONTINUE_ASYNC and call CfxRequestCallback:: cont() at a later time to continue or cancel the request asynchronously. Return RV_CANCEL to cancel the request immediately.
Public classCfxOnBeforeUnloadDialogEventArgs
Called to run a dialog asking the user if they want to leave a page. Return false (0) to use the default dialog implementation. Return true (1) if the application will use a custom dialog or if the callback has been executed immediately. Custom dialogs may be either modal or modeless. If a custom dialog is used the application must execute |Callback| once the custom dialog is dismissed.
Public classCfxOnBrowserCreatedEventArgs
Called after a browser has been created. When browsing cross-origin a new browser will be created before the old browser with the same identifier is destroyed.
Public classCfxOnBrowserDestroyedEventArgs
Called before a browser is destroyed.
Public classCfxOnCancelGeolocationPermissionEventArgs
Called when a geolocation access request is canceled. |RequestId| is the unique ID for the permission request.
Public classCfxOnCertificateErrorEventArgs
Called on the UI thread to handle requests for URLs with an invalid SSL certificate. Return true (1) and call CfxRequestCallback.Continue() either in this function or at a later time to continue or cancel the request. Return false (0) to cancel the request immediately. If CfxSettings.IgnoreCertificateErrors is set all invalid certificates will be accepted without calling this function.
Public classCfxOnConsoleMessageEventArgs
Called to display a console message. Return true (1) to stop the message from being output to the console.
Public classCfxOnContextCreatedEventArgs
Called immediately after the V8 context for a frame has been created. To retrieve the JavaScript 'window' object use the CfxV8Context.GetGlobal() function. V8 handles can only be accessed from the thread on which they are created. A task runner for posting tasks on the associated thread can be retrieved via the CfxV8Context.GetTaskRunner() function.
Public classCfxOnContextMenuCommandEventArgs
Called to execute a command selected from the context menu. Return true (1) if the command was handled or false (0) for the default implementation. See CfxMenuId for the command ids that have default implementations. All user-defined command ids should be between MENU_ID_USER_FIRST and MENU_ID_USER_LAST. |Params| will have the same values as what was passed to on_before_context_menu(). Do not keep a reference to |Params| outside of this callback.
Public classCfxOnContextMenuDismissedEventArgs
Called when the context menu is dismissed irregardless of whether the menu was NULL or a command was selected.
Public classCfxOnContextReleasedEventArgs
Called immediately before the V8 context for a frame is released. No references to the context should be kept after this function is called.
Public classCfxOnCursorChangeEventArgs
Called when the browser's cursor has changed. If |Type| is CT_CUSTOM then |CustomCursorInfo| will be populated with the custom cursor information.
Public classCfxOnDialogClosedEventArgs
Called when the default implementation dialog is closed.
Public classCfxOnDownloadDataEventArgs
Called when some part of the response is read. |Data| contains the current bytes received since the last call. This function will not be called if the UR_FLAG_NO_DOWNLOAD_DATA flag is set on the request.
Public classCfxOnDownloadProgressEventArgs
Notifies the client of download progress. |Current| denotes the number of bytes received up to the call and |Total| is the expected total size of the response (or -1 if not determined).
Public classCfxOnDownloadUpdatedEventArgs
Called when a download's status or progress information has been updated. This may be called multiple times before and after on_before_download(). Execute |Callback| either asynchronously or in this function to cancel the download if desired. Do not keep a reference to |DownloadItem| outside of this function.
Public classCfxOnDragEnterEventArgs
Called when an external drag event enters the browser window. |DragData| contains the drag event data and |Mask| represents the type of drag operation. Return false (0) for default drag handling behavior or true (1) to cancel the drag event.
Public classCfxOnDraggableRegionsChangedEventArgs
Called whenever draggable regions for the browser window change. These can be specified using the '-webkit-app-region: drag/no-drag' CSS-property. If draggable regions are never defined in a document this function will also never be called. If the last draggable region is removed from a document this function will be called with an NULL vector.
Public classCfxOnFaviconUrlchangeEventArgs
Called when the page icon changes.
Public classCfxOnFocusedNodeChangedEventArgs
Called when a new node in the the browser gets focus. The |Node| value may be NULL if no specific node has gained focus. The node object passed to this function represents a snapshot of the DOM at the time this function is executed. DOM objects are only valid for the scope of this function. Do not keep references to or attempt to access any DOM objects outside the scope of this function.
Public classCfxOnFullscreenModeChangeEventArgs
Called when web content in the page has toggled fullscreen mode. If |Fullscreen| is true (1) the content will automatically be sized to fill the browser content area. If |Fullscreen| is false (0) the content will automatically return to its original size and position. The client is responsible for resizing the browser if desired.
Public classCfxOnGotFocusEventArgs
Called when the browser component has received focus.
Public classCfxOnImeCompositionRangeChangedEventArgs
Called when the IME composition range has changed. |SelectedRange| is the range of characters that have been selected. |CharacterBounds| is the bounds of each character in view coordinates.
Public classCfxOnJsDialogEventArgs
Called to run a JavaScript dialog. If |OriginUrl| is non-NULL it can be passed to the CfxFormatUrlForSecurityDisplay function to retrieve a secure and user-friendly display string. The |DefaultPromptText| value will be specified for prompt dialogs only. Set |SuppressMessage| to true (1) and return false (0) to suppress the message (suppressing messages is preferable to immediately executing the callback as this is used to detect presumably malicious behavior like spamming alert messages in onbeforeunload). Set |SuppressMessage| to false (0) and return false (0) to use the default implementation (the default implementation will show one modal dialog at a time and suppress any additional dialog requests until the displayed dialog is dismissed). Return true (1) if the application will use a custom dialog or if the callback has been executed immediately. Custom dialogs may be either modal or modeless. If a custom dialog is used the application must execute |Callback| once the custom dialog is dismissed.
Public classCfxOnKeyEventEventArgs
Called after the renderer and JavaScript in the page has had a chance to handle the event. |Event| contains information about the keyboard event. |OsEvent| is the operating system event message, if any. Return true (1) if the keyboard event was handled or false (0) otherwise.
Public classCfxOnLoadEndEventArgs
Called when the browser is done loading a frame. The |Frame| value will never be NULL -- call the is_main() function to check if this frame is the main frame. Multiple frames may be loading at the same time. Sub-frames may start or continue loading after the main frame load has ended. This function will always be called for all frames irrespective of whether the request completes successfully. For notification of overall browser load status use OnLoadingStateChange instead.
Public classCfxOnLoadErrorEventArgs
Called when the resource load for a navigation fails or is canceled. |ErrorCode| is the error code number, |ErrorText| is the error text and |FailedUrl| is the URL that failed to load. See net\base\net_error_list.h for complete descriptions of the error codes.
Public classCfxOnLoadingStateChangeEventArgs
Called when the loading state has changed. This callback will be executed twice -- once when loading is initiated either programmatically or by user action, and once when loading is terminated due to completion, cancellation of failure. It will be called before any calls to OnLoadStart and after all calls to OnLoadError and/or OnLoadEnd.
Public classCfxOnLoadStartEventArgs
Called when the browser begins loading a frame. The |Frame| value will never be NULL -- call the is_main() function to check if this frame is the main frame. |TransitionType| provides information about the source of the navigation and an accurate value is only available in the browser process. Multiple frames may be loading at the same time. Sub-frames may start or continue loading after the main frame load has ended. This function will always be called for all frames irrespective of whether the request completes successfully. For notification of overall browser load status use OnLoadingStateChange instead.
Public classCfxOnOpenUrlfromTabEventArgs
Called on the UI thread before OnBeforeBrowse in certain limited cases where navigating a new or different browser might be desirable. This includes user-initiated navigation that might open in a special way (e.g. links clicked via middle-click or ctrl + left-click) and certain types of cross-origin navigation initiated from the renderer process (e.g. navigating the top-level frame to/from a file URL). The |Browser| and |Frame| values represent the source of the navigation. The |TargetDisposition| value indicates where the user intended to navigate the browser based on standard Chromium behaviors (e.g. current tab, new tab, etc). The |UserGesture| value will be true (1) if the browser navigated via explicit user gesture (e.g. clicking a link) or false (0) if it navigated automatically (e.g. via the DomContentLoaded event). Return true (1) to cancel the navigation or false (0) to allow the navigation to proceed in the source browser's top-level frame.
Public classCfxOnPaintEventArgs
Called when an element should be painted. Pixel values passed to this function are scaled relative to view coordinates based on the value of CfxScreenInfo.DeviceScaleFactor returned from GetScreenInfo. |Type| indicates whether the element is the view or the popup widget. |Buffer| contains the pixel data for the whole image. |DirtyRects| contains the set of rectangles in pixel coordinates that need to be repainted. |Buffer| will be |Width|*|Height|*4 bytes in size and represents a BGRA image with an upper-left origin.
Public classCfxOnPluginCrashedEventArgs
Called on the browser process UI thread when a plugin has crashed. |PluginPath| is the path of the plugin that crashed.
Public classCfxOnPopupShowEventArgs
Called when the browser wants to show or hide the popup widget. The popup should be shown if |Show| is true (1) and hidden if |Show| is false (0).
Public classCfxOnPopupSizeEventArgs
Called when the browser wants to move or resize the popup widget. |Rect| contains the new location and size in view coordinates.
Public classCfxOnPreKeyEventEventArgs
Called before a keyboard event is sent to the renderer. |Event| contains information about the keyboard event. |OsEvent| is the operating system event message, if any. Return true (1) if the event was handled or false (0) otherwise. If the event will be handled in on_key_event() as a keyboard shortcut set |IsKeyboardShortcut| to true (1) and return false (0).
Public classCfxOnPrintDialogEventArgs
Show the print dialog. Execute |Callback| once the dialog is dismissed. Return true (1) if the dialog will be displayed or false (0) to cancel the printing immediately.
Public classCfxOnPrintJobEventArgs
Send the print job to the printer. Execute |Callback| once the job is completed. Return true (1) if the job will proceed or false (0) to cancel the job immediately.
Public classCfxOnPrintSettingsEventArgs
Synchronize |Settings| with client state. If |GetDefaults| is true (1) then populate |Settings| with the default print settings. Do not keep a reference to |Settings| outside of this callback.
Public classCfxOnPrintStartEventArgs
Called when printing has started for the specified |Browser|. This function will be called before the other OnPrint*() functions and irrespective of how printing was initiated (e.g. CfxBrowserHost.Print(), JavaScript window.print() or PDF extension print button).
Public classCfxOnProcessMessageReceivedEventArgs
Called when a new message is received from a different process. Return true (1) if the message was handled or false (0) otherwise. Do not keep a reference to or attempt to access the message outside of this callback.
Public classCfxOnProtocolExecutionEventArgs
Called on the UI thread to handle requests for URLs with an unknown protocol component. Set |AllowOsExecution| to true (1) to attempt execution via the registered OS protocol handler, if any. SECURITY WARNING: YOU SHOULD USE THIS METHOD TO ENFORCE RESTRICTIONS BASED ON SCHEME, HOST OR OTHER URL ANALYSIS BEFORE ALLOWING OS EXECUTION.
Public classCfxOnQuotaRequestEventArgs
Called on the IO thread when JavaScript requests a specific storage quota size via the webkitStorageInfo.requestQuota function. |OriginUrl| is the origin of the page making the request. |NewSize| is the requested quota size in bytes. Return true (1) to continue the request and call CfxRequestCallback.Continue() either in this function or at a later time to grant or deny the request. Return false (0) to cancel the request immediately.
Public classCfxOnRegisterCustomSchemesEventArgs
Provides an opportunity to register custom schemes. Do not keep a reference to the |Registrar| object. This function is called on the main thread for each process and the registered schemes should be the same across all processes.
Public classCfxOnRenderProcessTerminatedEventArgs
Called on the browser process UI thread when the render process terminates unexpectedly. |Status| indicates how the process terminated.
Public classCfxOnRenderProcessThreadCreatedEventArgs
Called on the browser process IO thread after the main thread has been created for a new render process. Provides an opportunity to specify extra information that will be passed to CfxRenderProcessHandler.OnRenderThreadCreated() in the render process. Do not keep a reference to |ExtraInfo| outside of this function.
Public classCfxOnRenderThreadCreatedEventArgs
Called after the render process main thread has been created. |ExtraInfo| is a read-only value originating from CfxBrowserProcessHandler.OnRenderProcessThreadCreated(). Do not keep a reference to |ExtraInfo| outside of this function.
Public classCfxOnRenderViewReadyEventArgs
Called on the browser process UI thread when the render view associated with |Browser| is ready to receive/handle IPC messages in the render process.
Public classCfxOnRequestCompleteEventArgs
Notifies the client that the request has completed. Use the CfxUrlRequest.GetRequestStatus function to determine if the request was successful or not.
Public classCfxOnRequestGeolocationPermissionEventArgs
Called when a page requests permission to access geolocation information. |RequestingUrl| is the URL requesting permission and |RequestId| is the unique ID for the permission request. Return true (1) and call CfxGeolocationCallback.Continue() either in this function or at a later time to continue or cancel the request. Return false (0) to cancel the request immediately.
Public classCfxOnResetDialogStateEventArgs
Called to cancel any pending dialogs and reset any saved dialog state. Will be called due to events like page navigation irregardless of whether any dialogs are currently pending.
Public classCfxOnResourceLoadCompleteEventArgs
Called on the IO thread when a resource load has completed. |Request| and |Response| represent the request and response respectively and cannot be modified in this callback. |Status| indicates the load completion status. |ReceivedContentLength| is the number of response bytes actually read.
Public classCfxOnResourceRedirectEventArgs
Called on the IO thread when a resource load is redirected. The |Request| parameter will contain the old URL and other request-related information. The |Response| parameter will contain the response that resulted in the redirect. The |NewUrl| parameter will contain the new URL and can be changed if desired. The |Request| object cannot be modified in this callback.
Public classCfxOnResourceResponseEventArgs
Called on the IO thread when a resource response is received. To allow the resource to load normally return false (0). To redirect or retry the resource modify |Request| (url, headers or post body) and return true (1). The |Response| object cannot be modified in this callback.
Public classCfxOnScheduleMessagePumpWorkEventArgs
Called from any thread when work has been scheduled for the browser process main (UI) thread. This callback is used in combination with CfxSettings. external_message_pump and cef_do_message_loop_work() in cases where the CEF message loop must be integrated into an existing application message loop (see additional comments and warnings on CfxDoMessageLoopWork). This callback should schedule a cef_do_message_loop_work() call to happen on the main (UI) thread. |DelayMs| is the requested delay in milliseconds. If |DelayMs| is <= 0 then the call should happen reasonably soon. If |DelayMs| is > 0 then the call should be scheduled to happen after the specified delay and any currently pending scheduled call should be cancelled.
Public classCfxOnScrollOffsetChangedEventArgs
Called when the scroll offset has changed.
Public classCfxOnSelectClientCertificateEventArgs
Called on the UI thread when a client certificate is being requested for authentication. Return false (0) to use the default behavior and automatically select the first certificate available. Return true (1) and call CfxSelectClientCertificateCallback.Select either in this function or at a later time to select a certificate. Do not call Select or call it with NULL to continue without using any certificate. |IsProxy| indicates whether the host is an HTTPS proxy or the origin server. |Host| and |Port| contains the hostname and port of the SSL server. |Certificates| is the list of certificates to choose from; this list has already been pruned by Chromium so that it only contains certificates from issuers that the server trusts.
Public classCfxOnSetFocusEventArgs
Called when the browser component is requesting focus. |Source| indicates where the focus request is originating from. Return false (0) to allow the focus to be set or true (1) to cancel setting the focus.
Public classCfxOnStatusMessageEventArgs
Called when the browser receives a status message. |Value| contains the text that will be displayed in the status message.
Public classCfxOnTakeFocusEventArgs
Called when the browser component is about to loose focus. For instance, if focus was on the last HTML element and the user pressed the TAB key. |Next| will be true (1) if the browser is giving focus to the next component and false (0) if the browser is giving focus to the previous component.
Public classCfxOnTitleChangeEventArgs
Called when the page title changes.
Public classCfxOnTooltipEventArgs
Called when the browser is about to display a tooltip. |Text| contains the text that will be displayed in the tooltip. To handle the display of the tooltip yourself return true (1). Otherwise, you can optionally modify |Text| and then return false (0) to allow the browser to display the tooltip. When window rendering is disabled the application is responsible for drawing tooltips and the return value is ignored.
Public classCfxOnUncaughtExceptionEventArgs
Called for global uncaught exceptions in a frame. Execution of this callback is disabled by default. To enable set CfxSettings.UncaughtExceptionStackSize > 0.
Public classCfxOnUploadProgressEventArgs
Notifies the client of upload progress. |Current| denotes the number of bytes sent so far and |Total| is the total size of uploading data (or -1 if chunked upload is enabled). This function will only be called if the UR_FLAG_REPORT_UPLOAD_PROGRESS flag is set on the request.
Public classCfxPdfPrintCallbackOnPdfPrintFinishedEventArgs
Method that will be executed when the PDF printing has completed. |Path| is the output path. |Ok| will be true (1) if the printing completed successfully or false (0) otherwise.
Public classCfxProcessRequestEventArgs
Begin processing the request. To handle the request return true (1) and call CfxCallback.Continue() once the response header information is available (CfxCallback.Continue() can also be called from inside this function if header information is available immediately). To cancel the request return false (0).
Public classCfxReadEventArgs
Read raw binary data.
Public classCfxReadHandlerEofEventArgs
Return non-zero if at end of file.
Public classCfxReadResponseEventArgs
Read response data. If data is available immediately copy up to |BytesToRead| bytes into |DataOut|, set |BytesRead| to the number of bytes copied, and return true (1). To read the data at a later time set |BytesRead| to 0, return true (1) and call CfxCallback.Continue() when the data is available. To indicate response completion return false (0).
Public classCfxRegisterCdmCallbackOnCdmRegistrationCompleteEventArgs
Method that will be called when CDM registration is complete. |Result| will be CEF_CDM_REGISTRATION_ERROR_NONE if registration completed successfully. Otherwise, |Result| and |ErrorMessage| will contain additional information about why registration failed.
Public classCfxRequestHandlerGetAuthCredentialsEventArgs
Called on the IO thread when the browser needs credentials from the user. |IsProxy| indicates whether the host is a proxy server. |Host| contains the hostname and |Port| contains the port number. |Realm| is the realm of the challenge and may be NULL. |Scheme| is the authentication scheme used, such as "basic" or "digest", and will be NULL if the source of the request is an FTP server. Return true (1) to continue the request and call CfxAuthCallback.Continue() either in this function or at a later time when the authentication information is available. Return false (0) to cancel the request immediately.
Public classCfxResolveCallbackOnResolveCompletedEventArgs
Called after the ResolveHost request has completed. |Result| will be the result code. |ResolvedIps| will be the list of resolved IP addresses or NULL if the resolution failed.
Public classCfxRunContextMenuEventArgs
Called to allow custom display of the context menu. |Params| provides information about the context menu state. |Model| contains the context menu model resulting from OnBeforeContextMenu. For custom display return true (1) and execute |Callback| either synchronously or asynchronously with the selected command ID. For default display return false (0). Do not keep references to |Params| or |Model| outside of this callback.
Public classCfxRunFileDialogCallbackOnFileDialogDismissedEventArgs
Called asynchronously after the file dialog is dismissed. |SelectedAcceptFilter| is the 0-based index of the value selected from the accept filters array passed to CfxBrowserHost.RunFileDialog. |FilePaths| will be a single value or a list of values depending on the dialog mode. If the selection was cancelled |FilePaths| will be NULL.
Public classCfxSchemeHandlerFactoryCreateEventArgs
Return a new resource handler instance to handle the request or an NULL reference to allow default handling of the request. |Browser| and |Frame| will be the browser window and frame respectively that originated the request or NULL if the request did not originate from a browser window (for example, if the request came from CfxUrlRequest). The |Request| object passed to this function will not contain cookie data.
Public classCfxSeekEventArgs
Seek to the specified offset position. |Whence| may be any one of SEEK_CUR, SEEK_END or SEEK_SET. Return zero on success and non-zero on failure.
Public classCfxSetByIndexEventArgs
Handle assignment of the interceptor value identified by |Index|. |Object| is the receiver ('this' object) of the interceptor. |Value| is the new value being assigned to the interceptor. If assignment fails, set |Exception| to the exception that will be thrown. Return true (1) if interceptor assignment was handled, false (0) otherwise.
Public classCfxSetByNameEventArgs
Handle assignment of the interceptor value identified by |Name|. |Object| is the receiver ('this' object) of the interceptor. |Value| is the new value being assigned to the interceptor. If assignment fails, set |Exception| to the exception that will be thrown. This setter will always be called, even when the property has an associated accessor. Return true (1) if interceptor assignment was handled, false (0) otherwise.
Public classCfxSetCookieCallbackOnCompleteEventArgs
Method that will be called upon completion. |Success| will be true (1) if the cookie was set successfully.
Public classCfxStartDraggingEventArgs
Called when the user starts dragging content in the web view. Contextual information about the dragged content is supplied by |DragData|. (|X|, |Y|) is the drag start location in screen coordinates. OS APIs that run a system message loop may be used within the StartDragging call. Return false (0) to abort the drag operation. Don't call any of CfxBrowserHost.DragSource*Ended* functions after returning false (0). Return true (1) to handle the drag operation. Call CfxBrowserHost.DragSourceEndedAt and DragSourceSystemDragEnded either synchronously or asynchronously to inform the web view that the drag operation has ended.
Public classCfxStringVisitorVisitEventArgs
Method that will be executed.
Public classCfxTellEventArgs
Return the current offset position.
Public classCfxUpdateDragCursorEventArgs
Called when the web view wants to update the mouse cursor during a drag & drop operation. |Operation| describes the allowed operation (none, move, copy, link).
Public classCfxUrlRequestClientGetAuthCredentialsEventArgs
Called on the IO thread when the browser needs credentials from the user. |IsProxy| indicates whether the host is a proxy server. |Host| contains the hostname and |Port| contains the port number. Return true (1) to continue the request and call CfxAuthCallback.Continue() when the authentication information is available. Return false (0) to cancel the request. This function will only be called for requests initiated from the browser process.
Public classCfxV8AccessorGetEventArgs
Handle retrieval the accessor value identified by |Name|. |Object| is the receiver ('this' object) of the accessor. If retrieval succeeds set |Retval| to the return value. If retrieval fails set |Exception| to the exception that will be thrown. Return true (1) if accessor retrieval was handled.
Public classCfxV8AccessorSetEventArgs
Handle assignment of the accessor value identified by |Name|. |Object| is the receiver ('this' object) of the accessor. |Value| is the new value being assigned to the accessor. If assignment fails set |Exception| to the exception that will be thrown. Return true (1) if accessor assignment was handled.
Public classCfxV8HandlerExecuteEventArgs
Handle execution of the function identified by |Name|. |Object| is the receiver ('this' object) of the function. |Arguments| is the list of arguments passed to the function. If execution succeeds set |Retval| to the function return value. If execution fails set |Exception| to the exception that will be thrown. Return true (1) if execution was handled.
Public classCfxWebPluginInfoVisitorVisitEventArgs
Method that will be called once for each plugin. |Count| is the 0-based index for the current plugin. |Total| is the total number of plugins. Return false (0) to stop visiting plugins. This function may never be called if no plugins are found.
Public classCfxWebPluginUnstableCallbackIsUnstableEventArgs
Method that will be called for the requested plugin. |Unstable| will be true (1) if the plugin has reached the crash count threshold of 3 times in 120 seconds.
Public classCfxWriteEventArgs
Write raw binary data.
Delegates
  DelegateDescription
Public delegateCfxCanGetCookieEventHandler
Return true (1) if the specified cookie can be sent with the request or false (0) otherwise. If false (0) is returned for any cookie then no cookies will be sent with the request.
Public delegateCfxCanSetCookieEventHandler
Return true (1) if the specified cookie returned with the response can be set or false (0) otherwise.
Public delegateCfxCookieVisitorVisitEventHandler
Method that will be called once for each cookie. |Count| is the 0-based index for the current cookie. |Total| is the total number of cookies. Set |DeleteCookie| to true (1) to delete the cookie currently being visited. Return false (0) to stop visiting cookies. This function may never be called if no cookies are found.
Public delegateCfxDeleteCookiesCallbackOnCompleteEventHandler
Method that will be called upon completion. |NumDeleted| will be the number of cookies that were deleted or -1 if unknown.
Public delegateCfxDialogHandlerOnFileDialogEventHandler
Called to run a file chooser dialog. |Mode| represents the type of dialog to display. |Title| to the title to be used for the dialog and may be NULL to show the default title ("Open" or "Save" depending on the mode). |DefaultFilePath| is the path with optional directory and/or file name component that should be initially selected in the dialog. |AcceptFilters| are used to restrict the selectable file types and may any combination of (a) valid lower-cased MIME types (e.g. "text/*" or "image/*"), (b) individual file extensions (e.g. ".txt" or ".png"), or (c) combined description and file extension delimited using "|" and ";" (e.g. "Image Types|.png;.gif;.jpg"). |SelectedAcceptFilter| is the 0-based index of the filter that should be selected by default. To display a custom dialog return true (1) and execute |Callback| either inline or at a later time. To display the default dialog return false (0).
Public delegateCfxDoCloseEventHandler
Called when a browser has recieved a request to close. This may result directly from a call to CfxBrowserHost::*close_browser() or indirectly if the browser is parented to a top-level window created by CEF and the user attempts to close that window (by clicking the 'X', for example). The do_close() function will be called after the JavaScript 'onunload' event has been fired. An application should handle top-level owner window close notifications by calling CfxBrowserHost.TryCloseBrowser() or CfxBrowserHost.CloseBrowser(false (0)) instead of allowing the window to close immediately (see the examples below). This gives CEF an opportunity to process the 'onbeforeunload' event and optionally cancel the close before do_close() is called. When windowed rendering is enabled CEF will internally create a window or view to host the browser. In that case returning false (0) from do_close() will send the standard close notification to the browser's top-level owner window (e.g. WM_CLOSE on Windows, performClose: on OS X, "delete_event" on Linux or CfxWindowDelegate.CanClose() callback from Views). If the browser's host window/view has already been destroyed (via view hierarchy tear-down, for example) then do_close() will not be called for that browser since is no longer possible to cancel the close. When windowed rendering is disabled returning false (0) from do_close() will cause the browser object to be destroyed immediately. If the browser's top-level owner window requires a non-standard close notification then send that notification from do_close() and return true (1). The CfxLifeSpanHandler.OnBeforeClose() function will be called after do_close() (if do_close() is called) and immediately before the browser object is destroyed. The application should only exit after on_before_close() has been called for all existing browsers. The below examples describe what should happen during window close when the browser is parented to an application-provided top-level window. Example 1: Using CfxBrowserHost.TryCloseBrowser(). This is recommended for clients using standard close handling and windows created on the browser process UI thread. 1. User clicks the window close button which sends a close notification to the application's top-level window. 2. Application's top-level window receives the close notification and calls TryCloseBrowser() (which internally calls CloseBrowser(false)). TryCloseBrowser() returns false so the client cancels the window close. 3. JavaScript 'onbeforeunload' handler executes and shows the close confirmation dialog (which can be overridden via CfxJSDialogHandler.OnBeforeUnloadDialog()). 4. User approves the close. 5. JavaScript 'onunload' handler executes. 6. CEF sends a close notification to the application's top-level window (because DoClose() returned false by default). 7. Application's top-level window receives the close notification and calls TryCloseBrowser(). TryCloseBrowser() returns true so the client allows the window close. 8. Application's top-level window is destroyed. 9. Application's on_before_close() handler is called and the browser object is destroyed. 10. Application exits by calling cef_quit_message_loop() if no other browsers exist. Example 2: Using CfxBrowserHost.CloseBrowser(false (0)) and implementing the do_close() callback. This is recommended for clients using non-standard close handling or windows that were not created on the browser process UI thread. 1. User clicks the window close button which sends a close notification to the application's top-level window. 2. Application's top-level window receives the close notification and: A. Calls CfxBrowserHost.CloseBrowser(false). B. Cancels the window close. 3. JavaScript 'onbeforeunload' handler executes and shows the close confirmation dialog (which can be overridden via CfxJSDialogHandler.OnBeforeUnloadDialog()). 4. User approves the close. 5. JavaScript 'onunload' handler executes. 6. Application's do_close() handler is called. Application will: A. Set a flag to indicate that the next close attempt will be allowed. B. Return false. 7. CEF sends an close notification to the application's top-level window. 8. Application's top-level window receives the close notification and allows the window to close based on the flag from #6B. 9. Application's top-level window is destroyed. 10. Application's on_before_close() handler is called and the browser object is destroyed. 11. Application exits by calling cef_quit_message_loop() if no other browsers exist.
Public delegateCfxDomVisitorVisitEventHandler
Method executed for visiting the DOM. The document object passed to this function represents a snapshot of the DOM at the time this function is executed. DOM objects are only valid for the scope of this function. Do not keep references to or attempt to access any DOM objects outside the scope of this function.
Public delegateCfxDownloadImageCallbackOnDownloadImageFinishedEventHandler
Method that will be executed when the image download has completed. |ImageUrl| is the URL that was downloaded and |HttpStatusCode| is the resulting HTTP status code. |Image| is the resulting image, possibly at multiple scale factors, or NULL if the download failed.
Public delegateCfxEndTracingCallbackOnEndTracingCompleteEventHandler
Called after all processes have sent their trace data. |TracingFile| is the path at which tracing data was written. The client is responsible for deleting |TracingFile|.
Public delegateCfxExecuteCommandEventHandler
Perform the action associated with the specified |CommandId| and optional |EventFlags|.
Public delegateCfxFilterEventHandler
Called to filter a chunk of data. Expected usage is as follows: A. Read input data from |DataIn| and set |DataInRead| to the number of bytes that were read up to a maximum of |DataInSize|. |DataIn| will be NULL if |DataInSize| is zero. B. Write filtered output data to |DataOut| and set |DataOutWritten| to the number of bytes that were written up to a maximum of |DataOutSize|. If no output data was written then all data must be read from |DataIn| (user must set |DataInRead| = |DataInSize|). C. Return RESPONSE_FILTER_DONE if all output data was written or RESPONSE_FILTER_NEED_MORE_DATA if output data is still pending. This function will be called repeatedly until the input buffer has been fully read (user sets |DataInRead| = |DataInSize|) and there is no more input data to filter (the resource response is complete). This function may then be called an additional time with an NULL input buffer if the user filled the output buffer (set |DataOutWritten| = |DataOutSize|) and returned RESPONSE_FILTER_NEED_MORE_DATA to indicate that output data is still pending. Calls to this function will stop when one of the following conditions is met: A. There is no more input data to filter (the resource response is complete) and the user sets |DataOutWritten| = 0 or returns RESPONSE_FILTER_DONE to indicate that all data has been written, or; B. The user returns RESPONSE_FILTER_ERROR to indicate an error. Do not keep a reference to the buffers passed to this function.
Public delegateCfxFindHandlerOnFindResultEventHandler
Called to report find results returned by CfxBrowserHost.Find(). |Identifer| is the identifier passed to find(), |Count| is the number of matches currently identified, |SelectionRect| is the location of where the match was found (in window coordinates), |ActiveMatchOrdinal| is the current position in the search results, and |FinalUpdate| is true (1) if this is the last find notification.
Public delegateCfxFlushEventHandler
Flush the stream.
Public delegateCfxFormatLabelEventHandler
Optionally modify a menu item label. Return true (1) if |Label| was modified.
Public delegateCfxGetBrowserProcessHandlerEventHandler
Return the handler for functionality specific to the browser process. This function is called on multiple threads in the browser process.
Public delegateCfxGetByIndexEventHandler
Handle retrieval of the interceptor value identified by |Index|. |Object| is the receiver ('this' object) of the interceptor. If retrieval succeeds, set |Retval| to the return value. If the requested value does not exist, don't set either |Retval| or |Exception|. If retrieval fails, set |Exception| to the exception that will be thrown. Return true (1) if interceptor retrieval was handled, false (0) otherwise.
Public delegateCfxGetByNameEventHandler
Handle retrieval of the interceptor value identified by |Name|. |Object| is the receiver ('this' object) of the interceptor. If retrieval succeeds, set |Retval| to the return value. If the requested value does not exist, don't set either |Retval| or |Exception|. If retrieval fails, set |Exception| to the exception that will be thrown. If the property has an associated accessor, it will be called only if you don't set |Retval|. Return true (1) if interceptor retrieval was handled, false (0) otherwise.
Public delegateCfxGetContextMenuHandlerEventHandler
Return the handler for context menus. If no handler is provided the default implementation will be used.
Public delegateCfxGetCookieManagerEventHandler
Called on the browser process IO thread to retrieve the cookie manager. If this function returns NULL the default cookie manager retrievable via CfxRequestContext.GetDefaultCookieManager() will be used.
Public delegateCfxGetDataResourceEventHandler
Called to retrieve data for the specified scale independent |ResourceId|. To provide the resource data set |Data| and |DataSize| to the data pointer and size respectively and return true (1). To use the default resource data return false (0). The resource data will not be copied and must remain resident in memory. Include cef_pack_resources.h for a listing of valid resource ID values.
Public delegateCfxGetDataResourceForScaleEventHandler
Called to retrieve data for the specified |ResourceId| nearest the scale factor |ScaleFactor|. To provide the resource data set |Data| and |DataSize| to the data pointer and size respectively and return true (1). To use the default resource data return false (0). The resource data will not be copied and must remain resident in memory. Include cef_pack_resources.h for a listing of valid resource ID values.
Public delegateCfxGetDialogHandlerEventHandler
Return the handler for dialogs. If no handler is provided the default implementation will be used.
Public delegateCfxGetDisplayHandlerEventHandler
Return the handler for browser display state events.
Public delegateCfxGetDownloadHandlerEventHandler
Return the handler for download events. If no handler is returned downloads will not be allowed.
Public delegateCfxGetDragHandlerEventHandler
Return the handler for drag events.
Public delegateCfxGetFindHandlerEventHandler
Return the handler for find result events.
Public delegateCfxGetFocusHandlerEventHandler
Return the handler for focus events.
Public delegateCfxGetGeolocationCallbackOnLocationUpdateEventHandler
Called with the 'best available' location information or, if the location update failed, with error information.
Public delegateCfxGetGeolocationHandlerEventHandler
Return the handler for geolocation permissions requests. If no handler is provided geolocation access will be denied by default.
Public delegateCfxGetJsDialogHandlerEventHandler
Return the handler for JavaScript dialogs. If no handler is provided the default implementation will be used.
Public delegateCfxGetKeyboardHandlerEventHandler
Return the handler for keyboard events.
Public delegateCfxGetLifeSpanHandlerEventHandler
Return the handler for browser life span events.
Public delegateCfxGetLoadHandlerEventHandler
Return the handler for browser load status events.
Public delegateCfxGetLocalizedStringEventHandler
Called to retrieve a localized translation for the specified |StringId|. To provide the translation set |String| to the translation string and return true (1). To use the default translation return false (0). Include cef_pack_strings.h for a listing of valid string ID values.
Public delegateCfxGetPdfPaperSizeEventHandler
Return the PDF paper size in device units. Used in combination with CfxBrowserHost.PrintToPdf().
Public delegateCfxGetPrintHandlerEventHandler
Return the handler for printing on Linux. If a print handler is not provided then printing will not be supported on the Linux platform.
Public delegateCfxGetRenderHandlerEventHandler
Return the handler for off-screen rendering events.
Public delegateCfxGetRenderProcessHandlerEventHandler
Return the handler for functionality specific to the render process. This function is called on the render process main thread.
Public delegateCfxGetRequestHandlerEventHandler
Return the handler for browser request events.
Public delegateCfxGetResourceBundleHandlerEventHandler
Return the handler for resource bundle events. If CfxSettings.PackLoadingDisabled is true (1) a handler must be returned. If no handler is returned resources will be loaded from pack files. This function is called by the browser and render processes on multiple threads.
Public delegateCfxGetResourceHandlerEventHandler
Called on the IO thread before a resource is loaded. To allow the resource to load normally return NULL. To specify a handler for the resource return a CfxResourceHandler object. The |Request| object should not be modified in this callback.
Public delegateCfxGetResourceResponseFilterEventHandler
Called on the IO thread to optionally filter resource response content. |Request| and |Response| represent the request and response respectively and cannot be modified in this callback.
Public delegateCfxGetResponseHeadersEventHandler
Retrieve response header information. If the response length is not known set |ResponseLength| to -1 and read_response() will be called until it returns false (0). If the response length is known set |ResponseLength| to a positive value and read_response() will be called until it returns false (0) or the specified number of bytes have been read. Use the |Response| object to set the mime type, http status code and other optional header values. To redirect the request to a new URL set |RedirectUrl| to the new URL. If an error occured while setting up the request you can call set_error() on |Response| to indicate the error condition.
Public delegateCfxGetRootScreenRectEventHandler
Called to retrieve the root window rectangle in screen coordinates. Return true (1) if the rectangle was provided.
Public delegateCfxGetScreenInfoEventHandler
Called to allow the client to fill in the CfxScreenInfo object with appropriate values. Return true (1) if the |ScreenInfo| structure has been modified. If the screen info rectangle is left NULL the rectangle from GetViewRect will be used. If the rectangle is still NULL or invalid popups may not be drawn correctly.
Public delegateCfxGetScreenPointEventHandler
Called to retrieve the translation from view coordinates to actual screen coordinates. Return true (1) if the screen coordinates were provided.
Public delegateCfxGetViewRectEventHandler
Called to retrieve the view rectangle which is relative to screen coordinates. Return true (1) if the rectangle was provided.
Public delegateCfxInitFilterEventHandler
Initialize the response filter. Will only be called a single time. The filter will not be installed if this function returns false (0).
Public delegateCfxMayBlockEventHandler
Return true (1) if this handler performs work like accessing the file system which may block. Used as a hint for determining the thread to access the handler from.
Public delegateCfxMenuClosedEventHandler
The menu has closed.
Public delegateCfxMenuWillShowEventHandler
The menu is about to show.
Public delegateCfxNavigationEntryVisitorVisitEventHandler
Method that will be executed. Do not keep a reference to |Entry| outside of this callback. Return true (1) to continue visiting entries or false (0) to stop. |Current| is true (1) if this entry is the currently loaded navigation entry. |Index| is the 0-based index of this entry and |Total| is the total number of entries.
Public delegateCfxOnAddressChangeEventHandler
Called when a frame's address has changed.
Public delegateCfxOnAfterCreatedEventHandler
Called after a new browser is created. This callback will be the first notification that references |Browser|.
Public delegateCfxOnBeforeBrowseEventHandler
Called on the UI thread before browser navigation. Return true (1) to cancel the navigation or false (0) to allow the navigation to proceed. The |Request| object cannot be modified in this callback. CfxLoadHandler.OnLoadingStateChange will be called twice in all cases. If the navigation is allowed CfxLoadHandler.OnLoadStart and CfxLoadHandler.OnLoadEnd will be called. If the navigation is canceled CfxLoadHandler.OnLoadError will be called with an |ErrorCode| value of ERR_ABORTED.
Public delegateCfxOnBeforeChildProcessLaunchEventHandler
Called before a child process is launched. Will be called on the browser process UI thread when launching a render process and on the browser process IO thread when launching a GPU or plugin process. Provides an opportunity to modify the child process command line. Do not keep a reference to |CommandLine| outside of this function.
Public delegateCfxOnBeforeCloseEventHandler
Called just before a browser is destroyed. Release all references to the browser object and do not attempt to execute any functions on the browser object after this callback returns. This callback will be the last notification that references |Browser|. See do_close() documentation for additional usage information.
Public delegateCfxOnBeforeCommandLineProcessingEventHandler
Provides an opportunity to view and/or modify command-line arguments before processing by CEF and Chromium. The |ProcessType| value will be NULL for the browser process. Do not keep a reference to the CfxCommandLine object passed to this function. The CfxSettings.CommandLineArgsDisabled value can be used to start with an NULL command-line object. Any values specified in CfxSettings that equate to command-line arguments will be set before this function is called. Be cautious when using this function to modify command-line arguments for non-browser processes as this may result in undefined behavior including crashes.
Public delegateCfxOnBeforeContextMenuEventHandler
Called before a context menu is displayed. |Params| provides information about the context menu state. |Model| initially contains the default context menu. The |Model| can be cleared to show no context menu or modified to show a custom menu. Do not keep references to |Params| or |Model| outside of this callback.
Public delegateCfxOnBeforeDownloadEventHandler
Called before a download begins. |SuggestedName| is the suggested name for the download file. By default the download will be canceled. Execute |Callback| either asynchronously or in this function to continue the download if desired. Do not keep a reference to |DownloadItem| outside of this function.
Public delegateCfxOnBeforeNavigationEventHandler
Called before browser navigation. Return true (1) to cancel the navigation or false (0) to allow the navigation to proceed. The |Request| object cannot be modified in this callback.
Public delegateCfxOnBeforePluginLoadEventHandler
Called on multiple browser process threads before a plugin instance is loaded. |MimeType| is the mime type of the plugin that will be loaded. |PluginUrl| is the content URL that the plugin will load and may be NULL. |IsMainFrame| will be true (1) if the plugin is being loaded in the main (top-level) frame, |TopOriginUrl| is the URL for the top-level frame that contains the plugin when loading a specific plugin instance or NULL when building the initial list of enabled plugins for 'navigator.plugins' JavaScript state. |PluginInfo| includes additional information about the plugin that will be loaded. |PluginPolicy| is the recommended policy. Modify |PluginPolicy| and return true (1) to change the policy. Return false (0) to use the recommended policy. The default plugin policy can be set at runtime using the `--plugin-policy=[allow|Detect|block]` command- line flag. Decisions to mark a plugin as disabled by setting |PluginPolicy| to PLUGIN_POLICY_DISABLED may be cached when |TopOriginUrl| is NULL. To purge the plugin list cache and potentially trigger new calls to this function call CfxRequestContext.PurgePluginListCache.
Public delegateCfxOnBeforePopupEventHandler
Called on the IO thread before a new popup browser is created. The |Browser| and |Frame| values represent the source of the popup request. The |TargetUrl| and |TargetFrameName| values indicate where the popup browser should navigate and may be NULL if not specified with the request. The |TargetDisposition| value indicates where the user intended to open the popup (e.g. current tab, new tab, etc). The |UserGesture| value will be true (1) if the popup was opened via explicit user gesture (e.g. clicking a link) or false (0) if the popup opened automatically (e.g. via the DomContentLoaded event). The |PopupFeatures| structure contains additional information about the requested popup window. To allow creation of the popup browser optionally modify |WindowInfo|, |Client|, |Settings| and |NoJavascriptAccess| and return false (0). To cancel creation of the popup browser return true (1). The |Client| and |Settings| values will default to the source browser's values. If the |NoJavascriptAccess| value is set to false (0) the new browser will not be scriptable and may not be hosted in the same renderer process as the source browser. Any modifications to |WindowInfo| will be ignored if the parent browser is wrapped in a CfxBrowserView.
Public delegateCfxOnBeforeResourceLoadEventHandler
Called on the IO thread before a resource request is loaded. The |Request| object may be modified. Return RV_CONTINUE to continue the request immediately. Return RV_CONTINUE_ASYNC and call CfxRequestCallback:: cont() at a later time to continue or cancel the request asynchronously. Return RV_CANCEL to cancel the request immediately.
Public delegateCfxOnBeforeUnloadDialogEventHandler
Called to run a dialog asking the user if they want to leave a page. Return false (0) to use the default dialog implementation. Return true (1) if the application will use a custom dialog or if the callback has been executed immediately. Custom dialogs may be either modal or modeless. If a custom dialog is used the application must execute |Callback| once the custom dialog is dismissed.
Public delegateCfxOnBrowserCreatedEventHandler
Called after a browser has been created. When browsing cross-origin a new browser will be created before the old browser with the same identifier is destroyed.
Public delegateCfxOnBrowserDestroyedEventHandler
Called before a browser is destroyed.
Public delegateCfxOnCancelGeolocationPermissionEventHandler
Called when a geolocation access request is canceled. |RequestId| is the unique ID for the permission request.
Public delegateCfxOnCertificateErrorEventHandler
Called on the UI thread to handle requests for URLs with an invalid SSL certificate. Return true (1) and call CfxRequestCallback.Continue() either in this function or at a later time to continue or cancel the request. Return false (0) to cancel the request immediately. If CfxSettings.IgnoreCertificateErrors is set all invalid certificates will be accepted without calling this function.
Public delegateCfxOnConsoleMessageEventHandler
Called to display a console message. Return true (1) to stop the message from being output to the console.
Public delegateCfxOnContextCreatedEventHandler
Called immediately after the V8 context for a frame has been created. To retrieve the JavaScript 'window' object use the CfxV8Context.GetGlobal() function. V8 handles can only be accessed from the thread on which they are created. A task runner for posting tasks on the associated thread can be retrieved via the CfxV8Context.GetTaskRunner() function.
Public delegateCfxOnContextMenuCommandEventHandler
Called to execute a command selected from the context menu. Return true (1) if the command was handled or false (0) for the default implementation. See CfxMenuId for the command ids that have default implementations. All user-defined command ids should be between MENU_ID_USER_FIRST and MENU_ID_USER_LAST. |Params| will have the same values as what was passed to on_before_context_menu(). Do not keep a reference to |Params| outside of this callback.
Public delegateCfxOnContextMenuDismissedEventHandler
Called when the context menu is dismissed irregardless of whether the menu was NULL or a command was selected.
Public delegateCfxOnContextReleasedEventHandler
Called immediately before the V8 context for a frame is released. No references to the context should be kept after this function is called.
Public delegateCfxOnCursorChangeEventHandler
Called when the browser's cursor has changed. If |Type| is CT_CUSTOM then |CustomCursorInfo| will be populated with the custom cursor information.
Public delegateCfxOnDialogClosedEventHandler
Called when the default implementation dialog is closed.
Public delegateCfxOnDownloadDataEventHandler
Called when some part of the response is read. |Data| contains the current bytes received since the last call. This function will not be called if the UR_FLAG_NO_DOWNLOAD_DATA flag is set on the request.
Public delegateCfxOnDownloadProgressEventHandler
Notifies the client of download progress. |Current| denotes the number of bytes received up to the call and |Total| is the expected total size of the response (or -1 if not determined).
Public delegateCfxOnDownloadUpdatedEventHandler
Called when a download's status or progress information has been updated. This may be called multiple times before and after on_before_download(). Execute |Callback| either asynchronously or in this function to cancel the download if desired. Do not keep a reference to |DownloadItem| outside of this function.
Public delegateCfxOnDragEnterEventHandler
Called when an external drag event enters the browser window. |DragData| contains the drag event data and |Mask| represents the type of drag operation. Return false (0) for default drag handling behavior or true (1) to cancel the drag event.
Public delegateCfxOnDraggableRegionsChangedEventHandler
Called whenever draggable regions for the browser window change. These can be specified using the '-webkit-app-region: drag/no-drag' CSS-property. If draggable regions are never defined in a document this function will also never be called. If the last draggable region is removed from a document this function will be called with an NULL vector.
Public delegateCfxOnFaviconUrlchangeEventHandler
Called when the page icon changes.
Public delegateCfxOnFocusedNodeChangedEventHandler
Called when a new node in the the browser gets focus. The |Node| value may be NULL if no specific node has gained focus. The node object passed to this function represents a snapshot of the DOM at the time this function is executed. DOM objects are only valid for the scope of this function. Do not keep references to or attempt to access any DOM objects outside the scope of this function.
Public delegateCfxOnFullscreenModeChangeEventHandler
Called when web content in the page has toggled fullscreen mode. If |Fullscreen| is true (1) the content will automatically be sized to fill the browser content area. If |Fullscreen| is false (0) the content will automatically return to its original size and position. The client is responsible for resizing the browser if desired.
Public delegateCfxOnGotFocusEventHandler
Called when the browser component has received focus.
Public delegateCfxOnImeCompositionRangeChangedEventHandler
Called when the IME composition range has changed. |SelectedRange| is the range of characters that have been selected. |CharacterBounds| is the bounds of each character in view coordinates.
Public delegateCfxOnJsDialogEventHandler
Called to run a JavaScript dialog. If |OriginUrl| is non-NULL it can be passed to the CfxFormatUrlForSecurityDisplay function to retrieve a secure and user-friendly display string. The |DefaultPromptText| value will be specified for prompt dialogs only. Set |SuppressMessage| to true (1) and return false (0) to suppress the message (suppressing messages is preferable to immediately executing the callback as this is used to detect presumably malicious behavior like spamming alert messages in onbeforeunload). Set |SuppressMessage| to false (0) and return false (0) to use the default implementation (the default implementation will show one modal dialog at a time and suppress any additional dialog requests until the displayed dialog is dismissed). Return true (1) if the application will use a custom dialog or if the callback has been executed immediately. Custom dialogs may be either modal or modeless. If a custom dialog is used the application must execute |Callback| once the custom dialog is dismissed.
Public delegateCfxOnKeyEventEventHandler
Called after the renderer and JavaScript in the page has had a chance to handle the event. |Event| contains information about the keyboard event. |OsEvent| is the operating system event message, if any. Return true (1) if the keyboard event was handled or false (0) otherwise.
Public delegateCfxOnLoadEndEventHandler
Called when the browser is done loading a frame. The |Frame| value will never be NULL -- call the is_main() function to check if this frame is the main frame. Multiple frames may be loading at the same time. Sub-frames may start or continue loading after the main frame load has ended. This function will always be called for all frames irrespective of whether the request completes successfully. For notification of overall browser load status use OnLoadingStateChange instead.
Public delegateCfxOnLoadErrorEventHandler
Called when the resource load for a navigation fails or is canceled. |ErrorCode| is the error code number, |ErrorText| is the error text and |FailedUrl| is the URL that failed to load. See net\base\net_error_list.h for complete descriptions of the error codes.
Public delegateCfxOnLoadingStateChangeEventHandler
Called when the loading state has changed. This callback will be executed twice -- once when loading is initiated either programmatically or by user action, and once when loading is terminated due to completion, cancellation of failure. It will be called before any calls to OnLoadStart and after all calls to OnLoadError and/or OnLoadEnd.
Public delegateCfxOnLoadStartEventHandler
Called when the browser begins loading a frame. The |Frame| value will never be NULL -- call the is_main() function to check if this frame is the main frame. |TransitionType| provides information about the source of the navigation and an accurate value is only available in the browser process. Multiple frames may be loading at the same time. Sub-frames may start or continue loading after the main frame load has ended. This function will always be called for all frames irrespective of whether the request completes successfully. For notification of overall browser load status use OnLoadingStateChange instead.
Public delegateCfxOnOpenUrlfromTabEventHandler
Called on the UI thread before OnBeforeBrowse in certain limited cases where navigating a new or different browser might be desirable. This includes user-initiated navigation that might open in a special way (e.g. links clicked via middle-click or ctrl + left-click) and certain types of cross-origin navigation initiated from the renderer process (e.g. navigating the top-level frame to/from a file URL). The |Browser| and |Frame| values represent the source of the navigation. The |TargetDisposition| value indicates where the user intended to navigate the browser based on standard Chromium behaviors (e.g. current tab, new tab, etc). The |UserGesture| value will be true (1) if the browser navigated via explicit user gesture (e.g. clicking a link) or false (0) if it navigated automatically (e.g. via the DomContentLoaded event). Return true (1) to cancel the navigation or false (0) to allow the navigation to proceed in the source browser's top-level frame.
Public delegateCfxOnPaintEventHandler
Called when an element should be painted. Pixel values passed to this function are scaled relative to view coordinates based on the value of CfxScreenInfo.DeviceScaleFactor returned from GetScreenInfo. |Type| indicates whether the element is the view or the popup widget. |Buffer| contains the pixel data for the whole image. |DirtyRects| contains the set of rectangles in pixel coordinates that need to be repainted. |Buffer| will be |Width|*|Height|*4 bytes in size and represents a BGRA image with an upper-left origin.
Public delegateCfxOnPluginCrashedEventHandler
Called on the browser process UI thread when a plugin has crashed. |PluginPath| is the path of the plugin that crashed.
Public delegateCfxOnPopupShowEventHandler
Called when the browser wants to show or hide the popup widget. The popup should be shown if |Show| is true (1) and hidden if |Show| is false (0).
Public delegateCfxOnPopupSizeEventHandler
Called when the browser wants to move or resize the popup widget. |Rect| contains the new location and size in view coordinates.
Public delegateCfxOnPreKeyEventEventHandler
Called before a keyboard event is sent to the renderer. |Event| contains information about the keyboard event. |OsEvent| is the operating system event message, if any. Return true (1) if the event was handled or false (0) otherwise. If the event will be handled in on_key_event() as a keyboard shortcut set |IsKeyboardShortcut| to true (1) and return false (0).
Public delegateCfxOnPrintDialogEventHandler
Show the print dialog. Execute |Callback| once the dialog is dismissed. Return true (1) if the dialog will be displayed or false (0) to cancel the printing immediately.
Public delegateCfxOnPrintJobEventHandler
Send the print job to the printer. Execute |Callback| once the job is completed. Return true (1) if the job will proceed or false (0) to cancel the job immediately.
Public delegateCfxOnPrintSettingsEventHandler
Synchronize |Settings| with client state. If |GetDefaults| is true (1) then populate |Settings| with the default print settings. Do not keep a reference to |Settings| outside of this callback.
Public delegateCfxOnPrintStartEventHandler
Called when printing has started for the specified |Browser|. This function will be called before the other OnPrint*() functions and irrespective of how printing was initiated (e.g. CfxBrowserHost.Print(), JavaScript window.print() or PDF extension print button).
Public delegateCfxOnProcessMessageReceivedEventHandler
Called when a new message is received from a different process. Return true (1) if the message was handled or false (0) otherwise. Do not keep a reference to or attempt to access the message outside of this callback.
Public delegateCfxOnProtocolExecutionEventHandler
Called on the UI thread to handle requests for URLs with an unknown protocol component. Set |AllowOsExecution| to true (1) to attempt execution via the registered OS protocol handler, if any. SECURITY WARNING: YOU SHOULD USE THIS METHOD TO ENFORCE RESTRICTIONS BASED ON SCHEME, HOST OR OTHER URL ANALYSIS BEFORE ALLOWING OS EXECUTION.
Public delegateCfxOnQuotaRequestEventHandler
Called on the IO thread when JavaScript requests a specific storage quota size via the webkitStorageInfo.requestQuota function. |OriginUrl| is the origin of the page making the request. |NewSize| is the requested quota size in bytes. Return true (1) to continue the request and call CfxRequestCallback.Continue() either in this function or at a later time to grant or deny the request. Return false (0) to cancel the request immediately.
Public delegateCfxOnRegisterCustomSchemesEventHandler
Provides an opportunity to register custom schemes. Do not keep a reference to the |Registrar| object. This function is called on the main thread for each process and the registered schemes should be the same across all processes.
Public delegateCfxOnRenderProcessTerminatedEventHandler
Called on the browser process UI thread when the render process terminates unexpectedly. |Status| indicates how the process terminated.
Public delegateCfxOnRenderProcessThreadCreatedEventHandler
Called on the browser process IO thread after the main thread has been created for a new render process. Provides an opportunity to specify extra information that will be passed to CfxRenderProcessHandler.OnRenderThreadCreated() in the render process. Do not keep a reference to |ExtraInfo| outside of this function.
Public delegateCfxOnRenderThreadCreatedEventHandler
Called after the render process main thread has been created. |ExtraInfo| is a read-only value originating from CfxBrowserProcessHandler.OnRenderProcessThreadCreated(). Do not keep a reference to |ExtraInfo| outside of this function.
Public delegateCfxOnRenderViewReadyEventHandler
Called on the browser process UI thread when the render view associated with |Browser| is ready to receive/handle IPC messages in the render process.
Public delegateCfxOnRequestCompleteEventHandler
Notifies the client that the request has completed. Use the CfxUrlRequest.GetRequestStatus function to determine if the request was successful or not.
Public delegateCfxOnRequestGeolocationPermissionEventHandler
Called when a page requests permission to access geolocation information. |RequestingUrl| is the URL requesting permission and |RequestId| is the unique ID for the permission request. Return true (1) and call CfxGeolocationCallback.Continue() either in this function or at a later time to continue or cancel the request. Return false (0) to cancel the request immediately.
Public delegateCfxOnResetDialogStateEventHandler
Called to cancel any pending dialogs and reset any saved dialog state. Will be called due to events like page navigation irregardless of whether any dialogs are currently pending.
Public delegateCfxOnResourceLoadCompleteEventHandler
Called on the IO thread when a resource load has completed. |Request| and |Response| represent the request and response respectively and cannot be modified in this callback. |Status| indicates the load completion status. |ReceivedContentLength| is the number of response bytes actually read.
Public delegateCfxOnResourceRedirectEventHandler
Called on the IO thread when a resource load is redirected. The |Request| parameter will contain the old URL and other request-related information. The |Response| parameter will contain the response that resulted in the redirect. The |NewUrl| parameter will contain the new URL and can be changed if desired. The |Request| object cannot be modified in this callback.
Public delegateCfxOnResourceResponseEventHandler
Called on the IO thread when a resource response is received. To allow the resource to load normally return false (0). To redirect or retry the resource modify |Request| (url, headers or post body) and return true (1). The |Response| object cannot be modified in this callback.
Public delegateCfxOnScheduleMessagePumpWorkEventHandler
Called from any thread when work has been scheduled for the browser process main (UI) thread. This callback is used in combination with CfxSettings. external_message_pump and cef_do_message_loop_work() in cases where the CEF message loop must be integrated into an existing application message loop (see additional comments and warnings on CfxDoMessageLoopWork). This callback should schedule a cef_do_message_loop_work() call to happen on the main (UI) thread. |DelayMs| is the requested delay in milliseconds. If |DelayMs| is <= 0 then the call should happen reasonably soon. If |DelayMs| is > 0 then the call should be scheduled to happen after the specified delay and any currently pending scheduled call should be cancelled.
Public delegateCfxOnScrollOffsetChangedEventHandler
Called when the scroll offset has changed.
Public delegateCfxOnSelectClientCertificateEventHandler
Called on the UI thread when a client certificate is being requested for authentication. Return false (0) to use the default behavior and automatically select the first certificate available. Return true (1) and call CfxSelectClientCertificateCallback.Select either in this function or at a later time to select a certificate. Do not call Select or call it with NULL to continue without using any certificate. |IsProxy| indicates whether the host is an HTTPS proxy or the origin server. |Host| and |Port| contains the hostname and port of the SSL server. |Certificates| is the list of certificates to choose from; this list has already been pruned by Chromium so that it only contains certificates from issuers that the server trusts.
Public delegateCfxOnSetFocusEventHandler
Called when the browser component is requesting focus. |Source| indicates where the focus request is originating from. Return false (0) to allow the focus to be set or true (1) to cancel setting the focus.
Public delegateCfxOnStatusMessageEventHandler
Called when the browser receives a status message. |Value| contains the text that will be displayed in the status message.
Public delegateCfxOnTakeFocusEventHandler
Called when the browser component is about to loose focus. For instance, if focus was on the last HTML element and the user pressed the TAB key. |Next| will be true (1) if the browser is giving focus to the next component and false (0) if the browser is giving focus to the previous component.
Public delegateCfxOnTitleChangeEventHandler
Called when the page title changes.
Public delegateCfxOnTooltipEventHandler
Called when the browser is about to display a tooltip. |Text| contains the text that will be displayed in the tooltip. To handle the display of the tooltip yourself return true (1). Otherwise, you can optionally modify |Text| and then return false (0) to allow the browser to display the tooltip. When window rendering is disabled the application is responsible for drawing tooltips and the return value is ignored.
Public delegateCfxOnUncaughtExceptionEventHandler
Called for global uncaught exceptions in a frame. Execution of this callback is disabled by default. To enable set CfxSettings.UncaughtExceptionStackSize > 0.
Public delegateCfxOnUploadProgressEventHandler
Notifies the client of upload progress. |Current| denotes the number of bytes sent so far and |Total| is the total size of uploading data (or -1 if chunked upload is enabled). This function will only be called if the UR_FLAG_REPORT_UPLOAD_PROGRESS flag is set on the request.
Public delegateCfxPdfPrintCallbackOnPdfPrintFinishedEventHandler
Method that will be executed when the PDF printing has completed. |Path| is the output path. |Ok| will be true (1) if the printing completed successfully or false (0) otherwise.
Public delegateCfxProcessRequestEventHandler
Begin processing the request. To handle the request return true (1) and call CfxCallback.Continue() once the response header information is available (CfxCallback.Continue() can also be called from inside this function if header information is available immediately). To cancel the request return false (0).
Public delegateCfxReadEventHandler
Read raw binary data.
Public delegateCfxReadHandlerEofEventHandler
Return non-zero if at end of file.
Public delegateCfxReadResponseEventHandler
Read response data. If data is available immediately copy up to |BytesToRead| bytes into |DataOut|, set |BytesRead| to the number of bytes copied, and return true (1). To read the data at a later time set |BytesRead| to 0, return true (1) and call CfxCallback.Continue() when the data is available. To indicate response completion return false (0).
Public delegateCfxRegisterCdmCallbackOnCdmRegistrationCompleteEventHandler
Method that will be called when CDM registration is complete. |Result| will be CEF_CDM_REGISTRATION_ERROR_NONE if registration completed successfully. Otherwise, |Result| and |ErrorMessage| will contain additional information about why registration failed.
Public delegateCfxRequestHandlerGetAuthCredentialsEventHandler
Called on the IO thread when the browser needs credentials from the user. |IsProxy| indicates whether the host is a proxy server. |Host| contains the hostname and |Port| contains the port number. |Realm| is the realm of the challenge and may be NULL. |Scheme| is the authentication scheme used, such as "basic" or "digest", and will be NULL if the source of the request is an FTP server. Return true (1) to continue the request and call CfxAuthCallback.Continue() either in this function or at a later time when the authentication information is available. Return false (0) to cancel the request immediately.
Public delegateCfxResolveCallbackOnResolveCompletedEventHandler
Called after the ResolveHost request has completed. |Result| will be the result code. |ResolvedIps| will be the list of resolved IP addresses or NULL if the resolution failed.
Public delegateCfxRunContextMenuEventHandler
Called to allow custom display of the context menu. |Params| provides information about the context menu state. |Model| contains the context menu model resulting from OnBeforeContextMenu. For custom display return true (1) and execute |Callback| either synchronously or asynchronously with the selected command ID. For default display return false (0). Do not keep references to |Params| or |Model| outside of this callback.
Public delegateCfxRunFileDialogCallbackOnFileDialogDismissedEventHandler
Called asynchronously after the file dialog is dismissed. |SelectedAcceptFilter| is the 0-based index of the value selected from the accept filters array passed to CfxBrowserHost.RunFileDialog. |FilePaths| will be a single value or a list of values depending on the dialog mode. If the selection was cancelled |FilePaths| will be NULL.
Public delegateCfxSchemeHandlerFactoryCreateEventHandler
Return a new resource handler instance to handle the request or an NULL reference to allow default handling of the request. |Browser| and |Frame| will be the browser window and frame respectively that originated the request or NULL if the request did not originate from a browser window (for example, if the request came from CfxUrlRequest). The |Request| object passed to this function will not contain cookie data.
Public delegateCfxSeekEventHandler
Seek to the specified offset position. |Whence| may be any one of SEEK_CUR, SEEK_END or SEEK_SET. Return zero on success and non-zero on failure.
Public delegateCfxSetByIndexEventHandler
Handle assignment of the interceptor value identified by |Index|. |Object| is the receiver ('this' object) of the interceptor. |Value| is the new value being assigned to the interceptor. If assignment fails, set |Exception| to the exception that will be thrown. Return true (1) if interceptor assignment was handled, false (0) otherwise.
Public delegateCfxSetByNameEventHandler
Handle assignment of the interceptor value identified by |Name|. |Object| is the receiver ('this' object) of the interceptor. |Value| is the new value being assigned to the interceptor. If assignment fails, set |Exception| to the exception that will be thrown. This setter will always be called, even when the property has an associated accessor. Return true (1) if interceptor assignment was handled, false (0) otherwise.
Public delegateCfxSetCookieCallbackOnCompleteEventHandler
Method that will be called upon completion. |Success| will be true (1) if the cookie was set successfully.
Public delegateCfxStartDraggingEventHandler
Called when the user starts dragging content in the web view. Contextual information about the dragged content is supplied by |DragData|. (|X|, |Y|) is the drag start location in screen coordinates. OS APIs that run a system message loop may be used within the StartDragging call. Return false (0) to abort the drag operation. Don't call any of CfxBrowserHost.DragSource*Ended* functions after returning false (0). Return true (1) to handle the drag operation. Call CfxBrowserHost.DragSourceEndedAt and DragSourceSystemDragEnded either synchronously or asynchronously to inform the web view that the drag operation has ended.
Public delegateCfxStringVisitorVisitEventHandler
Method that will be executed.
Public delegateCfxTellEventHandler
Return the current offset position.
Public delegateCfxUpdateDragCursorEventHandler
Called when the web view wants to update the mouse cursor during a drag & drop operation. |Operation| describes the allowed operation (none, move, copy, link).
Public delegateCfxUrlRequestClientGetAuthCredentialsEventHandler
Called on the IO thread when the browser needs credentials from the user. |IsProxy| indicates whether the host is a proxy server. |Host| contains the hostname and |Port| contains the port number. Return true (1) to continue the request and call CfxAuthCallback.Continue() when the authentication information is available. Return false (0) to cancel the request. This function will only be called for requests initiated from the browser process.
Public delegateCfxV8AccessorGetEventHandler
Handle retrieval the accessor value identified by |Name|. |Object| is the receiver ('this' object) of the accessor. If retrieval succeeds set |Retval| to the return value. If retrieval fails set |Exception| to the exception that will be thrown. Return true (1) if accessor retrieval was handled.
Public delegateCfxV8AccessorSetEventHandler
Handle assignment of the accessor value identified by |Name|. |Object| is the receiver ('this' object) of the accessor. |Value| is the new value being assigned to the accessor. If assignment fails set |Exception| to the exception that will be thrown. Return true (1) if accessor assignment was handled.
Public delegateCfxV8HandlerExecuteEventHandler
Handle execution of the function identified by |Name|. |Object| is the receiver ('this' object) of the function. |Arguments| is the list of arguments passed to the function. If execution succeeds set |Retval| to the function return value. If execution fails set |Exception| to the exception that will be thrown. Return true (1) if execution was handled.
Public delegateCfxWebPluginInfoVisitorVisitEventHandler
Method that will be called once for each plugin. |Count| is the 0-based index for the current plugin. |Total| is the total number of plugins. Return false (0) to stop visiting plugins. This function may never be called if no plugins are found.
Public delegateCfxWebPluginUnstableCallbackIsUnstableEventHandler
Method that will be called for the requested plugin. |Unstable| will be true (1) if the plugin has reached the crash count threshold of 3 times in 120 seconds.
Public delegateCfxWriteEventHandler
Write raw binary data.