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 boolean
doClose(CefBrowser browser)
Called when a browser has received a request to close.void
onAfterCreated(CefBrowser browser)
Handle creation of a new browser window.void
onAfterParentChanged(CefBrowser browser)
Called after a browser's native parent window has changed.void
onBeforeClose(CefBrowser browser)
Called just before a browser is destroyed.boolean
onBeforePopup(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:CefLifeSpanHandler
Called on the IO thread before a new popup window is created.- Specified by:
onBeforePopup
in 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:CefLifeSpanHandler
Handle creation of a new browser window.- Specified by:
onAfterCreated
in interfaceCefLifeSpanHandler
- Parameters:
browser
- The browser generating the event.
-
onAfterParentChanged
public void onAfterParentChanged(CefBrowser browser)
Description copied from interface:CefLifeSpanHandler
Called after a browser's native parent window has changed.- Specified by:
onAfterParentChanged
in interfaceCefLifeSpanHandler
- Parameters:
browser
- The browser generating the event.
-
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 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: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 interfaceCefLifeSpanHandler
- Parameters:
browser
- The browser generating the event.
-
-