Class CefLifeSpanHandlerAdapter

  • All Implemented Interfaces:
    CefLifeSpanHandler

    public abstract class CefLifeSpanHandlerAdapter
    extends java.lang.Object
    implements CefLifeSpanHandler
    An abstract adapter class for receiving life span events. The methods in this class are empty. This class exists as convenience for creating handler objects.
    • Constructor Detail

      • CefLifeSpanHandlerAdapter

        public CefLifeSpanHandlerAdapter()
    • Method Detail

      • onBeforePopup

        public boolean onBeforePopup​(CefBrowser browser,
                                     CefFrame frame,
                                     java.lang.String target_url,
                                     java.lang.String target_frame_name)
        Description copied from interface: CefLifeSpanHandler
        Called on the IO thread before a new popup window is created.
        Specified by:
        onBeforePopup in interface CefLifeSpanHandler
        Parameters:
        browser - The source of the popup request.
        frame - The source of the popup request. Instance only valid within the scope of this method.
        target_url - May be empty if none is specified with the request.
        target_frame_name - May be empty if none is specified with the request.
        Returns:
        True to cancel creation of the popup window or false to proceed.
      • doClose

        public boolean doClose​(CefBrowser browser)
        Description copied from interface: CefLifeSpanHandler
        Called when a browser has received a request to close. If CEF created an OS window for the browser returning false will send an OS close notification to the browser window's top-level owner (e.g. WM_CLOSE on Windows, performClose: on OS-X and "delete_event" on Linux). If no OS window exists (window rendering disabled) returning false will cause the browser object to be destroyed immediately. Return true if the browser is parented to another window and that other window needs to receive close notification via some non-standard technique.
        Specified by:
        doClose in interface CefLifeSpanHandler
        Parameters:
        browser - The browser generating the event.
        Returns:
        False to send an OS close notification to the browser window's top-level owner.
      • onBeforeClose

        public void onBeforeClose​(CefBrowser browser)
        Description copied from interface: CefLifeSpanHandler
        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 after this callback returns. If this is a modal window and a custom modal loop implementation was provided in runModal() this callback should be used to exit the custom modal loop. See doClose() documentation for additional usage information.
        Specified by:
        onBeforeClose in interface CefLifeSpanHandler
        Parameters:
        browser - The browser generating the event.