diff --git a/.github/workflows/build-jcef.yml b/.github/workflows/build-jcef.yml index c6f849d5..d95cdefb 100644 --- a/.github/workflows/build-jcef.yml +++ b/.github/workflows/build-jcef.yml @@ -26,7 +26,6 @@ jobs: tar -czf linux_${{ matrix.platform }}.tar.gz linux_${{ matrix.platform }} sha256sum linux_${{ matrix.platform }}.tar.gz > linux_${{ matrix.platform }}.tar.gz.sha256 - uses: actions/upload-artifact@v3 - if: ${{ github.ref == 'refs/heads/master' }} with: name: 'linux_${{ matrix.platform }}' path: | @@ -54,7 +53,6 @@ jobs: tar -czf windows_${{ matrix.platform }}.tar.gz windows_${{ matrix.platform }} Get-FileHash -Algorithm SHA256 -Path "windows_${{ matrix.platform }}.tar.gz" | Out-File "windows_${{ matrix.platform }}.tar.gz.sha256" - uses: actions/upload-artifact@v3 - if: ${{ github.ref == 'refs/heads/master' }} with: name: 'windows_${{ matrix.platform }}' path: | diff --git a/java/org/cef/CefClient.java b/java/org/cef/CefClient.java index 0c88e8dc..39034ea6 100644 --- a/java/org/cef/CefClient.java +++ b/java/org/cef/CefClient.java @@ -4,46 +4,22 @@ package org.cef; -import org.cef.browser.CefBrowser; -import org.cef.browser.CefBrowserFactory; -import org.cef.browser.CefFrame; -import org.cef.browser.CefMessageRouter; -import org.cef.browser.CefRequestContext; -import org.cef.callback.CefAuthCallback; -import org.cef.callback.CefBeforeDownloadCallback; -import org.cef.callback.CefCallback; -import org.cef.callback.CefContextMenuParams; -import org.cef.callback.CefDownloadItem; -import org.cef.callback.CefDownloadItemCallback; -import org.cef.callback.CefDragData; -import org.cef.callback.CefFileDialogCallback; -import org.cef.callback.CefJSDialogCallback; -import org.cef.callback.CefMenuModel; -import org.cef.callback.CefPrintDialogCallback; -import org.cef.callback.CefPrintJobCallback; +import org.cef.browser.*; +import org.cef.callback.*; import org.cef.handler.*; import org.cef.misc.BoolRef; import org.cef.misc.CefAudioParameters; import org.cef.misc.CefPrintSettings; -import org.cef.misc.StringRef; import org.cef.network.CefRequest; import org.cef.network.CefRequest.TransitionType; -import org.cef.network.CefResponse; -import org.cef.network.CefURLRequest; - -import java.awt.Dimension; -import java.awt.Point; -import java.awt.Rectangle; -import java.beans.PropertyChangeEvent; -import java.beans.PropertyChangeListener; + +import java.awt.*; import java.nio.ByteBuffer; import java.util.Collection; import java.util.HashMap; import java.util.Vector; import java.util.function.Consumer; -import javax.swing.SwingUtilities; - /** * Client that owns a browser and renderer. */ diff --git a/java/org/cef/browser/CefBrowserFactory.java b/java/org/cef/browser/CefBrowserFactory.java index 38bfd596..853ce9b2 100644 --- a/java/org/cef/browser/CefBrowserFactory.java +++ b/java/org/cef/browser/CefBrowserFactory.java @@ -13,8 +13,6 @@ public class CefBrowserFactory { public static CefBrowser create(CefClient client, String url, boolean isOffscreenRendered, boolean isTransparent, CefRequestContext context, CefBrowserSettings settings) { - if (isOffscreenRendered) - return new CefBrowserOsr(client, url, isTransparent, context, settings); - return new CefBrowserWr(client, url, context, settings); + return new CefBrowserOsr(client, url, isTransparent, context, settings); } } diff --git a/java/org/cef/browser/CefBrowserOsr.java b/java/org/cef/browser/CefBrowserOsr.java index 335bd8db..2fd33b1b 100644 --- a/java/org/cef/browser/CefBrowserOsr.java +++ b/java/org/cef/browser/CefBrowserOsr.java @@ -4,6 +4,7 @@ package org.cef.browser; +import org.cef.CefBrowserSettings; import org.cef.CefClient; import org.cef.callback.CefDragData; import org.cef.handler.CefRenderHandler; @@ -18,9 +19,6 @@ import java.nio.ByteBuffer; import java.util.concurrent.CompletableFuture; import java.util.concurrent.CopyOnWriteArrayList; -import java.util.concurrent.ExecutionException; -import java.util.concurrent.TimeUnit; -import java.util.concurrent.TimeoutException; import java.util.function.Consumer; /** @@ -40,8 +38,8 @@ public class CefBrowserOsr extends CefBrowser_N implements CefRenderHandler { private CopyOnWriteArrayList> onPaintListeners = new CopyOnWriteArrayList<>(); - CefBrowserOsr(CefClient client, String url, boolean transparent, CefRequestContext context, - CefBrowserSettings settings) { + protected CefBrowserOsr(CefClient client, String url, boolean transparent, CefRequestContext context, + CefBrowserSettings settings) { this(client, url, transparent, context, null, null, settings); } @@ -50,8 +48,6 @@ private CefBrowserOsr(CefClient client, String url, boolean transparent, CefBrowserSettings settings) { super(client, url, context, parent, inspectAt, settings); isTransparent_ = transparent; - renderer_ = new CefRenderer(transparent); - createGLCanvas(); } @Override @@ -160,7 +156,7 @@ private void createBrowserIfRequired(boolean hasParent) { getInspectAt()); } else { createBrowser(getClient(), windowHandle, getUrl(), true, isTransparent_, - getRequestContext()); + null, getRequestContext()); } } else if (hasParent && justCreated_) { notifyAfterParentChanged(); diff --git a/java/org/cef/browser/CefBrowser_N.java b/java/org/cef/browser/CefBrowser_N.java index d0cb39f0..72502f64 100644 --- a/java/org/cef/browser/CefBrowser_N.java +++ b/java/org/cef/browser/CefBrowser_N.java @@ -198,7 +198,7 @@ protected final void createDevTools(CefBrowser_N parent, CefClientHandler client if (getNativeRef("CefBrowser") == 0 && !isPending_) { try { isPending_ = N_CreateDevTools( - parent, clientHandler, windowHandle, osr, transparent, inspectAt); + parent, clientHandler, windowHandle, osr, transparent, null, inspectAt); } catch (UnsatisfiedLinkError err) { err.printStackTrace(); }