CefBrowserOsrWithHandler (@NotNull JBCefOSRHandlerFactory factory, @NotNull CefClient client, @Nullable String url, @Nullable CefRequestContext context, // not-null parentBrowser creates a DevTools browser for it @Nullable CefBrowser parentBrowser, @Nullable Point inspectAt, boolean isMouseWheelEventEnabled) { JComponent comp = factory.createComponent(isMouseWheelEventEnabled); CefRenderHandler handler = factory.createCefRenderHandler(comp); CefBrowserOsrWithHandler browser = new CefBrowserOsrWithHandler(client, validateUrl(url), context, handler, comp, parentBrowser, inspectAt) { @Override protected CefBrowser createDevToolsBrowser(CefClient client, String url, CefRequestContext context, CefBrowser parent, Point inspectAt) { return createOsrBrowser(factory, client, getUrl(), getRequestContext(), this, inspectAt, isMouseWheelEventEnabled); } }; if (comp instanceof JBCefOsrComponent) ((JBCefOsrComponent)comp).setBrowser(browser); return browser; }