Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
1zun4 committed Mar 12, 2024
1 parent e644ee7 commit 321fea3
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 42 deletions.
2 changes: 0 additions & 2 deletions .github/workflows/build-jcef.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: |
Expand Down Expand Up @@ -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: |
Expand Down
32 changes: 4 additions & 28 deletions java/org/cef/CefClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*/
Expand Down
4 changes: 1 addition & 3 deletions java/org/cef/browser/CefBrowserFactory.java
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
12 changes: 4 additions & 8 deletions java/org/cef/browser/CefBrowserOsr.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;

/**
Expand All @@ -40,8 +38,8 @@ public class CefBrowserOsr extends CefBrowser_N implements CefRenderHandler {
private CopyOnWriteArrayList<Consumer<CefPaintEvent>> 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);
}

Expand All @@ -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
Expand Down Expand Up @@ -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();
Expand Down
2 changes: 1 addition & 1 deletion java/org/cef/browser/CefBrowser_N.java
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
Expand Down

0 comments on commit 321fea3

Please sign in to comment.