Unnamed: 0
int64
0
305k
body
stringlengths
7
52.9k
name
stringlengths
1
185
284,100
JBCefBrowser () { return build(); }
createBrowser
284,101
JBCefBrowser () { return JBCefBrowser.create(this); }
build
284,102
JBCefBrowserBuilder (boolean mouseWheelEventEnable) { myMouseWheelEventEnable = mouseWheelEventEnable; return this; }
setMouseWheelEventEnable
284,103
void (@NotNull Runnable disposer) { if (!myIsDisposed.getAndSet(true)) disposer.run(); }
dispose
284,104
boolean () { return myIsDisposed.get(); }
isDisposed
284,105
CefCookieManager () { return myCefCookieManager; }
getCefCookieManager
284,106
List<JBCefCookie> () { return getCookies(null, false, null); }
getCookies
284,107
List<JBCefCookie> (@Nullable String url, @Nullable Boolean includeHttpOnly, @Nullable Integer maxTimeToWait) { boolean httpOnly = notNull(includeHttpOnly, Boolean.FALSE); JBCookieVisitor cookieVisitor = new JBCookieVisitor(); boolean result; if (url != null) { result = myCefCookieManager.visitUrlCookies(url, httpOnly, cookieVisitor); } else { result = myCefCookieManager.visitAllCookies(cookieVisitor); } if (!result) { LOG.debug("Cookies cannot be accessed"); return Collections.emptyList(); } return cookieVisitor.get(notNull(maxTimeToWait, DEFAULT_TIMEOUT_MS)); }
getCookies
284,108
boolean (@NotNull String url, @NotNull JBCefCookie jbCefCookie, boolean doSync) { if (doSync) { return setCookie(url, jbCefCookie, null); } else { return myCefCookieManager.setCookie(url, jbCefCookie.getCefCookie()); } }
setCookie
284,109
boolean (@NotNull String url, @NotNull JBCefCookie jbCefCookie, @Nullable Integer maxTimeToWait) { if (!checkArgs(url, jbCefCookie)) return false; int timeout = notNull(maxTimeToWait, DEFAULT_TIMEOUT_MS); IntFunction<Boolean> checkFunction = (timeoutForCheck) -> getCookies(url, null, timeoutForCheck).contains(jbCefCookie); myLock.lock(); try { Future<@NotNull Boolean> future = myExecutorService.submit(() -> { if (checkFunction.apply(timeout / 2)) { LOG.debug("Cookie is already set"); return true; } if (!myCefCookieManager.setCookie(url, jbCefCookie.getCefCookie())) { LOG.error("Posting task to set cookie is failed"); return false; } while (myLock.isLocked()) { boolean result = checkFunction.apply(timeout / 2); if (result) return true; } return false; }); try { return future.get(timeout, TimeUnit.MILLISECONDS); } catch (TimeoutException e) { LOG.error("Cookie setting took more than " + timeout + " ms"); return false; } catch (InterruptedException e) { LOG.error("Cookie setting is interrupted"); return false; } } catch (Exception e) { LOG.error(e); return false; } finally { myLock.unlock(); } }
setCookie
284,110
boolean (@NotNull String url, @NotNull JBCefCookie jbCefCookie) { try { URI uri = new URI(url); String scheme = uri.getScheme(); String domain = uri.getHost(); domain = domain.startsWith("www") ? domain : "." + domain; if (scheme.equals("https") && !jbCefCookie.isSecure()) { LOG.warn("Cannot set cookie without secure flag for HTTPS web-site"); return false; } if (!domain.contains(jbCefCookie.getDomain())) { LOG.warn("Cookie domain `" + jbCefCookie.getDomain() + "` doesn't match URL host `" + domain + "`"); return false; } } catch (URISyntaxException e) { LOG.error(e); return false; } return true; }
checkArgs
284,111
boolean (boolean doSync) { if (doSync) { return deleteCookies(null, null, (timeout) -> getCookies(null, false, timeout).isEmpty(), null); } else { return myCefCookieManager.deleteCookies("", ""); } }
deleteCookies
284,112
boolean (@Nullable String url, boolean doSync) { if (doSync) { return deleteCookies(url, "", (timeout) -> getCookies(url, false, timeout).isEmpty(), null); } else { return myCefCookieManager.deleteCookies(url, ""); } }
deleteCookies
284,113
boolean (@Nullable String url, @Nullable String cookieName, @NotNull IntFunction<Boolean> checkFunction, @Nullable Integer maxTimeToWait) { int timeout = notNull(maxTimeToWait, DEFAULT_TIMEOUT_MS); myLock.lock(); try { Future<@NotNull Boolean> future = myExecutorService.submit(() -> { if (checkFunction.apply(timeout / 2)) { LOG.debug("No cookies to be deleted"); return true; } if (!myCefCookieManager.deleteCookies(url, cookieName)) { LOG.error("Posting task to delete cookies is failed"); return false; } while (myLock.isLocked()) { boolean result = checkFunction.apply(timeout / 2); if (result) return true; } return false; }); try { return future.get(timeout, TimeUnit.MILLISECONDS); } catch (TimeoutException e) { LOG.error("Cookie deleting took more than " + timeout + " ms"); return false; } catch (InterruptedException e) { LOG.error("Cookie deleting is interrupted"); return false; } } catch (Exception e) { LOG.error(e); return false; } finally { myLock.unlock(); } }
deleteCookies
284,114
boolean (CefCookie cookie, int count, int total, BoolRef delete) { myCefCookies.add(new JBCefCookie(cookie)); if (myCefCookies.size() >= total) { myCountDownLatch.countDown(); } return true; }
visit
284,115
List<JBCefCookie> (@NotNull Supplier<Boolean> condition) { while (condition.get()) { try { if (myCountDownLatch.await(BOUNCE_TIMEOUT_MS, TimeUnit.MILLISECONDS)) { return myCefCookies; } } catch (InterruptedException e) { LOG.error("Cookie visiting is interrupted"); break; } } return Collections.emptyList(); }
get
284,116
List<JBCefCookie> (int timeout) { boolean result; try { result = myCountDownLatch.await(timeout, TimeUnit.MILLISECONDS); } catch (InterruptedException e) { LOG.error("Cookie visiting is interrupted"); return Collections.emptyList(); } long timeSpent = getTime() - myStartTime; if (!result) { LOG.debug("Timeout for cookie visiting is reached, " + timeSpent + " ms time spent"); } else { LOG.debug("Cookie getting took " + timeSpent + " ms"); } return myCefCookies; }
get
284,117
boolean () { return RegistryManager.getInstance().is("ide.browser.jcef.osr.enabled"); }
isOffScreenRenderingModeEnabled
284,118
CefSettings (@NotNull JCefAppConfig config) { CefSettings settings = config.getCefSettings(); settings.windowless_rendering_enabled = isOffScreenRenderingModeEnabled(); settings.log_severity = getLogLevel(); settings.log_file = System.getProperty("ide.browser.jcef.log.path", System.getProperty("user.home") + Platform.current().fileSeparator + "jcef_" + ProcessHandle.current().pid() + ".log"); if (settings.log_file.trim().isEmpty()) settings.log_file = null; //todo[tav] IDEA-260446 & IDEA-260344 However, without proper background the CEF component flashes white in dark themes //settings.background_color = settings.new ColorType(bg.getAlpha(), bg.getRed(), bg.getGreen(), bg.getBlue()); int port = Registry.intValue("ide.browser.jcef.debug.port"); if (ApplicationManager.getApplication().isInternal() && port > 0) { settings.remote_debugging_port = port; } settings.cache_path = ApplicationManager.getApplication().getService(JBCefAppCache.class).getPath().toString(); if (Registry.is("ide.browser.jcef.sandbox.enable")) { LOG.info("JCEF-sandbox is enabled"); settings.no_sandbox = false; if (SystemInfoRt.isWindows) { String sandboxPtr = System.getProperty("jcef.sandbox.ptr"); if (sandboxPtr != null && !sandboxPtr.trim().isEmpty()) { if (isSandboxSupported()) settings.browser_subprocess_path = ""; else { LOG.info("JCEF-sandbox was disabled because current jcef version doesn't support sandbox"); settings.no_sandbox = true; } } else { LOG.info("JCEF-sandbox was disabled because java-process initialized without sandbox"); settings.no_sandbox = true; } } else if (SystemInfoRt.isMac) { ProcessHandle.Info i = ProcessHandle.current().info(); Optional<String> processAppPath = i.command(); if (processAppPath.isPresent() && processAppPath.get().endsWith("/bin/java")) { // Sandbox must be disabled when user runs IDE from debugger (otherwise dlopen will fail) LOG.info("JCEF-sandbox was disabled (to enable you should start IDE from launcher)"); settings.no_sandbox = true; } } else if (SystemInfoRt.isLinux) { String linuxDistrib = readLinuxDistribution(); if ( linuxDistrib != null && (linuxDistrib.contains("debian") || linuxDistrib.contains("centos")) ) { if (Boolean.getBoolean("ide.browser.jcef.sandbox.disable_linux_os_check")) { LOG.warn("JCEF sandbox enabled via VM-option 'disable_linux_os_check', OS: " + linuxDistrib); } else { LOG.info("JCEF sandbox was disabled because of unsupported OS: " + linuxDistrib + ". To skip this check run IDE with VM-option -Dide.browser.jcef.sandbox.disable_linux_os_check=true"); settings.no_sandbox = true; } } } } return settings; }
loadSettings
284,119
String[] (@NotNull JCefAppConfig config, @NotNull CefSettings settings, @Nullable BoolRef doTrackGPUCrashes) { String[] argsFromProviders = JBCefAppRequiredArgumentsProvider .getProviders() .stream() .flatMap(p -> { LOG.debug("got options: [" + p.getOptions() + "] from:" + p.getClass().getName()); return p.getOptions().stream(); }) .distinct() .toArray(String[]::new); String[] args = ArrayUtil.mergeArrays(config.getAppArgs(), argsFromProviders); JBCefProxySettings proxySettings = JBCefProxySettings.getInstance(); String[] proxyArgs = null; if (proxySettings.USE_PROXY_PAC) { if (proxySettings.USE_PAC_URL) { proxyArgs = new String[] {"--proxy-pac-url=" + proxySettings.PAC_URL + ":" + proxySettings.PROXY_PORT}; } else { // when "Auto-detect proxy settings" proxy option is enabled in IntelliJ: // IntelliJ's behavior: use system proxy settings or an automatically detected the proxy auto-config (PAC) file // CEF's behavior : use system proxy settings // When no proxy flag passes to CEF, it uses the system proxy by default and detected the proxy auto-config (PAC) file // when "--proxy-auto-detect" flag passed. // CEF doesn't have any proxy flag that checks both system proxy settings and automatically detects proxy auto-config, // so we let the CEF uses the system proxy here because this is more useful for users and users can also manually // configure the PAC file in IntelliJ setting if they need to use PAC file. } } else if (proxySettings.USE_HTTP_PROXY) { String proxyScheme; if (proxySettings.PROXY_TYPE_IS_SOCKS) { proxyScheme = "socks"; } else { proxyScheme = "http"; } String proxyServer = "--proxy-server=" + proxyScheme + "://" + proxySettings.PROXY_HOST + ":" + proxySettings.PROXY_PORT; if (StringUtil.isEmptyOrSpaces(proxySettings.PROXY_EXCEPTIONS)) { proxyArgs = new String[]{proxyServer}; } else { String proxyBypassList = "--proxy-bypass-list=" + proxySettings.PROXY_EXCEPTIONS; proxyArgs = new String[]{proxyServer, proxyBypassList}; } } else { proxyArgs = new String[]{"--no-proxy-server"}; } if (proxyArgs != null) args = ArrayUtil.mergeArrays(args, proxyArgs); if (Registry.is("ide.browser.jcef.gpu.disable")) { // Add possibility to disable GPU (see IDEA-248140) args = ArrayUtil.mergeArrays(args, "--disable-gpu", "--disable-gpu-compositing"); } final boolean trackGPUCrashes = Registry.is("ide.browser.jcef.gpu.infinitecrash"); if (trackGPUCrashes) { args = ArrayUtil.mergeArrays(args, "--disable-gpu-process-crash-limit"); if (doTrackGPUCrashes != null) doTrackGPUCrashes.set(true); } // Sometimes it's useful to be able to pass any additional keys (see IDEA-248140) // NOTE: List of keys: https://peter.sh/experiments/chromium-command-line-switches/ String extraArgsProp = System.getProperty("ide.browser.jcef.extra.args", ""); if (!extraArgsProp.isEmpty()) { String[] extraArgs = extraArgsProp.split(","); if (extraArgs.length > 0) { LOG.debug("add extra CEF args: [" + Arrays.toString(extraArgs) + "]"); args = ArrayUtil.mergeArrays(args, extraArgs); } } if (settings.remote_debugging_port > 0) { args = ArrayUtil.mergeArrays(args, "--remote-allow-origins=*"); } return args; }
loadArgs
284,120
void () { Notification notification = NOTIFICATION_GROUP.getValue().createNotification( IdeBundle.message("notification.content.jcef.gpucrash.title"), IdeBundle.message("notification.content.jcef.gpucrash.message"), NotificationType.ERROR); notification.addAction(new AnAction(IdeBundle.message("notification.content.jcef.gpucrash.action.restart")) { @Override public void actionPerformed(@NotNull AnActionEvent e) { ApplicationManager.getApplication().restart(); } }); if (!Registry.is("ide.browser.jcef.gpu.disable")) { //noinspection DialogTitleCapitalization notification.addAction(new AnAction(IdeBundle.message("notification.content.jcef.gpucrash.action.disable")) { @Override public void actionPerformed(@NotNull AnActionEvent e) { Registry.get("ide.browser.jcef.gpu.disable").setValue(true); ApplicationManager.getApplication().restart(); } }); } notification.notify(null); }
showNotificationDisableGPU
284,121
void (@NotNull AnActionEvent e) { ApplicationManager.getApplication().restart(); }
actionPerformed
284,122
void (@NotNull AnActionEvent e) { Registry.get("ide.browser.jcef.gpu.disable").setValue(true); ApplicationManager.getApplication().restart(); }
actionPerformed
284,123
void () { if (!SystemInfoRt.isLinux) return; try { Process proc = Runtime.getRuntime().exec("ldd " + System.getProperty("java.home") + "/lib/libjcef.so"); StringBuilder missingLibs = new StringBuilder(); try (BufferedReader reader = new BufferedReader(new InputStreamReader(proc.getInputStream(), StandardCharsets.UTF_8))) { String line; String delim = " => "; String prevLib = null; while ((line = reader.readLine()) != null) { if (line.contains("not found") && !line.contains("libjvm")) { String[] split = line.split(delim); if (split.length != 2) continue; String lib = split[0]; if (lib.equals(prevLib)) continue; if (!missingLibs.isEmpty()) missingLibs.append(", "); missingLibs.append(lib); prevLib = lib; } } } if (proc.waitFor() == 0 && !missingLibs.isEmpty()) { String msg = IdeBundle.message("notification.content.jcef.missingLibs", missingLibs); Notification notification = NOTIFICATION_GROUP.getValue(). createNotification(IdeBundle.message("notification.title.jcef.startFailure"), msg, NotificationType.ERROR); //noinspection DialogTitleCapitalization notification.addAction(new AnAction(IdeBundle.message("action.jcef.followInstructions")) { @Override public void actionPerformed(@NotNull AnActionEvent e) { BrowserUtil.open(MISSING_LIBS_SUPPORT_URL); } }); notification.notify(null); } } catch (Throwable t) { LOG.error("failed to identify JCEF missing libs", t); } }
showNotificationMissingLibraries
284,124
void (@NotNull AnActionEvent e) { BrowserUtil.open(MISSING_LIBS_SUPPORT_URL); }
actionPerformed
284,125
String () { if (ourLinuxDistribution == null) { if (SystemInfoRt.isLinux) { String readResult = readLinuxDistributionFromLsbRelease(); if (readResult == null) readResult = readLinuxDistributionFromOsRelease(); ourLinuxDistribution = readResult == null ? "linux" : readResult; } else { ourLinuxDistribution = ""; } } return ourLinuxDistribution; }
readLinuxDistribution
284,126
boolean () { JCefVersionDetails version; try { version = JCefAppConfig.getVersionDetails(); } catch (Throwable e) { LOG.error("JCEF runtime version is not supported"); return false; } return version.cefVersion.major >= 104 && version.apiVersion.minor >= 9; }
isSandboxSupported
284,127
CefCookie () { return myCefCookie; }
getCefCookie
284,128
String () { return myCefCookie.name; }
getName
284,129
String () { return myCefCookie.value; }
getValue
284,130
String () { return myCefCookie.domain; }
getDomain
284,131
String () { return myCefCookie.path; }
getPath
284,132
boolean () { return myCefCookie.secure; }
isSecure
284,133
boolean () { return myCefCookie.httponly; }
isHttpOnly
284,134
boolean () { return myCefCookie.hasExpires; }
hasExpires
284,135
boolean (Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; JBCefCookie cookie = (JBCefCookie)o; return getName().equals(cookie.getName()) && getValue().equals(cookie.getValue()) && compareDomains(getDomain(), cookie.getDomain()) && getPath().equals(cookie.getPath()) && isSecure() == cookie.isSecure() && isHttpOnly() == cookie.isHttpOnly(); }
equals
284,136
boolean (@Nullable String d1, @Nullable String d2) { if (d1 == null && d2 == null) return true; if (d1 == null || d2 == null) return false; d1 = StringUtil.trimStart(d1, "."); d1 = StringUtil.trimStart(d1, "www."); d2 = StringUtil.trimStart(d2, "."); d2 = StringUtil.trimStart(d2, "www."); return d1.equals(d2); }
compareDomains
284,137
int () { return Objects.hash(getName(), getValue(), getDomain(), getPath(), isSecure(), isHttpOnly()); }
hashCode
284,138
void () { if (myHelper != null && isActive()) myHelper.paintFrameStarted(); }
paintFrameStarted
284,139
void (@NotNull Graphics g) { if (isActive()) { myFrameCount.incrementAndGet(); if (myHelper != null) myHelper.paintFrameFinished(getFps()); drawFps(g); } }
paintFrameFinished
284,140
void () { if (myHelper != null && isActive()) myHelper.onPaintStarted(); }
onPaintStarted
284,141
void (long pixCount) { if (myHelper != null && isActive()) myHelper.onPaintFinished(pixCount); }
onPaintFinished
284,142
void (PrintStream ps) { if (myHelper != null) myHelper.writeCsv(ps); }
writeStats
284,143
void () { if (myStartMeasureTime.get() > 0) { myMeasureDuration.set(System.nanoTime() - myStartMeasureTime.get()); myFps.set((int)(myFrameCount.get() / ((float)myMeasureDuration.get() / 1000000000))); } myFrameCount.set(0); myStartMeasureTime.set(System.nanoTime()); // during the measurement the component can be repainted partially in which case // the FPS bar may run out of the clip, so here we request repaint once per a tick requestFpsBarRepaint(); }
tick
284,144
int () { return Math.min(myFps.get(), 99); }
getFps
284,145
void (@NotNull Graphics g) { Graphics gr = g.create(); try { gr.setColor(Color.blue); Rectangle r = myFpsBarBounds.get(); gr.fillRect(r.x, r.y, r.width, r.height); gr.setColor(Color.green); gr.setFont(myFont.get()); int fps = getFps(); gr.drawString((fps == 0 ? "__" : fps) + " fps", FPS_STR_OFFSET, FPS_STR_OFFSET + myFont.get().getSize()); } finally { gr.dispose(); } }
drawFps
284,146
void (boolean active) { boolean wasActive = myIsActive.getAndSet(active); if (active && !wasActive) { myTimer.set(new Timer(TICK_DELAY_MS, actionEvent -> tick())); myTimer.get().setRepeats(true); myTimer.get().start(); reset(); } else if (!active && wasActive) { myTimer.get().stop(); myTimer.set(null); // clear the FPS bar requestFpsBarRepaint(); } }
setActive
284,147
boolean () { return myIsActive.get(); }
isActive
284,148
void (@NotNull Component component) { myComp.set(new WeakReference<>(component)); }
registerComponent
284,149
void () { Rectangle r = myFpsBarBounds.get(); getComponent().repaint(r.x, r.y, r.width, r.height); }
requestFpsBarRepaint
284,150
Component () { Component comp = null; WeakReference<Component> compRef = myComp.get(); if (compRef != null) { comp = compRef.get(); } return comp != null ? comp : DEFAULT_COMPONENT.get(); }
getComponent
284,151
void () { myFps.set(0); myFrameCount.set(0); myStartMeasureTime.set(0); myMeasureDuration.set(0); if (myHelper != null) myHelper.reset(); Component comp = getComponent(); myFont.set(JBFont.create(new Font("Sans", Font.BOLD, 16))); comp.getFontMetrics(myFont.get()); Rectangle strBounds = myFont.get().getStringBounds("00 fps", comp.getFontMetrics(myFont.get()).getFontRenderContext()).getBounds(); myFpsBarBounds.get().setBounds(0, 0, strBounds.width + FPS_STR_OFFSET * 2, strBounds.height + FPS_STR_OFFSET * 2); }
reset
284,152
JBCefOsrHandlerBrowser (@NotNull String url, @NotNull CefRenderHandler renderHandler) { return create(url, renderHandler, true); }
create
284,153
JBCefOsrHandlerBrowser (@NotNull String url, @NotNull CefRenderHandler renderHandler, boolean createImmediately) { return new JBCefOsrHandlerBrowser(null, url, renderHandler, createImmediately) { @Override public @Nullable JComponent getComponent() { return null; } }; }
create
284,154
JBCefOsrHandlerBrowser (@NotNull String url, @NotNull CefRenderHandler renderHandler, @NotNull JBCefClient client) { return create(url, renderHandler, client, true); }
create
284,155
JBCefOsrHandlerBrowser (@NotNull String url, @NotNull CefRenderHandler renderHandler, @NotNull JBCefClient client, boolean createImmediately) { return new JBCefOsrHandlerBrowser(client, url, renderHandler, createImmediately) { @Override public @Nullable JComponent getComponent() { return null; } }; }
create
284,156
JComponent (boolean isMouseWheelEventEnabled) { return new JComponent() {}; }
createComponent
284,157
CefRenderHandler (@NotNull JComponent component) { return renderHandler; }
createCefRenderHandler
284,158
CefClient () { return myCefClient; }
getCefClient
284,159
void () { myDisposeHelper.dispose(() -> { try { myCefClient.dispose(); } catch (Exception e) { LOG.warn(e); } }); }
dispose
284,160
boolean () { return myDisposeHelper.isDisposed(); }
isDisposed
284,161
void (@NotNull String name, @Nullable Object value) { myPropertiesHelper.setProperty(name, value); }
setProperty
284,162
void (@NotNull JSQueryFunc func) { myPool.add(func); }
releaseUsedSlot
284,163
JBCefClient (@NotNull CefContextMenuHandler handler, @NotNull CefBrowser browser) { return myContextMenuHandler.add(handler, browser, () -> { myCefClient.addContextMenuHandler(new CefContextMenuHandler() { @Override public void onBeforeContextMenu(CefBrowser browser, CefFrame frame, CefContextMenuParams params, CefMenuModel model) { myContextMenuHandler.handle(browser, handler -> { handler.onBeforeContextMenu(browser, frame, params, model); }); } @Override public boolean onContextMenuCommand(CefBrowser browser, CefFrame frame, CefContextMenuParams params, int commandId, int eventFlags) { return myContextMenuHandler.handleBoolean(browser, handler -> { return handler.onContextMenuCommand(browser, frame, params, commandId, eventFlags); }); } @Override public void onContextMenuDismissed(CefBrowser browser, CefFrame frame) { myContextMenuHandler.handle(browser, handler -> { handler.onContextMenuDismissed(browser, frame); }); } }); }); }
addContextMenuHandler
284,164
void (CefBrowser browser, CefFrame frame, CefContextMenuParams params, CefMenuModel model) { myContextMenuHandler.handle(browser, handler -> { handler.onBeforeContextMenu(browser, frame, params, model); }); }
onBeforeContextMenu
284,165
boolean (CefBrowser browser, CefFrame frame, CefContextMenuParams params, int commandId, int eventFlags) { return myContextMenuHandler.handleBoolean(browser, handler -> { return handler.onContextMenuCommand(browser, frame, params, commandId, eventFlags); }); }
onContextMenuCommand
284,166
void (CefBrowser browser, CefFrame frame) { myContextMenuHandler.handle(browser, handler -> { handler.onContextMenuDismissed(browser, frame); }); }
onContextMenuDismissed
284,167
void (@NotNull CefContextMenuHandler handler, @NotNull CefBrowser browser) { myContextMenuHandler.remove(handler, browser, () -> myCefClient.removeContextMenuHandler()); }
removeContextMenuHandler
284,168
JBCefClient (@NotNull CefDialogHandler handler, @NotNull CefBrowser browser) { return myDialogHandler.add(handler, browser, () -> { myCefClient.addDialogHandler(new CefDialogHandler() { @Override public boolean onFileDialog(CefBrowser browser, FileDialogMode mode, String title, String defaultFilePath, Vector<String> acceptFilters, CefFileDialogCallback callback) { return myDialogHandler.handleBoolean(browser, handler -> { return handler.onFileDialog(browser, mode, title, defaultFilePath, acceptFilters, callback); }); } }); }); }
addDialogHandler
284,169
boolean (CefBrowser browser, FileDialogMode mode, String title, String defaultFilePath, Vector<String> acceptFilters, CefFileDialogCallback callback) { return myDialogHandler.handleBoolean(browser, handler -> { return handler.onFileDialog(browser, mode, title, defaultFilePath, acceptFilters, callback); }); }
onFileDialog
284,170
void (@NotNull CefDialogHandler handler, @NotNull CefBrowser browser) { myDialogHandler.remove(handler, browser, () -> myCefClient.removeDialogHandler()); }
removeDialogHandler
284,171
JBCefClient (@NotNull CefDisplayHandler handler, @NotNull CefBrowser browser) { return myDisplayHandler.add(handler, browser, () -> { myCefClient.addDisplayHandler(new CefDisplayHandler() { @Override public void onAddressChange(CefBrowser browser, CefFrame frame, String url) { myDisplayHandler.handle(browser, handler -> { handler.onAddressChange(browser, frame, url); }); } @Override public void onTitleChange(CefBrowser browser, String title) { myDisplayHandler.handle(browser, handler -> { handler.onTitleChange(browser, title); }); } @Override public boolean onTooltip(CefBrowser browser, String text) { return myDisplayHandler.handleBoolean(browser, handler -> { return handler.onTooltip(browser, text); }); } @Override public void onStatusMessage(CefBrowser browser, String value) { myDisplayHandler.handle(browser, handler -> { handler.onStatusMessage(browser, value); }); } @Override public boolean onConsoleMessage(CefBrowser browser, CefSettings.LogSeverity level, String message, String source, int line) { return myDisplayHandler.handleBoolean(browser, handler -> { return handler.onConsoleMessage(browser, level, message, source, line); }); } @Override public boolean onCursorChange(CefBrowser browser, int cursorType) { return myDisplayHandler.handleBoolean(browser, handler -> { return handler.onCursorChange(browser, cursorType); }); } }); }); }
addDisplayHandler
284,172
void (CefBrowser browser, CefFrame frame, String url) { myDisplayHandler.handle(browser, handler -> { handler.onAddressChange(browser, frame, url); }); }
onAddressChange
284,173
void (CefBrowser browser, String title) { myDisplayHandler.handle(browser, handler -> { handler.onTitleChange(browser, title); }); }
onTitleChange
284,174
boolean (CefBrowser browser, String text) { return myDisplayHandler.handleBoolean(browser, handler -> { return handler.onTooltip(browser, text); }); }
onTooltip
284,175
void (CefBrowser browser, String value) { myDisplayHandler.handle(browser, handler -> { handler.onStatusMessage(browser, value); }); }
onStatusMessage
284,176
boolean (CefBrowser browser, CefSettings.LogSeverity level, String message, String source, int line) { return myDisplayHandler.handleBoolean(browser, handler -> { return handler.onConsoleMessage(browser, level, message, source, line); }); }
onConsoleMessage
284,177
boolean (CefBrowser browser, int cursorType) { return myDisplayHandler.handleBoolean(browser, handler -> { return handler.onCursorChange(browser, cursorType); }); }
onCursorChange
284,178
void (@NotNull CefDisplayHandler handler, @NotNull CefBrowser browser) { myDisplayHandler.remove(handler, browser, () -> myCefClient.removeDisplayHandler()); }
removeDisplayHandler
284,179
JBCefClient (@NotNull CefDownloadHandler handler, @NotNull CefBrowser browser) { return myDownloadHandler.add(handler, browser, () -> { myCefClient.addDownloadHandler(new CefDownloadHandler() { @Override public void onBeforeDownload(CefBrowser browser, CefDownloadItem downloadItem, String suggestedName, CefBeforeDownloadCallback callback) { myDownloadHandler.handle(browser, handler -> { handler.onBeforeDownload(browser, downloadItem, suggestedName, callback); }); } @Override public void onDownloadUpdated(CefBrowser browser, CefDownloadItem downloadItem, CefDownloadItemCallback callback) { myDownloadHandler.handle(browser, handler -> { handler.onDownloadUpdated(browser, downloadItem, callback); }); } }); }); }
addDownloadHandler
284,180
void (CefBrowser browser, CefDownloadItem downloadItem, String suggestedName, CefBeforeDownloadCallback callback) { myDownloadHandler.handle(browser, handler -> { handler.onBeforeDownload(browser, downloadItem, suggestedName, callback); }); }
onBeforeDownload
284,181
void (CefBrowser browser, CefDownloadItem downloadItem, CefDownloadItemCallback callback) { myDownloadHandler.handle(browser, handler -> { handler.onDownloadUpdated(browser, downloadItem, callback); }); }
onDownloadUpdated
284,182
void (@NotNull CefDownloadHandler handler, @NotNull CefBrowser browser) { myDownloadHandler.remove(handler, browser, () -> myCefClient.removeDownloadHandler()); }
removeDownloadHandle
284,183
JBCefClient (@NotNull CefDragHandler handler, @NotNull CefBrowser browser) { return myDragHandler.add(handler, browser, () -> { myCefClient.addDragHandler(new CefDragHandler() { @Override public boolean onDragEnter(CefBrowser browser, CefDragData dragData, int mask) { return myDragHandler.handleBoolean(browser, handler -> { return handler.onDragEnter(browser, dragData, mask); }); } }); }); }
addDragHandler
284,184
boolean (CefBrowser browser, CefDragData dragData, int mask) { return myDragHandler.handleBoolean(browser, handler -> { return handler.onDragEnter(browser, dragData, mask); }); }
onDragEnter
284,185
void (@NotNull CefDragHandler handler, @NotNull CefBrowser browser) { myDragHandler.remove(handler, browser, () -> myCefClient.removeDragHandler()); }
removeDragHandler
284,186
JBCefClient (@NotNull CefPermissionHandler handler, @NotNull CefBrowser browser) { return myPermissionHandler.add(handler, browser, () -> { myCefClient.addPermissionHandler(new CefPermissionHandler() { @Override public boolean onRequestMediaAccessPermission(CefBrowser browser, CefFrame frame, String requesting_url, int requested_permissions, CefMediaAccessCallback callback) { Boolean res = myPermissionHandler.handle(browser, handler -> { return handler.onRequestMediaAccessPermission(browser, frame, requesting_url, requested_permissions, callback); }); return ObjectUtils.notNull(res, false); } }); }); }
addPermissionHandler
284,187
boolean (CefBrowser browser, CefFrame frame, String requesting_url, int requested_permissions, CefMediaAccessCallback callback) { Boolean res = myPermissionHandler.handle(browser, handler -> { return handler.onRequestMediaAccessPermission(browser, frame, requesting_url, requested_permissions, callback); }); return ObjectUtils.notNull(res, false); }
onRequestMediaAccessPermission
284,188
JBCefClient (@NotNull CefFocusHandler handler, @NotNull CefBrowser browser) { return myFocusHandler.add(handler, browser, () -> { myCefClient.addFocusHandler(new CefFocusHandler() { @Override public void onTakeFocus(CefBrowser browser, boolean next) { myFocusHandler.handle(browser, handler -> { handler.onTakeFocus(browser, next); }); } @Override public boolean onSetFocus(CefBrowser browser, FocusSource source) { return myFocusHandler.handleBoolean(browser, handler -> { return handler.onSetFocus(browser, source); }); } @Override public void onGotFocus(CefBrowser browser) { myFocusHandler.handle(browser, handler -> { handler.onGotFocus(browser); }); } }); }); }
addFocusHandler
284,189
void (CefBrowser browser, boolean next) { myFocusHandler.handle(browser, handler -> { handler.onTakeFocus(browser, next); }); }
onTakeFocus
284,190
boolean (CefBrowser browser, FocusSource source) { return myFocusHandler.handleBoolean(browser, handler -> { return handler.onSetFocus(browser, source); }); }
onSetFocus
284,191
void (CefBrowser browser) { myFocusHandler.handle(browser, handler -> { handler.onGotFocus(browser); }); }
onGotFocus
284,192
void (@NotNull CefFocusHandler handler, @NotNull CefBrowser browser) { myFocusHandler.remove(handler, browser, () -> myCefClient.removeFocusHandler()); }
removeFocusHandler
284,193
JBCefClient (@NotNull CefJSDialogHandler handler, @NotNull CefBrowser browser) { return myJSDialogHandler.add(handler, browser, () -> { myCefClient.addJSDialogHandler(new CefJSDialogHandler() { @Override public boolean onJSDialog(CefBrowser browser, String origin_url, JSDialogType dialog_type, String message_text, String default_prompt_text, CefJSDialogCallback callback, BoolRef suppress_message) { return myJSDialogHandler.handleBoolean(browser, handler -> { return handler.onJSDialog(browser, origin_url, dialog_type, message_text, default_prompt_text, callback, suppress_message); }); } @Override public boolean onBeforeUnloadDialog(CefBrowser browser, String message_text, boolean is_reload, CefJSDialogCallback callback) { return myJSDialogHandler.handleBoolean(browser, handler -> { return handler.onBeforeUnloadDialog(browser, message_text, is_reload, callback); }); } @Override public void onResetDialogState(CefBrowser browser) { myJSDialogHandler.handle(browser, handler -> { handler.onResetDialogState(browser); }); } @Override public void onDialogClosed(CefBrowser browser) { myJSDialogHandler.handle(browser, handler -> { handler.onDialogClosed(browser); }); } }); }); }
addJSDialogHandler
284,194
boolean (CefBrowser browser, String origin_url, JSDialogType dialog_type, String message_text, String default_prompt_text, CefJSDialogCallback callback, BoolRef suppress_message) { return myJSDialogHandler.handleBoolean(browser, handler -> { return handler.onJSDialog(browser, origin_url, dialog_type, message_text, default_prompt_text, callback, suppress_message); }); }
onJSDialog
284,195
boolean (CefBrowser browser, String message_text, boolean is_reload, CefJSDialogCallback callback) { return myJSDialogHandler.handleBoolean(browser, handler -> { return handler.onBeforeUnloadDialog(browser, message_text, is_reload, callback); }); }
onBeforeUnloadDialog
284,196
void (CefBrowser browser) { myJSDialogHandler.handle(browser, handler -> { handler.onResetDialogState(browser); }); }
onResetDialogState
284,197
void (CefBrowser browser) { myJSDialogHandler.handle(browser, handler -> { handler.onDialogClosed(browser); }); }
onDialogClosed
284,198
void (@NotNull CefJSDialogHandler handler, @NotNull CefBrowser browser) { myJSDialogHandler.remove(handler, browser, () -> myCefClient.removeJSDialogHandler()); }
removeJSDialogHandler
284,199
JBCefClient (@NotNull CefKeyboardHandler handler, @NotNull CefBrowser browser) { return myKeyboardHandler.add(handler, browser, () -> { myCefClient.addKeyboardHandler(new CefKeyboardHandler() { @Override public boolean onPreKeyEvent(CefBrowser browser, CefKeyEvent event, BoolRef is_keyboard_shortcut) { return myKeyboardHandler.handleBoolean(browser, handler -> { return handler.onPreKeyEvent(browser, event, is_keyboard_shortcut); }); } @Override public boolean onKeyEvent(CefBrowser browser, CefKeyEvent event) { return myKeyboardHandler.handleBoolean(browser, handler -> { return handler.onKeyEvent(browser, event); }); } }); }); }
addKeyboardHandler