boolean (CefBrowser browser, CefFrame frame, long query_id, String request, boolean persistent, CefQueryCallback callback) { if (DEBUG_JS) CefLog.Debug("onQuery: browser=%s, frame=%s, qid=%d, request=%s", browser, frame, query_id, request); Response response = handler.apply(request); if (callback != null && response != null) { if (response.isSuccess() && response.hasResponse()) { callback.success(response.response()); } else { callback.failure(response.errCode(), response.errMsg()); } } else if (callback != null) { callback.success(""); } return true; }