Skip to content

Chrome 135 #22

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 21 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
8ff2de3
Update to CEF version 119.4.3+gc76a3b9+chromium-119.0.6045.159
S1artie Nov 27, 2023
1fdf12d
Update to CEF version 119.4.7+g55e15c8+chromium-119.0.6045.199
magreenblatt Jan 5, 2024
beb9336
Fix HTTP auth credential request forwarding of realm and scheme params
S1artie Jan 9, 2024
812891b
Add CefFrame.selectAll (fixes #428)
antoineveldhoven Jan 9, 2024
566dc4e
Add CefDevToolsClient
Jan 11, 2024
ade64c3
Add rendered image callback for CefBrowserOsr/CefRenderer (fixes #432)
Osiris-Team Jan 11, 2024
423f5b8
Add CefBrowserSettings.windowless_frame_rate (see #459)
1fxe Jan 11, 2024
b5612ba
Fix UnsatisfiedLinkError with CefRegistration_N
Jan 15, 2024
3df5f07
Add CefDisplayHandler.onFullscreenModeChange callback (fixes #239)
millosr Jan 19, 2024
e75a3c0
Update to CEF 121.3.9+g1e0a38f+chromium-121.0.6167.184
S1artie Mar 4, 2024
0b8e42e
Update to CEF 122.1.10+gc902316+chromium-122.0.6261.112
S1artie Mar 7, 2024
ea25085
Fix CefDisplayHandler.onFullscreenModeChange name (see #239)
VladRassokhin Mar 20, 2024
214b072
Add two flags to CefPdfPrintSettings
May 22, 2024
38becac
CefApp.getInstance: Support switch values containing '=' (fixes #470)
May 22, 2024
7a13412
Update to CEF 126.2.0+g5c56e98+chromium-126.0.6478.62
S1artie Jun 19, 2024
99c2f7a
Update to CEF 127.3.1+g6cbb30e+chromium-127.0.6533.100
Rigner Aug 13, 2024
8b4225a
Fix Java signature for CefRequestHandler#onRenderProcessTerminated me…
dcernoch-up Oct 16, 2024
7e0ef9d
Update to CEF 130.1.9+gfc42567+chromium-130.0.6723.70
S1artie Nov 11, 2024
1770317
Update to CEF 132.3.1+g144febe+chromium-132.0.6834.83
S1artie Feb 4, 2025
ca49ada
Update to CEF 135.0.20+ge7de5c3+chromium-135.0.7049.85
S1artie Apr 22, 2025
a7b6934
Merge remote-tracking branch 'chromiumembedded/master' into chromiume…
mathhulk Jun 11, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ endif()

# Specify the CEF distribution version.
if(NOT DEFINED CEF_VERSION)
set(CEF_VERSION "116.0.27+gd8c85ac+chromium-116.0.5845.190")
set(CEF_VERSION "135.0.20+ge7de5c3+chromium-135.0.7049.85")
endif()

# Determine the platform.
Expand Down
16 changes: 12 additions & 4 deletions java/org/cef/CefApp.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,7 @@
import org.cef.handler.CefAppHandler;
import org.cef.handler.CefAppHandlerAdapter;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.io.File;
import java.io.FilenameFilter;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.util.HashSet;
Expand Down Expand Up @@ -102,6 +99,12 @@ public enum CefAppState {
*/
INITIALIZED,

/**
* CEF initialization has failed (for example due to a second process using
* the same root_cache_path).
*/
INITIALIZATION_FAILED,

/**
* CefApp is in its shutdown process. All CefClients and CefBrowser
* instances will be disposed. No new CefClient or CefBrowser is allowed to
Expand Down Expand Up @@ -272,6 +275,7 @@ public synchronized final void dispose() {
case NONE:
case SHUTTING_DOWN:
case TERMINATED:
case INITIALIZATION_FAILED:
// Ignore shutdown, CefApp is already terminated, in shutdown progress
// or was never created (shouldn't be possible)
break;
Expand Down Expand Up @@ -384,7 +388,11 @@ private final void initialize() {
settings.locales_dir_path = localesPath.normalize().toAbsolutePath().toString();
}

if (N_Initialize(appHandler_, settings)) setState(CefAppState.INITIALIZED);
if (N_Initialize(appHandler_, settings)) {
setState(CefAppState.INITIALIZED);
} else {
setState(CefAppState.INITIALIZATION_FAILED);
}
}

/**
Expand Down
31 changes: 31 additions & 0 deletions java/org/cef/CefBrowserSettings.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
// Copyright (c) 2024 The Chromium Embedded Framework Authors. All rights
// reserved. Use of this source code is governed by a BSD-style license that
// can be found in the LICENSE file.

package org.cef;

/**
* Browser initialization settings. Specify NULL or 0 to get the recommended
* default values. The consequences of using custom values may not be well
* tested. Many of these and other settings can also configured using command-
* line switches.
*/
public class CefBrowserSettings {
/**
* The maximum rate in frames per second (fps) that CefRenderHandler::OnPaint
* will be called for a windowless browser. The actual fps may be lower if
* the browser cannot generate frames at the requested rate. The minimum
* value is 1 and the maximum value is 60 (default 30). This value can also
* be changed dynamically via {@code CefBrowser#setWindowlessFrameRate}
*/
public int windowless_frame_rate = 0;

public CefBrowserSettings() {}

@Override
public CefBrowserSettings clone() {
CefBrowserSettings tmp = new CefBrowserSettings();
tmp.windowless_frame_rate = windowless_frame_rate;
return tmp;
}
}
60 changes: 40 additions & 20 deletions java/org/cef/CefClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,7 @@

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.browser.*;
import org.cef.callback.CefAuthCallback;
import org.cef.callback.CefBeforeDownloadCallback;
import org.cef.callback.CefCallback;
Expand All @@ -25,20 +21,15 @@
import org.cef.misc.*;
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.nio.ByteBuffer;
import java.util.Collection;
import java.util.HashMap;
import java.util.Vector;

import javax.swing.SwingUtilities;
import java.util.function.Consumer;

/**
* Client that owns a browser and renderer.
Expand Down Expand Up @@ -91,13 +82,22 @@ public CefBrowser createBrowser(String url, boolean isTransparent,
CefRequestContext context) {
if (isDisposed_)
throw new IllegalStateException("Can't create browser. CefClient is disposed");
return CefBrowserFactory.create(this, url, isTransparent, context);
return CefBrowserFactory.create(
this, url, isTransparent, context, null);
}

public CefBrowser createBrowser(String url, boolean isTransparent,
CefRequestContext context, CefBrowserSettings settings) {
if (isDisposed_)
throw new IllegalStateException("Can't create browser. CefClient is disposed");
return CefBrowserFactory.create(
this, url, isTransparent, context, settings);
}

@Override
protected CefBrowser getBrowser(int identifier) {
synchronized (browser_) {
return browser_.get(new Integer(identifier));
return browser_.get(Integer.valueOf(identifier));
}
}

Expand Down Expand Up @@ -229,10 +229,11 @@ public void removeDialogHandler() {

@Override
public boolean onFileDialog(CefBrowser browser, FileDialogMode mode, String title,
String defaultFilePath, Vector<String> acceptFilters, CefFileDialogCallback callback) {
String defaultFilePath, Vector<String> acceptFilters, Vector<String> acceptExtensions,
Vector<String> acceptDescriptions, CefFileDialogCallback callback) {
if (dialogHandler_ != null && browser != null) {
return dialogHandler_.onFileDialog(
browser, mode, title, defaultFilePath, acceptFilters, callback);
return dialogHandler_.onFileDialog(browser, mode, title, defaultFilePath, acceptFilters,
acceptExtensions, acceptDescriptions, callback);
}
return false;
}
Expand Down Expand Up @@ -260,6 +261,12 @@ public void onTitleChange(CefBrowser browser, String title) {
displayHandler_.onTitleChange(browser, title);
}

@Override
public void onFullscreenModeChange(CefBrowser browser, boolean fullscreen) {
if (displayHandler_ != null && browser != null)
displayHandler_.onFullscreenModeChange(browser, fullscreen);
}

@Override
public boolean onTooltip(CefBrowser browser, String text) {
if (displayHandler_ != null && browser != null) {
Expand Down Expand Up @@ -314,10 +321,12 @@ public void removeDownloadHandler() {
}

@Override
public void onBeforeDownload(CefBrowser browser, CefDownloadItem downloadItem,
public boolean onBeforeDownload(CefBrowser browser, CefDownloadItem downloadItem,
String suggestedName, CefBeforeDownloadCallback callback) {
if (downloadHandler_ != null && browser != null)
downloadHandler_.onBeforeDownload(browser, downloadItem, suggestedName, callback);
return downloadHandler_.onBeforeDownload(
browser, downloadItem, suggestedName, callback);
return false;
}

@Override
Expand Down Expand Up @@ -684,6 +693,15 @@ public void onPaint(CefBrowser browser, boolean popup, Rectangle[] dirtyRects,
realHandler.onPaint(browser, popup, dirtyRects, buffer, width, height);
}

@Override
public void addOnPaintListener(Consumer<CefPaintEvent> listener) {}

@Override
public void setOnPaintListener(Consumer<CefPaintEvent> listener) {}

@Override
public void removeOnPaintListener(Consumer<CefPaintEvent> listener) {}

@Override
public boolean startDragging(CefBrowser browser, CefDragData dragData, int mask, int x, int y) {
if (browser == null) return false;
Expand Down Expand Up @@ -759,8 +777,10 @@ public boolean onCertificateError(
}

@Override
public void onRenderProcessTerminated(CefBrowser browser, TerminationStatus status) {
if (requestHandler_ != null) requestHandler_.onRenderProcessTerminated(browser, status);
public void onRenderProcessTerminated(
CefBrowser browser, TerminationStatus status, int error_code, String error_string) {
if (requestHandler_ != null)
requestHandler_.onRenderProcessTerminated(browser, status, error_code, error_string);
}

// CefWindowHandler
Expand Down
42 changes: 31 additions & 11 deletions java/org/cef/CefSettings.java
Original file line number Diff line number Diff line change
Expand Up @@ -106,10 +106,39 @@ public ColorType clone() {
* The location where cache data will be stored on disk. If empty an in-memory
* cache will be used for some features and a temporary disk cache for others.
* HTML5 databases such as localStorage will only persist across sessions if a
* cache path is specified.
* cache path is specified. If this is set and root_cache_path is also set, the cache_path
* directory must reside within root_cache_path.
*/
public String cache_path = null;

/**
* The root directory for installation-specific data and the parent directory
* for profile-specific data. All CefSettings.cache_path and
* CefRequestContextSettings.cache_path values must have this parent
* directory in common. If this value is empty and CefSettings.cache_path is
* non-empty then it will default to the CefSettings.cache_path value. Any
* non-empty value must be an absolute path. If both values are empty then
* the default platform-specific directory will be used
* ("~/.config/cef_user_data" directory on Linux, "~/Library/Application
* Support/CEF/User Data" directory on MacOS, "AppData\Local\CEF\User Data"
* directory under the user profile directory on Windows). Use of the default
* directory is not recommended in production applications (see below).
*
* Multiple application instances writing to the same root_cache_path
* directory could result in data corruption. A process singleton lock based
* on the root_cache_path value is therefore used to protect against this.
* This singleton behavior applies to all CEF-based applications using
* version 120 or newer. You should customize root_cache_path for your
* application and implement CefAppHandler::
* onAlreadyRunningAppRelaunch, which will then be called on any app relaunch
* with the same root_cache_path value.
*
* Failure to set the root_cache_path value correctly may result in startup
* crashes or other unexpected behaviors (for example, the sandbox blocking
* read/write access to certain files).
*/
public String root_cache_path = null;

/**
* To persist session cookies (cookies without an expiry date or validity
* interval) by default when using the global cookie manager set this value to
Expand Down Expand Up @@ -185,15 +214,6 @@ public ColorType clone() {
*/
public String locales_dir_path = null;

/**
* Set to true to disable loading of pack files for resources and locales.
* A resource bundle handler must be provided for the browser and render
* processes via CefApp::GetResourceBundleHandler() if loading of pack files
* is disabled. Also configurable using the "disable-pack-loading" command-
* line switch.
*/
public boolean pack_loading_disabled = false;

/**
* Set to a value between 1024 and 65535 to enable remote debugging on the
* specified port. For example, if 8080 is specified the remote debugging URL
Expand Down Expand Up @@ -245,6 +265,7 @@ public CefSettings clone() {
tmp.windowless_rendering_enabled = windowless_rendering_enabled;
tmp.command_line_args_disabled = command_line_args_disabled;
tmp.cache_path = cache_path;
tmp.root_cache_path = root_cache_path;
tmp.persist_session_cookies = persist_session_cookies;
tmp.user_agent = user_agent;
tmp.user_agent_product = user_agent_product;
Expand All @@ -254,7 +275,6 @@ public CefSettings clone() {
tmp.javascript_flags = javascript_flags;
tmp.resources_dir_path = resources_dir_path;
tmp.locales_dir_path = locales_dir_path;
tmp.pack_loading_disabled = pack_loading_disabled;
tmp.remote_debugging_port = remote_debugging_port;
tmp.uncaught_exception_stack_size = uncaught_exception_stack_size;
if (background_color != null) tmp.background_color = background_color.clone();
Expand Down
4 changes: 3 additions & 1 deletion java/org/cef/SystemBootstrap.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@ public class SystemBootstrap {
/**
* Simple interface for how a library by name should be loaded.
*/
static public interface Loader { public void loadLibrary(String libname); }
static public interface Loader {
public void loadLibrary(String libname);
}

/**
* Default implementation is to call System.loadLibrary
Expand Down
54 changes: 44 additions & 10 deletions java/org/cef/browser/CefBrowser.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
import org.cef.misc.CefPdfPrintSettings;
import org.cef.network.CefRequest;

import java.awt.Component;
import java.awt.Point;
import java.awt.image.BufferedImage;
import java.util.Vector;
Expand Down Expand Up @@ -119,20 +118,20 @@ public interface CefBrowser {
* @param identifier The unique frame identifier
* @return The frame or NULL if not found
*/
public CefFrame getFrame(long identifier);
public CefFrame getFrameByIdentifier(String identifier);

/**
* Returns the frame with the specified name, or NULL if not found.
* @param name The specified name
* @return The frame or NULL if not found
*/
public CefFrame getFrame(String name);
public CefFrame getFrameByName(String name);

/**
* Returns the identifiers of all existing frames.
* @return All identifiers of existing frames.
*/
public Vector<Long> getFrameIdentifiers();
public Vector<String> getFrameIdentifiers();

/**
* Returns the names of all existing frames.
Expand Down Expand Up @@ -331,18 +330,31 @@ public void runFileDialog(FileDialogMode mode, String title, String defaultFileP
public void stopFinding(boolean clearSelection);

/**
* Get an instance of the dev tools to be displayed in its own window or to be
* embedded within your UI. Only one instance per browser is available.
* Get an instance of the DevTools to be displayed in its own window.
*/
public CefBrowser getDevTools();
public void openDevTools();

/**
* Get an instance of the dev tools to be displayed in its own window or to be
* embedded within your UI. Only one instance per browser is available.
* Open an instance of the DevTools to be displayed in its own window.
*
* @param inspectAt a position in the UI which should be inspected.
*/
public CefBrowser getDevTools(Point inspectAt);
public void openDevTools(Point inspectAt);

/**
* Close the DevTools.
*/
public void closeDevTools();

/**
* Get an instance of a client that can be used to leverage the DevTools
* protocol. Only one instance per browser is available.
*
* @see {@link CefDevToolsClient}
* @return DevTools client, or null if this browser is not yet created
* or if it is closed or closing
*/
public CefDevToolsClient getDevToolsClient();

/**
* If a misspelled word is currently selected in an editable node calling
Expand Down Expand Up @@ -374,4 +386,26 @@ public void runFileDialog(FileDialogMode mode, String title, String defaultFileP
* @throws UnsupportedOperationException if not supported
*/
public CompletableFuture<BufferedImage> createScreenshot(boolean nativeResolution);

/**
* Set the maximum rate in frames per second (fps) that {@code CefRenderHandler::onPaint}
* will be called for a windowless browser. The actual fps may be
* lower if the browser cannot generate frames at the requested rate. The
* minimum value is 1, and the maximum value is 60 (default 30).
*
* @param frameRate the maximum frame rate
* @throws UnsupportedOperationException if not supported
*/
public void setWindowlessFrameRate(int frameRate);

/**
* Returns the maximum rate in frames per second (fps) that {@code CefRenderHandler::onPaint}
* will be called for a windowless browser. The actual fps may be lower if the browser cannot
* generate frames at the requested rate. The minimum value is 1, and the maximum value is 60
* (default 30).
*
* @return the framerate, 0 if an error occurs
* @throws UnsupportedOperationException if not supported
*/
public CompletableFuture<Integer> getWindowlessFrameRate();
}
Loading