Skip to content

浏览器事件

csharp
#region 程序集 FBroSharpInterface, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
// T:\Csharp\莫生\WindowsFormsAppTest\packages\FBroSharp.Common.4.20.38\FBroSharp\x86\FBroSharpInterface.dll
// Decompiled with ICSharpCode.Decompiler 8.1.1.7464
#endregion

using System;
using System.Collections.Generic;
using FBroSharp.Callback;
using FBroSharp.Const;
using FBroSharp.DataType;
using FBroSharp.Lib;
using FBroSharp.Value;

namespace FBroSharp.Event;

public class FBroSharpBrowserEvent
{
    //
    // 摘要:
    //     浏览器_收到消息
    //
    //     Called when a new message is received from a different process. Return true if
    //     the message was handled or false otherwise. It is safe to keep a reference to
    //     |message| outside of this callback.
    public virtual bool OnProcessMessageReceived(IFBroSharpBrowser browser, IFBroSharpFrame frame, FBroSharpProcessId source_process, IFBroSharpProcessMessage message)
    {
        return false;
    }

    //
    // 摘要:
    //     浏览器_即将导航
    //
    //     Called on the UI thread before browser navigation. Return true to cancel the
    //     navigation or false to allow the navigation to proceed. The |request| object
    //     cannot be modified in this callback. CefLoadHandler::OnLoadingStateChange will
    //     be called twice in all cases. If the navigation is allowed CefLoadHandler::OnLoadStart
    //     and CefLoadHandler::OnLoadEnd will be called. If the navigation is canceled CefLoadHandler::OnLoadError
    //     will be called with an |errorCode| value of ERR_ABORTED. The |user_gesture| value
    //     will be true if the browser navigated via explicit user gesture (e.g. clicking
    //     a link) or false if it navigated automatically (e.g. via the DomContentLoaded
    //     event).
    public virtual bool OnBeforeBrowse(IFBroSharpBrowser browser, IFBroSharpFrame frame, IFBroSharpRequest request, bool user_gesture, bool is_redirect)
    {
        return false;
    }

    //
    // 摘要:
    //     浏览器_从标签打开地址
    //
    //     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 |target_disposition| value indicates where the user intended to navigate
    //     the browser based on standard Chromium behaviors (e.g. current tab, new tab,
    //     etc). The |user_gesture| value will be true if the browser navigated via explicit
    //     user gesture (e.g. clicking a link) or false if it navigated automatically (e.g.
    //     via the DomContentLoaded event). Return true to cancel the navigation or false
    //     to allow the navigation to proceed in the source browser's top-level frame.
    public virtual bool OnOpenURLFromTab(IFBroSharpBrowser browser, IFBroSharpFrame frame, string target_url, FBroSharpWindowOpenDisposition target_disposition, bool user_gesture)
    {
        return false;
    }

    //
    // 摘要:
    //     浏览器_JS请求存储配额
    //
    //     Called on the IO thread when JavaScript requests a specific storage quota size
    //     via the webkitStorageInfo.requestQuota function. |origin_url| is the origin of
    //     the page making the request. |new_size| is the requested quota size in bytes.
    //     Return true to continue the request and call CefCallback methods either in this
    //     method or at a later time to grant or deny the request. Return false to cancel
    //     the request immediately.
    public virtual bool OnQuotaRequest(IFBroSharpBrowser browser, string origin_url, long new_size, IFBroSharpCallback callback)
    {
        callback.Dispose();
        return false;
    }

    //
    // 摘要:
    //     浏览器_请求证书错误
    //
    //     Called on the UI thread to handle requests for URLs with an invalid SSL certificate.
    //     Return true and call CefCallback methods either in this method or at a later
    //     time to continue or cancel the request. Return false to cancel the request immediately.
    //     If cef_settings_t.ignore_certificate_errors is set all invalid certificates will
    //     be accepted without calling this method.
    public virtual bool OnCertificateError(IFBroSharpBrowser browser, int cert_error, string request_url, IFBroSharpSSLInfo ssl_info, IFBroSharpCallback callback)
    {
        callback.Dispose();
        return false;
    }

    //
    // 摘要:
    //     浏览器_请求证书
    //
    //     Called on the UI thread when a client certificate is being requested for authentication.
    //     Return false to use the default behavior and automatically select the first certificate
    //     available. Return true and call CefSelectClientCertificateCallback::Select either
    //     in this method 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 virtual bool OnSelectClientCertificate(IFBroSharpBrowser browser, bool isProxy, string host, int port, List<IFBroSharpX509Certificate> certificates, IFBroSharpSelectClientCertificateCallback callback)
    {
        callback.Dispose();
        return false;
    }

    //
    // 摘要:
    //     浏览器_渲染视图
    //
    //     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 virtual void OnRenderViewReady(IFBroSharpBrowser browser)
    {
    }

    //
    // 摘要:
    //     浏览器_渲染意外终止
    //
    //     Called on the browser process UI thread when the render process terminates unexpectedly.
    //     |status| indicates how the process terminated.
    public virtual void OnRenderProcessTerminated(IFBroSharpBrowser browser, FBroSharpTerminationStatust status)
    {
    }

    //
    // 摘要:
    //     浏览器_获得需授权证书
    //
    //     Called on the IO thread when the browser needs credentials from the user. |origin_url|
    //     is the origin making this authentication request. |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 empty. |scheme|
    //     is the authentication scheme used, such as "basic" or "digest", and will be empty
    //     if the source of the request is an FTP server. Return true to continue the request
    //     and call CefAuthCallback::Continue() either in this method or at a later time
    //     when the authentication information is available. Return false to cancel the
    //     request immediately.
    public virtual bool GetAuthCredentials(IFBroSharpBrowser browser, string origin_url, bool isProxy, string host, int port, string realm, string scheme, IFBroSharpAuthCallback callback)
    {
        callback.Dispose();
        return false;
    }

    //
    // 摘要:
    //     浏览器_即将创建主框架Document
    //
    //     Called on the browser process UI thread when the window.document object of the
    //     main frame has been created.
    public virtual void OnDocumentAvailableInMainFrame(IFBroSharpBrowser browser)
    {
    }

    //
    // 摘要:
    //     浏览器_创建完毕
    //
    //     Called after a new browser is created. It is now safe to begin performing actions
    //     with |browser|. CefFrameHandler callbacks related to initial main frame creation
    //     will arrive before this callback. See CefFrameHandler documentation for additional
    //     usage information.
    public virtual void OnAfterCreated(IFBroSharpBrowser browser, IFBroSharpDictionaryValue extrainfo)
    {
    }

    //
    // 摘要:
    //     浏览器_即将打开新窗口
    //
    //     Called on the UI thread before a new popup browser is created. The |browser|
    //     and |frame| values represent the source of the popup request. The |target_url|
    //     and |target_frame_name| values indicate where the popup browser should navigate
    //     and may be empty if not specified with the request. The |target_disposition|
    //     value indicates where the user intended to open the popup (e.g. current tab,
    //     new tab, etc). The |user_gesture| value will be true if the popup was opened
    //     via explicit user gesture (e.g. clicking a link) or false 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
    //     |no_javascript_access| and return false. To cancel creation of the popup browser
    //     return true. The |client| and |settings| values will default to the source browser's
    //     values. If the |no_javascript_access| value is set to false 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 CefBrowserView. Popup browser creation will be canceled if the
    //     parent browser is destroyed before the popup browser creation completes (indicated
    //     by a call to OnAfterCreated for the popup browser). The |extra_info| parameter
    //     provides an opportunity to specify extra information specific to the created
    //     popup browser that will be passed to CefRenderProcessHandler::OnBrowserCreated()
    //     in the render process.
    public virtual bool OnBeforePopup(IFBroSharpBrowser browser, IFBroSharpFrame frame, string target_url, string target_frame_name, FBroSharpWindowOpenDisposition target_disposition, bool user_gesture, FBroSharpPopupfeatures popupFeatures, ref FBroSharpWindowsInfo windowInfo, ref FBroSharpBrowserSetting settings, ref bool no_javascript_access, IFBroSharpUseExtraData user_settings)
    {
        return false;
    }

    //
    // 摘要:
    //     浏览器_执行关闭
    //
    //     Called when a browser has recieved a request to close. This may result directly
    //     from a call to CefBrowserHost::*CloseBrowser() 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 DoClose() method will be
    //     called after the JavaScript 'onunload' event has been fired.
    //
    //     An application should handle top-level owner window close notifications by calling
    //     CefBrowserHost::TryCloseBrowser() or CefBrowserHost::CloseBrowser(false) 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 DoClose() is called.
    //
    //     When windowed rendering is enabled CEF will internally create a window or view
    //     to host the browser. In that case returning false from DoClose() 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 CefWindowDelegate::CanClose()
    //     callback from Views). If the browser's host window/view has already been destroyed
    //     (via view hierarchy tear-down, for example) then DoClose() will not be called
    //     for that browser since is no longer possible to cancel the close.
    //
    //     When windowed rendering is disabled returning false from DoClose() 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 DoClose() and return true.
    //
    //     The CefLifeSpanHandler::OnBeforeClose() method will be called after DoClose()
    //     (if DoClose() is called) and immediately before the browser object is destroyed.
    //     The application should only exit after OnBeforeClose() 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 CefBrowserHost::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 CefJSDialogHandler::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 OnBeforeClose() handler is called and the browser object is
    //     destroyed.
    //
    //     10. Application exits by calling CefQuitMessageLoop() if no other browsers exist.
    //
    //
    //     Example 2: Using CefBrowserHost::CloseBrowser(false) and implementing the DoClose()
    //     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
    //     CefBrowserHost::CloseBrowser(false). B. Cancels the window close.
    //
    //     3. JavaScript 'onbeforeunload' handler executes and shows the close confirmation
    //     dialog (which can be overridden via CefJSDialogHandler::OnBeforeUnloadDialog()).
    //
    //
    //     4. User approves the close.
    //
    //     5. JavaScript 'onunload' handler executes.
    //
    //     6. Application's DoClose() 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 OnBeforeClose() handler is called and the browser object is
    //     destroyed.
    //
    //     11. Application exits by calling CefQuitMessageLoop() if no other browsers exist.
    public virtual bool DoClose(IFBroSharpBrowser browser)
    {
        return false;
    }

    //
    // 摘要:
    //     浏览器_即将关闭
    //
    //     Called just before a browser is destroyed. Release all references to the browser
    //     object and do not attempt to execute any methods on the browser object (other
    //     than IsValid, GetIdentifier or IsSame) after this callback returns. CefFrameHandler
    //     callbacks related to final main frame destruction will arrive after this callback
    //     and CefBrowser::IsValid will return false at that time. Any in-progress network
    //     requests associated with |browser| will be aborted when the browser is destroyed,
    //     and CefResourceRequestHandler callbacks related to those requests may still arrive
    //     on the IO thread after this callback. See CefFrameHandler and DoClose() documentation
    //     for additional usage information.
    public virtual void OnBeforeClose(IFBroSharpBrowser browser)
    {
    }

    //
    // 摘要:
    //     浏览器_地址被改变
    //
    //     Called when a frame's address has changed.
    public virtual void OnAddressChange(IFBroSharpBrowser browser, IFBroSharpFrame frame, string url)
    {
    }

    //
    // 摘要:
    //     浏览器_标题被改变
    //
    //     Called when the page title changes.
    public virtual void OnTitleChange(IFBroSharpBrowser browser, string title)
    {
    }

    //
    // 摘要:
    //     浏览器_网页图标被改变
    //
    //     Called when the page icon changes.
    public virtual void OnFaviconURLChange(IFBroSharpBrowser browser, IFBroSharpListValue icon_urls)
    {
    }

    //
    // 摘要:
    //     浏览器_全屏模式被改变
    //
    //     Called when web content in the page has toggled fullscreen mode. If |fullscreen|
    //     is true the content will automatically be sized to fill the browser content area.
    //     If |fullscreen| is false the content will automatically return to its original
    //     size and position. The client is responsible for resizing the browser if desired.
    public virtual void OnFullscreenModeChange(IFBroSharpBrowser browser, bool fullscreen)
    {
    }

    //
    // 摘要:
    //     浏览器_工具栏被改变
    //
    //     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. Otherwise, you can optionally modify |text| and then return false
    //     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 virtual bool OnTooltip(IFBroSharpBrowser browser, ref string text)
    {
        return false;
    }

    //
    // 摘要:
    //     浏览器_状态栏被改变
    //
    //     Called when the browser receives a status message. |value| contains the text
    //     that will be displayed in the status message.
    public virtual void OnStatusMessage(IFBroSharpBrowser browser, string value)
    {
    }

    //
    // 摘要:
    //     浏览器_控制台消息
    //
    //     Called to display a console message. Return true to stop the message from being
    //     output to the console.
    public virtual bool OnConsoleMessage(IFBroSharpBrowser browser, FBroLogSeverityType level, string message, string source, int line)
    {
        return false;
    }

    //
    // 摘要:
    //     浏览器_自动调整尺寸
    //
    //     Called when auto-resize is enabled via CefBrowserHost::SetAutoResizeEnabled and
    //     the contents have auto-resized. |new_size| will be the desired size in view coordinates.
    //     Return true if the resize was handled or false for default handling.
    public virtual bool OnAutoResize(IFBroSharpBrowser browser, FBroSharpSize new_size)
    {
        return false;
    }

    //
    // 摘要:
    //     浏览器_加载进度被改变
    //
    //     Called when the overall page loading progress has changed. |progress| ranges
    //     from 0.0 to 1.0.
    public virtual void OnLoadingProgressChange(IFBroSharpBrowser browser, double progress)
    {
    }

    //
    // 摘要:
    //     浏览器_光标被改变
    //
    //     Called when the browser's cursor has changed. If |type| is CT_CUSTOM then |custom_cursor_info|
    //     will be populated with the custom cursor information. Return true if the cursor
    //     change was handled or false for default handling.
    public virtual bool OnCursorChange(IFBroSharpBrowser browser, long cursor, FBroSharpCursorType type, FBroSharpCursorInfo custom_cursor_info)
    {
        return false;
    }

    //
    // 摘要:
    //     浏览器_即将改变媒体访问
    //
    //     Called when the browser's access to an audio and/or video source has changed.
    public virtual void OnMediaAccessChange(IFBroSharpBrowser browser, bool has_video_access, bool has_audio_access)
    {
    }

    //
    // 摘要:
    //     即将加载资源
    //
    //     Called on the IO thread before a resource request is loaded. The |browser| and
    //     |frame| values represent the source of the request, and may be NULL for requests
    //     originating from service workers or CefURLRequest. To redirect or change the
    //     resource load optionally modify |request|. Modification of the request URL will
    //     be treated as a redirect. Return RV_CONTINUE to continue the request immediately.
    //     Return RV_CONTINUE_ASYNC and call CefCallback methods at a later time to continue
    //     or cancel the request asynchronously. Return RV_CANCEL to cancel the request
    //     immediately.
    public virtual FBroSharpReturnValueType OnBeforeResourceLoad(IFBroSharpBrowser browser, IFBroSharpFrame frame, IFBroSharpRequest request, IFBroSharpCallback callback)
    {
        callback.Dispose();
        return FBroSharpReturnValueType.RV_CONTINUE;
    }

    //
    // 摘要:
    //     浏览器_获取资源处理器
    //
    //     通过set_callback的SetCallback方法设置处理器
    //
    //     Called on the IO thread before a resource is loaded. The |browser| and |frame|
    //     values represent the source of the request, and may be NULL for requests originating
    //     from service workers or CefURLRequest. To allow the resource to load using the
    //     default network loader return NULL. To specify a handler for the resource return
    //     a CefResourceHandler object. The |request| object cannot not be modified in this
    //     callback.
    public virtual void GetResourceHandler(IFBroSharpBrowser browser, IFBroSharpFrame frame, IFBroSharpRequest request, IFBroSharpResourceHandler set_callback)
    {
    }

    //
    // 摘要:
    //     浏览器_重定向资源
    //
    //     Called on the IO thread when a resource load is redirected. The |browser| and
    //     |frame| values represent the source of the request, and may be NULL for requests
    //     originating from service workers or CefURLRequest. 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 |new_url| parameter
    //     will contain the new URL and can be changed if desired. The |request| and |response|
    //     objects cannot be modified in this callback.
    public virtual void OnResourceRedirect(IFBroSharpBrowser browser, IFBroSharpFrame frame, IFBroSharpRequest request, IFBroSharpResponse response, ref string new_url)
    {
    }

    //
    // 摘要:
    //     浏览器_响应资源
    //
    //     Called on the IO thread when a resource response is received. The |browser| and
    //     |frame| values represent the source of the request, and may be NULL for requests
    //     originating from service workers or CefURLRequest. To allow the resource load
    //     to proceed without modification return false. To redirect or retry the resource
    //     load optionally modify |request| and return true. Modification of the request
    //     URL will be treated as a redirect. Requests handled using the default network
    //     loader cannot be redirected in this callback. The |response| object cannot be
    //     modified in this callback.
    //
    //     WARNING: Redirecting using this method is deprecated. Use OnBeforeResourceLoad
    //     or GetResourceHandler to perform redirects.
    public virtual bool OnResourceResponse(IFBroSharpBrowser browser, IFBroSharpFrame frame, IFBroSharpRequest request, IFBroSharpResponse response)
    {
        return false;
    }

    //
    // 摘要:
    //     浏览器_获取资源过滤器
    //
    //     通过set_filter的SetCallback方法设置过滤器
    //
    //     Called on the IO thread to optionally filter resource response content. The |browser|
    //     and |frame| values represent the source of the request, and may be NULL for requests
    //     originating from service workers or CefURLRequest. |request| and |response| represent
    //     the request and response respectively and cannot be modified in this callback.
    public virtual void GetResourceResponseFilter(IFBroSharpBrowser browser, IFBroSharpFrame frame, IFBroSharpRequest request, IFBroSharpResponse response, IFBroSharpResponseFilter set_filter)
    {
    }

    //
    // 摘要:
    //     资源加载完毕
    //
    //     Called on the IO thread when a resource load has completed. The |browser| and
    //     |frame| values represent the source of the request, and may be NULL for requests
    //     originating from service workers or CefURLRequest. |request| and |response| represent
    //     the request and response respectively and cannot be modified in this callback.
    //     |status| indicates the load completion status. |received_content_length| is the
    //     number of response bytes actually read. This method will be called for all requests,
    //     including requests that are aborted due to CEF shutdown or destruction of the
    //     associated browser. In cases where the associated browser is destroyed this callback
    //     may arrive after the CefLifeSpanHandler::OnBeforeClose callback for that browser.
    //     The CefFrame::IsValid method can be used to test for this situation, and care
    //     should be taken not to call |browser| or |frame| methods that modify state (like
    //     LoadURL, SendProcessMessage, etc.) if the frame is invalid.
    public virtual void OnResourceLoadComplete(IFBroSharpBrowser browser, IFBroSharpFrame frame, IFBroSharpRequest request, IFBroSharpResponse response, FBroUrlRequestStatus status, long received_content_length)
    {
    }

    //
    // 摘要:
    //     浏览器_处理协议请求
    //
    //     Called on the IO thread to handle requests for URLs with an unknown protocol
    //     component. The |browser| and |frame| values represent the source of the request,
    //     and may be NULL for requests originating from service workers or CefURLRequest.
    //     |request| cannot be modified in this callback. Set |allow_os_execution| to true
    //     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 virtual void OnProtocolExecution(IFBroSharpBrowser browser, IFBroSharpFrame frame, IFBroSharpRequest request, ref bool allow_os_execution)
    {
    }

    //
    // 摘要:
    //     浏览器_载入状态被改变
    //
    //     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 virtual void OnLoadingStateChange(IFBroSharpBrowser browser, bool isLoading, bool canGoBack, bool canGoForward)
    {
    }

    //
    // 摘要:
    //     浏览器_载入开始
    //
    //     Called after a navigation has been committed and before the browser begins loading
    //     contents in the frame. The |frame| value will never be empty -- call the IsMain()
    //     method to check if this frame is the main frame. |transition_type| 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 method
    //     will not be called for same page navigations (fragments, history state, etc.)
    //     or for navigations that fail or are canceled before commit. For notification
    //     of overall browser load status use OnLoadingStateChange instead.
    public virtual void OnLoadStart(IFBroSharpBrowser browser, IFBroSharpFrame frame, FBroSharpTransitionType transition_type)
    {
    }

    //
    // 摘要:
    //     浏览器_载入结束
    //
    //     Called when the browser is done loading a frame. The |frame| value will never
    //     be empty -- call the IsMain() method 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 method will not be called for
    //     same page navigations (fragments, history state, etc.) or for navigations that
    //     fail or are canceled before commit. For notification of overall browser load
    //     status use OnLoadingStateChange instead.
    public virtual void OnLoadEnd(IFBroSharpBrowser browser, IFBroSharpFrame frame, int httpStatusCode)
    {
    }

    //
    // 摘要:
    //     浏览器_载入错误
    //
    //     Called when a navigation fails or is canceled. This method may be called by itself
    //     if before commit or in combination with OnLoadStart/OnLoadEnd if after commit.
    //     |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 virtual void OnLoadError(IFBroSharpBrowser browser, IFBroSharpFrame frame, int errorCode, string errorText, string failedUrl)
    {
    }

    //
    // 摘要:
    //     浏览器_即将打开菜单
    //
    //     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 virtual void OnBeforeContextMenu(IFBroSharpBrowser browser, IFBroSharpFrame frame, IFBroSharpContextMenuParams menu_params, IFBroSharpMenuModel model)
    {
    }

    //
    // 摘要:
    //     浏览器_菜单被调用
    //
    //     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 and execute |callback|
    //     either synchronously or asynchronously with the selected command ID. For default
    //     display return false. Do not keep references to |params| or |model| outside of
    //     this callback.
    public virtual bool RunContextMenu(IFBroSharpBrowser browser, IFBroSharpFrame frame, IFBroSharpContextMenuParams menu_params, IFBroSharpMenuModel model, IFBroSharpRunContextMenuCallback callback)
    {
        callback.Dispose();
        return false;
    }

    //
    // 摘要:
    //     浏览器_菜单被点击
    //
    //     Called to execute a command selected from the context menu. Return true if the
    //     command was handled or false for the default implementation. See cef_menu_id_t
    //     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 OnBeforeContextMenu(). Do not keep
    //     a reference to |params| outside of this callback.
    public virtual bool OnContextMenuCommand(IFBroSharpBrowser browser, IFBroSharpFrame frame, IFBroSharpContextMenuParams menu_params, int command_id, FBroSharpEventFlags event_flags)
    {
        return false;
    }

    //
    // 摘要:
    //     浏览器_菜单被关闭
    //
    //     Called when the context menu is dismissed irregardless of whether the menu was
    //     canceled or a command was selected.
    public virtual void OnContextMenuDismissed(IFBroSharpBrowser browser, IFBroSharpFrame frame)
    {
    }

    //
    // 摘要:
    //     浏览器_即将运行快捷菜单
    //
    //     Called to allow custom display of the quick menu for a windowless browser. |location|
    //     is the top left corner of the selected region. |size| is the size of the selected
    //     region. |edit_state_flags| is a combination of flags that represent the state
    //     of the quick menu. Return true if the menu will be handled and execute |callback|
    //     either synchronously or asynchronously with the selected command ID. Return false
    //     to cancel the menu.
    public virtual bool RunQuickMenu(IFBroSharpBrowser browser, IFBroSharpFrame frame, FBroSharpElementAt location, FBroSharpElementAt size, int edit_state_flags, IFBroSharpRunQuickMenuCallback callback)
    {
        callback.Dispose();
        return false;
    }

    //
    // 摘要:
    //     浏览器_即将运行快捷菜单命令
    //
    //     Called to execute a command selected from the quick menu for a windowless browser.
    //     Return true if the command was handled or false for the default implementation.
    //     See cef_menu_id_t for command IDs that have default implementations.
    public virtual bool OnQuickMenuCommand(IFBroSharpBrowser browser, IFBroSharpFrame frame, int command_id, int event_flags)
    {
        return false;
    }

    //
    // 摘要:
    //     浏览器_即将取消快捷菜单
    //
    //     Called when the quick menu for a windowless browser is dismissed irregardless
    //     of whether the menu was canceled or a command was selected.
    public virtual void OnQuickMenuDismissed(IFBroSharpBrowser browser, IFBroSharpFrame frame)
    {
    }

    //
    // 摘要:
    //     浏览器_可下载
    //
    //     Called before a download begins in response to a user-initiated action (e.g.
    //     alt + link click or link click that returns a `Content-Disposition: attachment`
    //     response from the server). |url| is the target download URL and |request_method|
    //     is the target method (GET, POST, etc). Return true to proceed with the download
    //     or false to cancel the download.
    public virtual bool CanDownload(IFBroSharpBrowser browser, string url, string request_method)
    {
        return true;
    }

    //
    // 摘要:
    //     浏览器_即将下载
    //
    //     Called before a download begins. |suggested_name| is the suggested name for the
    //     download file. By default the download will be canceled. Execute |callback| either
    //     asynchronously or in this method to continue the download if desired. Do not
    //     keep a reference to |download_item| outside of this method.
    public virtual void OnBeforeDownload(IFBroSharpBrowser browser, IFBroSharpDownloadItem download_item, string suggested_name, IFBroSharpBeforeDownloadCallback callback)
    {
        callback.Dispose();
    }

    //
    // 摘要:
    //     浏览器_正在下载
    //
    //     Called when a download's status or progress information has been updated. This
    //     may be called multiple times before and after OnBeforeDownload(). Execute |callback|
    //     either asynchronously or in this method to cancel the download if desired. Do
    //     not keep a reference to |download_item| outside of this method.
    public virtual void OnDownloadUpdated(IFBroSharpBrowser browser, IFBroSharpDownloadItem download_item, IFBroSharpDownloadItemCallback callback)
    {
        callback.Dispose();
    }

    //
    // 摘要:
    //     浏览器_按下某键
    //
    //     Called before a keyboard event is sent to the renderer. |event| contains information
    //     about the keyboard event. |os_event| is the operating system event message, if
    //     any. Return true if the event was handled or false otherwise. If the event will
    //     be handled in OnKeyEvent() as a keyboard shortcut set |is_keyboard_shortcut|
    //     to true and return false.
    public virtual bool OnPreKeyEvent(IFBroSharpBrowser browser, FBroSharpKeyEvent key_event, FBroSharpOSEvent os_event, ref bool is_keyboard_shortcut)
    {
        return false;
    }

    //
    // 摘要:
    //     浏览器_按下某键后
    //
    //     Called after the renderer and JavaScript in the page has had a chance to handle
    //     the event. |event| contains information about the keyboard event. |os_event|
    //     is the operating system event message, if any. Return true if the keyboard event
    //     was handled or false otherwise.
    public virtual bool OnKeyEvent(IFBroSharpBrowser browser, FBroSharpKeyEvent key_event, FBroSharpOSEvent os_event)
    {
        return false;
    }

    //
    // 摘要:
    //     浏览器_即将打开对话框
    //
    //     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 empty to show
    //     the default title ("Open" or "Save" depending on the mode). |default_file_path|
    //     is the path with optional directory and/or file name component that should be
    //     initially selected in the dialog. |accept_filters| 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"). To display a custom dialog return true and execute
    //     |callback| either inline or at a later time. To display the default dialog return
    //     false.
    public virtual bool OnFileDialog(IFBroSharpBrowser browser, FBroSharpFileDialogModeType mode, string title, string default_file_path, out List<string> accept_filters, IFBroSharpFileDialogEventCallback callback)
    {
        callback.Dispose();
        accept_filters = null;
        return false;
    }

    //
    // 摘要:
    //     浏览器_JS即将打开对话框
    //
    //     Called to run a JavaScript dialog. If |origin_url| is non-empty it can be passed
    //     to the CefFormatUrlForSecurityDisplay function to retrieve a secure and user-friendly
    //     display string. The |default_prompt_text| value will be specified for prompt
    //     dialogs only. Set |suppress_message| to true and return false 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 |suppress_message| to false and return false 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 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 virtual bool OnJSDialog(IFBroSharpBrowser browser, string origin_url, FBroJsDialogType dialog_type, string message_text, string default_prompt_text, IFBroSharpJSDialogCallback callback, ref bool suppress_message)
    {
        callback.Dispose();
        return false;
    }

    //
    // 摘要:
    //     浏览器_JS即将打开离开对话框
    //
    //     Called to run a dialog asking the user if they want to leave a page. Return false
    //     to use the default dialog implementation. Return true 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 virtual bool OnBeforeUnloadDialog(IFBroSharpBrowser browser, string message_text, bool is_reload, IFBroSharpJSDialogCallback callback)
    {
        callback.Dispose();
        return false;
    }

    //
    // 摘要:
    //     浏览器_JS重置对话框
    //
    //     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 virtual void OnResetDialogState(IFBroSharpBrowser browser)
    {
    }

    //
    // 摘要:
    //     浏览器_JS对话框关闭
    //
    //     Called when the dialog is closed.
    public virtual void OnDialogClosed(IFBroSharpBrowser browser)
    {
    }

    //
    // 摘要:
    //     浏览器_即将失去焦点
    //
    //     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 if the browser is giving focus to the next component and false if the browser
    //     is giving focus to the previous component.
    public virtual void OnTakeFocus(IFBroSharpBrowser browser, bool next)
    {
    }

    //
    // 摘要:
    //     浏览器_请求焦点
    //
    //     Called when the browser component is requesting focus. |source| indicates where
    //     the focus request is originating from. Return false to allow the focus to be
    //     set or true to cancel setting the focus.
    public virtual bool OnSetFocus(IFBroSharpBrowser browser, FBroFocusSourceType source)
    {
        return false;
    }

    //
    // 摘要:
    //     浏览器_收到焦点
    //
    //     Called when the browser component has received focus.
    public virtual void OnGotFocus(IFBroSharpBrowser browser)
    {
    }

    //
    // 摘要:
    //     浏览器_查找返馈
    //
    //     Called to report find results returned by CefBrowserHost::Find(). |identifer|
    //     is a unique incremental identifier for the currently active search, |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 if this is
    //     the last find notification.
    public virtual void OnFindResult(IFBroSharpBrowser browser, int identifier, int count, FBroSharpRect selectionRect, int activeMatchOrdinal, bool finalUpdate)
    {
    }

    //
    // 摘要:
    //     浏览器_拖拽进入
    //
    //     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 for default drag handling behavior or true to cancel the drag event.
    public virtual bool OnDragEnter(IFBroSharpBrowser browser, IFBroSharpDragData dragData, FBroSharpDragOperationsMaskType mask)
    {
        return false;
    }

    //
    // 摘要:
    //     浏览器_拖拽区域改变
    //
    //     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 method will also never be called.
    //     If the last draggable region is removed from a document this method will be called
    //     with an empty vector.
    public virtual void OnDraggableRegionsChanged(IFBroSharpBrowser browser, IFBroSharpFrame frame, List<FBroSharpDraggableRegion> regions)
    {
    }

    //
    // 摘要:
    //     进程间消息_收到渲染进程消息
    //
    //     扩展功能,非CEF自带消息,在渲染进程中调用“FBroSharpBrowser”类中的“GetOwnProcessMessageControl”方法获取到
    //     “FBroSharpOwnProcessMessageControl”后调用ClientSendByBrowser发送进程间消息后在主进程触发本事件.
    //
    //     在主进程中执行,实现进程间通信,需在初始化设置中设置“enableprocessmessage”启用进程间消息后才能使用
    public virtual void ReceiveRenderProcessMessage(IFBroSharpBrowser browser, long processid, string name, byte[] message)
    {
    }

    //
    // 摘要:
    //     浏览器_获取音频参数
    //
    //     Called on the UI thread to allow configuration of audio stream parameters. Return
    //     true to proceed with audio stream capture, or false to cancel it. All members
    //     of |params| can optionally be configured here, but they are also pre-filled with
    //     some sensible defaults.
    public virtual bool GetAudioParameters(IFBroSharpBrowser browser, ref FBroSharpAudioParametersType audio_params)
    {
        return false;
    }

    //
    // 摘要:
    //     浏览器_即将启动音频流
    //
    //     Called on a browser audio capture thread when the browser starts streaming audio.
    //     OnAudioStreamStopped will always be called after OnAudioStreamStarted; both methods
    //     may be called multiple times for the same browser. |params| contains the audio
    //     parameters like sample rate and channel layout. |channels| is the number of channels.
    public virtual void OnAudioStreamStarted(IFBroSharpBrowser browser, FBroSharpAudioParametersType audio_params, int channels)
    {
    }

    //
    // 摘要:
    //     浏览器_收到音频流包
    //
    //     Called on the audio stream thread when a PCM packet is received for the stream.
    //     |data| is an array representing the raw PCM data as a floating point type, i.e.
    //     4-byte value(s). |frames| is the number of frames in the PCM packet. |pts| is
    //     the presentation timestamp (in milliseconds since the Unix Epoch) and represents
    //     the time at which the decompressed packet should be presented to the user. Based
    //     on |frames| and the |channel_layout| value passed to OnAudioStreamStarted you
    //     can calculate the size of the |data| array in bytes.
    public virtual void OnAudioStreamPacket(IFBroSharpBrowser browser, IntPtr data, int frames, long pts)
    {
    }

    //
    // 摘要:
    //     浏览器_即将结束音频流
    //
    //     Called on the UI thread when the stream has stopped. OnAudioSteamStopped will
    //     always be called after OnAudioStreamStarted; both methods may be called multiple
    //     times for the same stream.
    public virtual void OnAudioStreamStopped(IFBroSharpBrowser browser)
    {
    }

    //
    // 摘要:
    //     浏览器_音频流出现错误
    //
    //     Called on the UI or audio stream thread when an error occurred. During the stream
    //     creation phase this callback will be called on the UI thread while in the capturing
    //     phase it will be called on the audio stream thread. The stream will be stopped
    //     immediately.
    public virtual void OnAudioStreamError(IFBroSharpBrowser browser, string message)
    {
    }

    //
    // 摘要:
    //     浏览器_即将执行Chrome命令
    //
    //     Called to execute a Chrome command triggered via menu selection or keyboard shortcut.
    //     Values for |command_id| can be found in the cef_command_ids.h file. |disposition|
    //     provides information about the intended command target. Return true if the command
    //     was handled or false for the default implementation. For context menu commands
    //     this will be called after CefContextMenuHandler::OnContextMenuCommand. Only used
    //     with the Chrome runtime.
    public virtual bool OnChromeCommand(IFBroSharpBrowser browser, int command_id, FBroSharpWindowOpenDisposition disposition)
    {
        return false;
    }

    //
    // 摘要:
    //     浏览器_即将创建框架
    //
    //     Called when a new frame is created. This will be the first notification that
    //     references |frame|. Any commands that require transport to the associated renderer
    //     process (LoadRequest, SendProcessMessage, GetSource, etc.) will be queued until
    //     OnFrameAttached is called for |frame|.
    public virtual void OnFrameCreated(IFBroSharpBrowser browser, IFBroSharpFrame frame)
    {
    }

    //
    // 摘要:
    //     浏览器_即将连接框架
    //
    //     Called when a frame can begin routing commands to/from the associated renderer
    //     process. |reattached| will be true if the frame was re-attached after exiting
    //     the BackForwardCache. Any commands that were queued have now been dispatched.
    public virtual void OnFrameAttached(IFBroSharpBrowser browser, IFBroSharpFrame frame, bool reattached)
    {
    }

    //
    // 摘要:
    //     浏览器_即将拆离框架
    //
    //     Called when a frame loses its connection to the renderer process and will be
    //     destroyed. Any pending or future commands will be discarded and CefFrame::IsValid()
    //     will now return false for |frame|. If called after CefLifeSpanHandler::OnBeforeClose()
    //     during browser destruction then CefBrowser::IsValid() will return false for |browser|.
    public virtual void OnFrameDetached(IFBroSharpBrowser browser, IFBroSharpFrame frame)
    {
    }

    //
    // 摘要:
    //     浏览器_即将改变主框架
    //
    //     Called when the main frame changes due to (a) initial browser creation, (b) final
    //     browser destruction, (c) cross-origin navigation or (d) re-navigation after renderer
    //     process termination (due to crashes, etc). |old_frame| will be NULL and |new_frame|
    //     will be non-NULL when a main frame is assigned to |browser| for the first time.
    //     |old_frame| will be non-NULL and |new_frame| will be NULL and when a main frame
    //     is removed from |browser| for the last time. Both |old_frame| and |new_frame|
    //     will be non-NULL for cross-origin navigations or re-navigation after renderer
    //     process termination. This method will be called after OnFrameCreated() for |new_frame|
    //     and/or after OnFrameDetached() for |old_frame|. If called after CefLifeSpanHandler::OnBeforeClose()
    //     during browser destruction then CefBrowser::IsValid() will return false for |browser|.
    public virtual void OnMainFrameChanged(IFBroSharpBrowser browser, IFBroSharpFrame old_frame, IFBroSharpFrame new_frame)
    {
    }

    //
    // 摘要:
    //     浏览器_即将请求媒体访问许可
    //
    //     Called when a page requests permission to access media. |requesting_origin| is
    //     the URL origin requesting permission. |requested_permissions| is a combination
    //     of values from cef_media_access_permission_types_t that represent the requested
    //     permissions. Return true and call CefMediaAccessCallback methods either in this
    //     method or at a later time to continue or cancel the request. Return false to
    //     proceed with default handling. With the Chrome runtime, default handling will
    //     display the permission request UI. With the Alloy runtime, default handling will
    //     deny the request. This method will not be called if the "--enable-media-stream"
    //     command-line switch is used to grant all permissions.
    public virtual bool OnRequestMediaAccessPermission(IFBroSharpBrowser browser, IFBroSharpFrame frame, string requesting_origin, uint requested_permissions, IFBroSharpMediaAccessCallback callback)
    {
        callback.Dispose();
        return false;
    }

    //
    // 摘要:
    //     浏览器_即将显示许可提示
    //
    //     Called when a page should show a permission prompt. |prompt_id| uniquely identifies
    //     the prompt. |requesting_origin| is the URL origin requesting permission. |requested_permissions|
    //     is a combination of values from cef_permission_request_types_t that represent
    //     the requested permissions. Return true and call CefPermissionPromptCallback::Continue
    //     either in this method or at a later time to continue or cancel the request. Return
    //     false to proceed with default handling. With the Chrome runtime, default handling
    //     will display the permission prompt UI. With the Alloy runtime, default handling
    //     is CEF_PERMISSION_RESULT_IGNORE.
    public virtual bool OnShowPermissionPrompt(IFBroSharpBrowser browser, ulong prompt_id, string requesting_origin, uint requested_permissions, IFBroSharpPermissionPromptCallback callback)
    {
        callback.Dispose();
        return false;
    }

    //
    // 摘要:
    //     浏览器_即将关闭许可提示
    //
    //     Called when a permission prompt handled via OnShowPermissionPrompt is dismissed.
    //     |prompt_id| will match the value that was passed to OnShowPermissionPrompt. |result|
    //     will be the value passed to CefPermissionPromptCallback::Continue or CEF_PERMISSION_RESULT_IGNORE
    //     if the dialog was dismissed for other reasons such as navigation, browser closure,
    //     etc. This method will not be called if OnShowPermissionPrompt returned false
    //     for |prompt_id|.
    public virtual void OnDismissPermissionPrompt(IFBroSharpBrowser browser, ulong prompt_id, FBroSharpPermissionRequestResultType result)
    {
    }

    //
    // 摘要:
    //     离屏渲染_获取根屏幕矩形
    //
    //     Called to retrieve the root window rectangle in screen DIP coordinates. Return
    //     true if the rectangle was provided. If this method returns false the rectangle
    //     from GetViewRect will be used.
    public virtual bool GetRootScreenRect(IFBroSharpBrowser browser, ref FBroSharpRect rect)
    {
        return false;
    }

    //
    // 摘要:
    //     离屏渲染_获取视图矩形
    //
    //     Called to retrieve the view rectangle in screen DIP coordinates. This method
    //     must always provide a non-empty rectangle.
    public virtual void GetViewRect(IFBroSharpBrowser browser, ref FBroSharpRect rect)
    {
    }

    //
    // 摘要:
    //     离屏渲染_获取屏幕点
    //
    //     Called to retrieve the translation from view DIP coordinates to screen coordinates.
    //     Windows/Linux should provide screen device (pixel) coordinates and MacOS should
    //     provide screen DIP coordinates. Return true if the requested coordinates were
    //     provided.
    public virtual bool GetScreenPoint(IFBroSharpBrowser browser, int viewX, int viewY, ref int screenX, ref int screenY)
    {
        return false;
    }

    //
    // 摘要:
    //     离屏渲染_获取窗口信息
    //
    //     Called to allow the client to fill in the CefScreenInfo object with appropriate
    //     values. Return true if the |screen_info| structure has been modified.
    //
    //     If the screen info rectangle is left empty the rectangle from GetViewRect will
    //     be used. If the rectangle is still empty or invalid popups may not be drawn correctly.
    public virtual bool GetScreenInfo(IFBroSharpBrowser browser, ref FBroSharpScreenInfo screen_info)
    {
        return false;
    }

    //
    // 摘要:
    //     离屏渲染_即将显示弹窗
    //
    //     Called when the browser wants to show or hide the popup widget. The popup should
    //     be shown if |show| is true and hidden if |show| is false.
    public virtual void OnPopupShow(IFBroSharpBrowser browser, bool show)
    {
    }

    //
    // 摘要:
    //     离屏渲染_移动调整弹窗
    //
    //     Called when the browser wants to move or resize the popup widget. |rect| contains
    //     the new location and size in view coordinates.
    public virtual void OnPopupSize(IFBroSharpBrowser browser, FBroSharpRect rect)
    {
    }

    //
    // 摘要:
    //     离屏渲染_将被绘制
    //
    //     Called when an element should be painted. Pixel values passed to this method
    //     are scaled relative to view coordinates based on the value of CefScreenInfo.device_scale_factor
    //     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. This method is only called when CefWindowInfo::shared_texture_enabled
    //     is set to false.
    public virtual void OnPaint(IFBroSharpBrowser browser, FBroSharpPaintElementType type, List<FBroSharpRect> dirtyRects, IntPtr buffer, int width, int height)
    {
    }

    //
    // 摘要:
    //     离屏渲染_将被加速绘制
    //
    //     Called when an element has been rendered to the shared texture handle. |type|
    //     indicates whether the element is the view or the popup widget. |dirtyRects| contains
    //     the set of rectangles in pixel coordinates that need to be repainted. |shared_handle|
    //     is the handle for a D3D11 Texture2D that can be accessed via ID3D11Device using
    //     the OpenSharedResource method. This method is only called when CefWindowInfo::shared_texture_enabled
    //     is set to true, and is currently only supported on Windows.
    public virtual void OnAcceleratedPaint(IFBroSharpBrowser browser, FBroSharpPaintElementType type, List<FBroSharpRect> dirtyRects, IntPtr shared_handle)
    {
    }

    //
    // 摘要:
    //     离屏渲染_开始拖拽
    //
    //     Called when the user starts dragging content in the web view. Contextual information
    //     about the dragged content is supplied by |drag_data|. (|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 to abort the drag operation. Don't call any of CefBrowserHost::DragSource*Ended*
    //     methods after returning false.
    //
    //     Return true to handle the drag operation. Call CefBrowserHost::DragSourceEndedAt
    //     and DragSourceSystemDragEnded either synchronously or asynchronously to inform
    //     the web view that the drag operation has ended.
    public virtual bool StartDragging(IFBroSharpBrowser browser, IFBroSharpDragData drag_data, FBroSharpDragOperationsMask allowed_ops, int x, int y)
    {
        return false;
    }

    //
    // 摘要:
    //     离屏渲染_更新拖动光标
    //
    //     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 virtual void UpdateDragCursor(IFBroSharpBrowser browser, FBroSharpDragOperationsMask operation)
    {
    }

    //
    // 摘要:
    //     离屏渲染_滚动偏移量改变
    //
    //     Called when the scroll offset has changed.
    public virtual void OnScrollOffsetChanged(IFBroSharpBrowser browser, double x, double y)
    {
    }

    //
    // 摘要:
    //     离屏渲染_IME范围改变
    //
    //     Called when the IME composition range has changed. |selected_range| is the range
    //     of characters that have been selected. |character_bounds| is the bounds of each
    //     character in view coordinates.
    public virtual void OnImeCompositionRangeChanged(IFBroSharpBrowser browser, FBroSharpRange selected_range, List<FBroSharpRect> character_bounds)
    {
    }

    //
    // 摘要:
    //     离屏渲染_文本选择改变
    //
    //     Called when text selection has changed for the specified |browser|. |selected_text|
    //     is the currently selected text and |selected_range| is the character range.
    public virtual void OnTextSelectionChanged(IFBroSharpBrowser browser, string selected_text, FBroSharpRange selected_range)
    {
    }

    //
    // 摘要:
    //     离屏渲染_虚拟键盘请求
    //
    //     Called when an on-screen keyboard should be shown or hidden for the specified
    //     |browser|. |input_mode| specifies what kind of keyboard should be opened. If
    //     |input_mode| is CEF_TEXT_INPUT_MODE_NONE, any existing keyboard for this browser
    //     should be hidden.
    public virtual void OnVirtualKeyboardRequested(IFBroSharpBrowser browser, FBroSharpTextInputMode input_mode)
    {
    }
}
#if false // 反编译日志
缓存中的 14 
------------------
解析: "mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
找到单个程序集: "mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
从以下位置加载: "C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.8\mscorlib.dll"
------------------
解析: "System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
找到单个程序集: "System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
从以下位置加载: "C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.8\System.dll"
#endif

如果文档对您有帮助,欢迎 请喝咖啡 ☕ | 软件发布 | 源码购买