Package org.cef.handler
Interface CefLoadHandler
-
- All Known Implementing Classes:
CefClient,CefLoadHandlerAdapter
public interface CefLoadHandlerImplement this interface to handle events related to browser load status.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classCefLoadHandler.ErrorCode
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidonLoadEnd(CefBrowser browser, CefFrame frame, int httpStatusCode)Called when the browser is done loading a frame.voidonLoadError(CefBrowser browser, CefFrame frame, CefLoadHandler.ErrorCode errorCode, java.lang.String errorText, java.lang.String failedUrl)Called when the resource load for a navigation fails or is canceled.voidonLoadingStateChange(CefBrowser browser, boolean isLoading, boolean canGoBack, boolean canGoForward)Called when the loading state has changed.voidonLoadStart(CefBrowser browser, CefFrame frame, CefRequest.TransitionType transitionType)Called when the browser begins loading a frame.
-
-
-
Method Detail
-
onLoadingStateChange
void onLoadingStateChange(CefBrowser browser, boolean isLoading, boolean canGoBack, boolean canGoForward)
Called when the loading state has changed. This callback will be executed twice -- once when loading is initiated either programmatically or by user action, and once when loading is terminated due to completion, cancellation of failure.- Parameters:
browser- The corresponding browser.isLoading- true if it is loading.canGoBack- true if you can navigate back.canGoForward- true if you can navigate forward.
-
onLoadStart
void onLoadStart(CefBrowser browser, CefFrame frame, CefRequest.TransitionType transitionType)
Called when the browser begins loading a frame. The frameIdentifer value will never be empty. Multiple frames may be loading at the same time. Sub-frames may start or continue loading after the main frame load has ended. This method may not be called for a particular frame if the load request for that frame fails. For notification of overall browser load status use onLoadingStateChange instead.- Parameters:
browser- The corresponding browser.frame- The frame generating the event. Instance only valid within the scope of this method.transitionType- The transition type.
-
onLoadEnd
void onLoadEnd(CefBrowser browser, CefFrame frame, int httpStatusCode)
Called when the browser is done loading a frame. The frameIdentifer value will never be empty. Multiple frames may be loading at the same time. Sub-frames may start or continue loading after the main frame load has ended. This method will always be called for all frames irrespective of whether the request completes successfully.- Parameters:
browser- The corresponding browser.frame- The frame generating the event. Instance only valid within the scope of this method.httpStatusCode- The status code of the load.
-
onLoadError
void onLoadError(CefBrowser browser, CefFrame frame, CefLoadHandler.ErrorCode errorCode, java.lang.String errorText, java.lang.String failedUrl)
Called when the resource load for a navigation fails or is canceled.- Parameters:
browser- The corresponding browser.frame- The frame generating the event. Instance only valid within the scope of this method.errorCode- The error code number.errorText- The error text.failedUrl- The URL that failed to load.
-
-