Interface CefMessageRouterHandler

  • All Superinterfaces:
    CefNative
    All Known Implementing Classes:
    CefMessageRouterHandlerAdapter

    public interface CefMessageRouterHandler
    extends CefNative
    Implement this interface to handle queries. All methods will be executed on the browser process UI thread.
    • Method Detail

      • onQuery

        boolean onQuery​(CefBrowser browser,
                        CefFrame frame,
                        long queryId,
                        java.lang.String request,
                        boolean persistent,
                        CefQueryCallback callback)
        Called when the browser receives a JavaScript query.
        Parameters:
        browser - The corresponding browser.
        frame - The frame generating the event. Instance only valid within the scope of this method.
        queryId - The unique ID for the query.
        persistent - True if the query is persistent.
        callback - Object used to continue or cancel the query asynchronously.
        Returns:
        True to handle the query or false to propagate the query to other registered handlers, if any. If no handlers return true from this method then the query will be automatically canceled with an error code of -1 delivered to the JavaScript onFailure callback.
      • onQueryCanceled

        void onQueryCanceled​(CefBrowser browser,
                             CefFrame frame,
                             long queryId)
        Called when a pending JavaScript query is canceled.
        Parameters:
        browser - The corresponding browser.
        frame - The frame generating the event. Instance only valid within the scope of this method.
        queryId - The unique ID for the query.