/// <summary>
 /// Called when a frame&apos;s address has changed.
 /// </summary>
 public unsafe virtual void OnAddressChange(CefBrowser browser, CefFrame frame, string url)
 {
 }
Exemple #2
0
 /// <summary>
 /// Called after a navigation has been committed and before the browser begins
 /// loading contents in the frame. The |frame| value will never be NULL -- call
 /// the is_main() function 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 function 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.
 /// </summary>
 protected internal unsafe virtual void OnLoadStart(CefBrowser browser, CefFrame frame, CefTransitionType transitionType)
 {
 }
Exemple #3
0
 /// <summary>
 /// 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 NULL 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 (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 |no_javascript_access| 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&apos;s values. If the |no_javascript_access| 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 cef_browser_view_t. 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
 /// cef_render_process_handler_t::on_browser_created() in the render process.
 /// </summary>
 protected internal unsafe virtual bool OnBeforePopup(CefBrowser browser, CefFrame frame, string targetUrl, string targetFrameName, CefWindowOpenDisposition targetDisposition, bool userGesture, CefPopupFeatures popupFeatures, CefWindowInfo windowInfo, ref CefClient client, CefBrowserSettings settings, ref CefDictionaryValue extraInfo, ref int noJavascriptAccess)
 {
     return(default);
Exemple #4
0
 /// <summary>
 /// 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 cef_urlrequest_t). The |request| object
 /// passed to this function cannot be modified.
 /// </summary>
 protected internal unsafe virtual CefResourceHandler Create(CefBrowser browser, CefFrame frame, string schemeName, CefRequest request)
 {
     return(default);
Exemple #5
0
 /// <summary>
 /// 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.
 /// </summary>
 protected internal unsafe virtual void OnBeforeContextMenu(CefBrowser browser, CefFrame frame, CefContextMenuParams @params, CefMenuModel model)
 {
 }
Exemple #6
0
        private static unsafe void OnBeforeContextMenuImpl(cef_context_menu_handler_t *self, cef_browser_t *browser, cef_frame_t *frame, cef_context_menu_params_t * @params, cef_menu_model_t *model)
        {
            var instance = GetInstance((IntPtr)self) as CefContextMenuHandler;

            if (instance == null || ((ICefContextMenuHandlerPrivate)instance).AvoidOnBeforeContextMenu())
            {
                ReleaseIfNonNull((cef_base_ref_counted_t *)browser);
                ReleaseIfNonNull((cef_base_ref_counted_t *)frame);
                ReleaseIfNonNull((cef_base_ref_counted_t *)@params);
                ReleaseIfNonNull((cef_base_ref_counted_t *)model);
                return;
            }
            instance.OnBeforeContextMenu(CefBrowser.Wrap(CefBrowser.Create, browser), CefFrame.Wrap(CefFrame.Create, frame), CefContextMenuParams.Wrap(CefContextMenuParams.Create, @params), CefMenuModel.Wrap(CefMenuModel.Create, model));
        }
Exemple #7
0
 /// <summary>
 /// 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.
 /// cef_load_handler_t::OnLoadingStateChange will be called twice in all cases.
 /// If the navigation is allowed cef_load_handler_t::OnLoadStart and
 /// cef_load_handler_t::OnLoadEnd will be called. If the navigation is canceled
 /// cef_load_handler_t::OnLoadError will be called with an |errorCode| value of
 /// ERR_ABORTED. The |user_gesture| 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).
 /// </summary>
 protected internal unsafe virtual bool OnBeforeBrowse(CefBrowser browser, CefFrame frame, CefRequest request, bool userGesture, bool isRedirect)
 {
     return(default);
 public AddressChangeEventArgs(CefFrame frame, string url)
     : base(frame, url)
 {
 }
Exemple #9
0
 protected internal virtual void OnFocusedNodeChanged(CefBrowser browser, CefFrame frame, CefDOMNode node)
 {
 }
Exemple #10
0
 /// <summary>
 /// Called on the IO thread before a resource request is sent. The |browser|
 /// and |frame| values represent the source of the request, and may be NULL for
 /// requests originating from service workers or cef_urlrequest_t. |request|
 /// cannot be modified in this callback. Return true (1) if the specified
 /// cookie can be sent with the request or false (0) otherwise.
 /// </summary>
 public unsafe virtual bool CanSendCookie(CefBrowser browser, CefFrame frame, CefRequest request, CefCookie cookie)
 {
     return(default);
Exemple #11
0
 protected internal virtual void OnContextReleased(CefBrowser browser, CefFrame frame, CefV8Context context)
 {
     XrayObject.OnContextReleased(context);
 }
Exemple #12
0
 /// <summary>
 /// 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 cef_urlrequest_t. To
 /// optionally filter cookies for the request return a
 /// cef_cookie_access_filter_t object. The |request| object cannot not be
 /// modified in this callback.
 /// </summary>
 public unsafe virtual CefCookieAccessFilter GetCookieAccessFilter(CefBrowser browser, CefFrame frame, CefRequest request)
 {
     return(default);
 /// <summary>
 /// Called on the IO thread before a resource request is sent. The |browser|
 /// and |frame| values represent the source of the request, and may be NULL for
 /// requests originating from service workers or cef_urlrequest_t. |request|
 /// cannot be modified in this callback. Return true (1) if the specified
 /// cookie can be sent with the request or false (0) otherwise.
 /// </summary>
 protected internal unsafe virtual bool CanSendCookie(CefBrowser browser, CefFrame frame, CefRequest request, CefCookie cookie)
 {
     return(default);
Exemple #14
0
 /// <summary>
 /// 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 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.
 /// </summary>
 protected internal unsafe virtual void OnLoadEnd(CefBrowser browser, CefFrame frame, int httpStatusCode)
 {
 }
Exemple #15
0
 /// <summary>
 /// 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.
 /// </summary>
 protected internal unsafe virtual bool RunContextMenu(CefBrowser browser, CefFrame frame, CefContextMenuParams @params, CefMenuModel model, CefRunContextMenuCallback callback)
 {
     return(default);
Exemple #16
0
 /// <summary>
 /// Called when a navigation fails or is canceled. This function 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.
 /// </summary>
 protected internal unsafe virtual void OnLoadError(CefBrowser browser, CefFrame frame, CefErrorCode errorCode, string errorText, string failedUrl)
 {
 }
Exemple #17
0
 /// <summary>
 /// Called when a frame&apos;s address has changed.
 /// </summary>
 protected internal unsafe virtual void OnAddressChange(CefBrowser browser, CefFrame frame, string url)
 {
 }