/// <summary>
 /// Called before a new popup window is created.
 /// The |parentBrowser| parameter will point to the parent browser window.
 /// The |popupFeatures| parameter will contain information about the style of popup window requested.
 /// Return false to have the framework create the new popup window based on the parameters in |windowInfo|.
 /// Return true to cancel creation of the popup window.
 /// By default, a newly created popup window will have the same client and settings as the parent window.
 /// To change the client for the new window modify the object that |client| points to.
 /// To change the settings for the new window modify the |settings| structure.
 /// </summary>
 protected virtual bool OnBeforePopup(
     CefBrowser parentBrowser,
     CefPopupFeatures popupFeatures,
     CefWindowInfo windowInfo,
     string url,
     ref CefClient client,
     CefBrowserSettings settings
     )
 {
     return false;
 }
 /// <summary>
 /// Called to format print headers and footers.
 /// |printInfo| contains platform- specific information about the printer context.
 /// |url| is the URL if the currently printing page,
 /// |title| is the title of the currently printing page,
 /// |currentPage| is the current page number
 /// and |maxPages| is the total number of pages.
 /// Six default header locations are provided by the implementation: top left, top center, top right, bottom left, bottom center and bottom right.
 /// To use one of these default locations just assign a string to the appropriate variable.
 /// To draw the header and footer yourself return true.
 /// Otherwise, populate the approprate variables and return false.
 /// </summary>
 protected virtual bool GetPrintHeaderFooter(CefBrowser browser, CefFrame frame,
     CefPrintInfo printInfo, string url, string title, int currentPage, int maxPages,
     ref string topLeft, 
     ref string topCenter, 
     ref string topRight, 
     ref string bottomLeft, 
     ref string bottomCenter, 
     ref string bottomRight)
 {
     return false;
 }
 /// <summary>
 /// Called to run a JavaScript confirm request.
 /// Return false to display the default alert or true if you displayed a custom alert.
 /// If you handled the alert set |retval| to true if the user accepted the confirmation.
 /// </summary>
 protected virtual bool OnJSConfirm(CefBrowser browser, CefFrame frame, string message, out bool retval)
 {
     retval = false;
     return false;
 }
 /// <summary>
 /// Called just before a window is closed.
 /// If this is a modal window and you handled the RunModal() event you can use this callback to restore the opener window to a usable state.
 /// </summary>
 protected virtual void OnBeforeClose(CefBrowser browser)
 {
 }
예제 #5
0
 /// <summary>
 /// Called to display a console message.
 /// Return true to stop the message from being output to the console.
 /// </summary>
 protected virtual bool OnConsoleMessage(CefBrowser browser, string message, string source, int line)
 {
     return(false);
 }
예제 #6
0
 /// <summary>
 /// 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.
 /// </summary>
 protected virtual bool OnTooltip(CefBrowser browser, ref string text)
 {
     return(false);
 }
 /// <summary>
 /// Called when a window has recieved a request to close.
 /// Return false to proceed with the window close or true to cancel the window close.
 /// If this is a modal window and a custom modal loop implementation was
 /// provided in RunModal() this callback should be used to restore the
 /// opener window to a usable state.
 /// </summary>
 protected virtual bool DoClose(CefBrowser browser)
 {
     return false;
 }
 /// <summary>
 /// Called when the Favicon URL for a page changes.
 /// </summary>
 protected virtual void OnFaviconChange(CefBrowser m_browser, CefStringList m_icon_urls)
 {
 }
 /// <summary>
 /// 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.
 /// </summary>
 protected virtual bool OnTooltip(CefBrowser browser, ref string text)
 {
     return false;
 }
 /// <summary>
 /// Called for global uncaught exceptions. Execution of this callback is
 /// disabled by default. To enable set
 /// CefSettings.uncaught_exception_stack_size &gt; 0.
 /// </summary>
 protected abstract void OnUncaughtException(CefBrowser browser, CefFrame frame, CefV8Context context, CefV8Exception exception, CefV8StackTrace stackTrace);
예제 #11
0
 /// <summary>
 /// Called to enter the modal loop. Provide your own modal loop here.
 /// Return true if you ran your own modal loop and false to use the default.
 /// You can also use this event to know when a modal window is about to start.
 /// </summary>
 protected virtual bool RunModal(CefBrowser browser)
 {
     return(false);
 }
예제 #12
0
 /// <summary>
 /// Called when the page title changes.
 /// </summary>
 protected virtual void OnTitleChange(CefBrowser browser, string title)
 {
 }
 /// <summary>
 /// Called immediately before the V8 context for a frame is released. No
 /// references to the context should be kept after this function is
 /// called.
 /// </summary>
 protected abstract void OnContextReleased(CefBrowser browser, CefFrame frame, CefV8Context context);
예제 #14
0
 /// <summary>
 /// Called when the size of the content area has changed.
 /// </summary>
 protected virtual void OnContentsSizeChange(CefBrowser browser, CefFrame frame, int width, int height)
 {
 }
예제 #15
0
 /// <summary>
 /// Called when a frame's address has changed.
 /// </summary>
 protected virtual void OnAddressChange(CefBrowser browser, CefFrame frame, string url)
 {
 }
예제 #16
0
 /// <summary>
 /// Called when the navigation state has changed.
 /// </summary>
 protected virtual void OnNavStateChange(CefBrowser browser, bool canGoBack, bool canGoForward)
 {
 }
 /// <summary>
 /// Called on the UI thread before a script extension is loaded.
 /// Return false to let the extension load normally.
 /// </summary>
 protected virtual bool OnBeforeScriptExtensionLoad(CefBrowser browser, CefFrame frame, string extensionName)
 {
     return false;
 }
예제 #18
0
 /// <summary>
 /// Called when a window has recieved a request to close.
 /// Return false to proceed with the window close or true to cancel the window close.
 /// If this is a modal window and a custom modal loop implementation was
 /// provided in RunModal() this callback should be used to restore the
 /// opener window to a usable state.
 /// </summary>
 protected virtual bool DoClose(CefBrowser browser)
 {
     return(false);
 }
 /// <summary>
 /// Called to display a console message.
 /// Return true to stop the message from being output to the console.
 /// </summary>
 protected virtual bool OnConsoleMessage(CefBrowser browser, string message, string source, int line)
 {
     return false;
 }
예제 #20
0
        /// <summary>
        /// Called just before a window is closed.
        /// If this is a modal window and you handled the RunModal() event you can use this callback to restore the opener window to a usable state.
        /// </summary>
        private void on_before_close(cef_life_span_handler_t *self, cef_browser_t *browser)
        {
            ThrowIfObjectDisposed();

            this.OnBeforeClose(CefBrowser.From(browser));
        }
 /// <summary>
 /// Called when the browser receives a status message.
 /// |text| contains the text that will be displayed in the status message and |type| indicates the status message type.
 /// </summary>
 protected virtual void OnStatusMessage(CefBrowser browser, string value, CefHandlerStatusType type)
 {
 }
예제 #22
0
 /// <summary>
 /// Called just before a window is closed.
 /// If this is a modal window and you handled the RunModal() event you can use this callback to restore the opener window to a usable state.
 /// </summary>
 protected virtual void OnBeforeClose(CefBrowser browser)
 {
 }
예제 #23
0
 /// <summary>
 /// Called before a context menu is displayed.
 /// Return false to display the default context menu
 /// or true to cancel the display.
 /// </summary>
 protected virtual bool OnBeforeMenu(CefBrowser browser, CefMenuInfo menuInfo)
 {
     return false;
 }
예제 #24
0
        /// <summary>
        /// Called after a new window is created.
        /// </summary>
        private void on_after_created(cef_life_span_handler_t *self, cef_browser_t *browser)
        {
            ThrowIfObjectDisposed();

            this.OnAfterCreated(CefBrowser.From(browser));
        }
 /// <summary>
 /// Called for global uncaught exceptions. Execution of this callback is
 /// disabled by default. To enable set
 /// CefSettings.uncaught_exception_stack_size &gt; 0.
 /// </summary>
 protected abstract void OnUncaughtException(CefBrowser browser, CefFrame frame, CefV8Context context, CefV8Exception exception, CefV8StackTrace stackTrace);
 /// <summary>
 /// Called to enter the modal loop. Provide your own modal loop here.
 /// Return true if you ran your own modal loop and false to use the default.
 /// You can also use this event to know when a modal window is about to start.
 /// </summary>
 protected virtual bool RunModal(CefBrowser browser)
 {
     return false;
 }
 /// <summary>
 /// Called after a new window is created.
 /// </summary>
 protected virtual void OnAfterCreated(CefBrowser browser)
 {
 }
 protected virtual void OnRequestGeolocationPermission(CefBrowser browser, string requestingUrl, int requestId, CefGeolocationCallback callback)
 {
     callback.Continue(1);
 }
예제 #29
0
 /// <summary>
 /// Called after a new window is created.
 /// </summary>
 protected virtual void OnAfterCreated(CefBrowser browser)
 {
 }
예제 #30
0
 /// <summary>
 /// Called when the browser receives a status message.
 /// |text| contains the text that will be displayed in the status message and |type| indicates the status message type.
 /// </summary>
 protected virtual void OnStatusMessage(CefBrowser browser, string value, CefHandlerStatusType type)
 {
 }
 /// <summary>
 /// Called when a geolocation access request is canceled.
 /// |requesting_url| is the URL that originally requested permission and
 /// |request_id| is the unique ID for the permission request.
 /// </summary>
 protected virtual void OnCancelGeolocationPermission(CefBrowser browser, string requestingUrl, int requestId)
 {
 }
 protected virtual void OnRequestGeolocationPermission(CefBrowser browser, string requestingUrl, int requestId, CefGeolocationCallback callback)
 {
     callback.Continue(1);
 }
 /// <summary>
 /// Called to run a JavaScript alert message.
 /// Return false to display the default alert or true if you displayed a custom alert.
 /// </summary>
 protected virtual bool OnJSAlert(CefBrowser browser, CefFrame frame, string message)
 {
     return false;
 }
 /// <summary>
 /// Called when a geolocation access request is canceled.
 /// |requesting_url| is the URL that originally requested permission and
 /// |request_id| is the unique ID for the permission request.
 /// </summary>
 protected virtual void OnCancelGeolocationPermission(CefBrowser browser, string requestingUrl, int requestId)
 {
 }
 /// <summary>
 /// Called to run a JavaScript prompt request.
 /// Return false to display the default prompt or true if you displayed a custom prompt.
 /// If you handled the prompt set |retval| to true if the user accepted the prompt and request and |result| to the resulting value.
 /// </summary>
 protected virtual bool OnJSPrompt(CefBrowser browser, CefFrame frame, string message, string defaultValue, out bool retval, out string result)
 {
     retval = false;
     result = null;
     return false;
 }
 /// <summary>
 /// Called to retrieve the view rectangle which is relative to screen coordinates.
 /// Return true if the rectangle was provided.
 /// </summary>
 protected virtual bool GetViewRect(CefBrowser browser, out CefRect rect)
 {
     rect = new CefRect();
     return false;
 }
 /// <summary>
 /// Called when a frame's address has changed.
 /// </summary>
 protected virtual void OnAddressChange(CefBrowser browser, CefFrame frame, string url)
 {
 }
 /// <summary>
 /// Called when the browser window's cursor has changed.
 /// </summary>
 protected virtual void OnCursorChange(CefBrowser browser, IntPtr cursorHandle)
 {
 }
 /// <summary>
 /// Called when the size of the content area has changed.
 /// </summary>
 protected virtual void OnContentsSizeChange(CefBrowser browser, CefFrame frame, int width, int height)
 {
 }
 /// <summary>
 /// Called when an element should be painted.
 /// |type| indicates whether the element is the view or the popup widget.
 /// |buffer| contains the pixel data for the whole image.
 /// |dirtyRects| indicates the portions of the image that have been repainted.
 /// On Windows |buffer| will be width*height*4 bytes in size and represents a BGRA image with an upper-left origin.
 /// </summary>
 protected virtual void OnPaint(CefBrowser browser, CefPaintElementType type, CefRect[] dirtyRect, IntPtr buffer)
 {
 }
 /// <summary>
 /// Called when the navigation state has changed.
 /// </summary>
 protected virtual void OnNavStateChange(CefBrowser browser, bool canGoBack, bool canGoForward)
 {
 }
 /// <summary>
 /// 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.
 /// </summary>
 protected virtual void OnPopupShow(CefBrowser browser, bool show)
 {
 }
 /// <summary>
 /// Called when the page title changes.
 /// </summary>
 protected virtual void OnTitleChange(CefBrowser browser, string title)
 {
 }
 /// <summary>
 /// Called when the browser wants to move or resize the popup widget.
 /// |rect| contains the new location and size.
 /// </summary>
 protected virtual void OnPopupSize(CefBrowser browser, CefRect rect)
 {
 }
예제 #45
0
 /// <summary>
 /// Called to optionally override the default text for a context menu item.
 /// |label| contains the default text and may be modified to substitute alternate text.
 /// </summary>
 protected virtual void GetMenuLabel(CefBrowser browser, CefHandlerMenuId menuId, ref string label)
 {
 }
 /// <summary>
 /// Called immediately before the V8 context for a frame is released. No
 /// references to the context should be kept after this function is
 /// called.
 /// </summary>
 protected abstract void OnContextReleased(CefBrowser browser, CefFrame frame, CefV8Context context);
예제 #47
0
 /// <summary>
 /// Called when an option is selected from the default context menu.
 /// Return false to execute the default action or true to cancel the action.
 /// </summary>
 protected virtual bool OnMenuAction(CefBrowser browser, CefHandlerMenuId menuId)
 {
     return false;
 }
예제 #48
0
 /// <summary>
 /// Called when the Favicon URL for a page changes.
 /// </summary>
 protected virtual void OnFaviconChange(CefBrowser m_browser, CefStringList m_icon_urls)
 {
 }