Package org.cef.handler
Class CefLifeSpanHandlerAdapter
- java.lang.Object
-
- org.cef.handler.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 Summary
Constructors Constructor Description CefLifeSpanHandlerAdapter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleandoClose(CefBrowser browser)Called when a browser has received a request to close.voidonAfterCreated(CefBrowser browser)Handle creation of a new browser window.voidonAfterParentChanged(CefBrowser browser)Called after a browser's native parent window has changed.voidonBeforeClose(CefBrowser browser)Called just before a browser is destroyed.booleanonBeforePopup(CefBrowser browser, CefFrame frame, java.lang.String target_url, java.lang.String target_frame_name)Called on the IO thread before a new popup window is created.
-
-
-
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:CefLifeSpanHandlerCalled on the IO thread before a new popup window is created.- Specified by:
onBeforePopupin interfaceCefLifeSpanHandler- 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.
-
onAfterCreated
public void onAfterCreated(CefBrowser browser)
Description copied from interface:CefLifeSpanHandlerHandle creation of a new browser window.- Specified by:
onAfterCreatedin interfaceCefLifeSpanHandler- Parameters:
browser- The browser generating the event.
-
onAfterParentChanged
public void onAfterParentChanged(CefBrowser browser)
Description copied from interface:CefLifeSpanHandlerCalled after a browser's native parent window has changed.- Specified by:
onAfterParentChangedin interfaceCefLifeSpanHandler- Parameters:
browser- The browser generating the event.
-
doClose
public boolean doClose(CefBrowser browser)
Description copied from interface:CefLifeSpanHandlerCalled 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:
doClosein interfaceCefLifeSpanHandler- 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:CefLifeSpanHandlerCalled 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:
onBeforeClosein interfaceCefLifeSpanHandler- Parameters:
browser- The browser generating the event.
-
-