Skip to content

Commit 7a13412

Browse files
S1artiemagreenblatt
authored andcommitted
Update to CEF 126.2.0+g5c56e98+chromium-126.0.6478.62
1 parent 38becac commit 7a13412

18 files changed

+90
-60
lines changed

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ set_property(GLOBAL PROPERTY OS_FOLDERS ON)
130130

131131
# Specify the CEF distribution version.
132132
if(NOT DEFINED CEF_VERSION)
133-
set(CEF_VERSION "122.1.10+gc902316+chromium-122.0.6261.112")
133+
set(CEF_VERSION "126.2.0+g5c56e98+chromium-126.0.6478.62")
134134
endif()
135135

136136
# Determine the platform.

java/org/cef/CefClient.java

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -280,10 +280,11 @@ public void removeDialogHandler() {
280280

281281
@Override
282282
public boolean onFileDialog(CefBrowser browser, FileDialogMode mode, String title,
283-
String defaultFilePath, Vector<String> acceptFilters, CefFileDialogCallback callback) {
283+
String defaultFilePath, Vector<String> acceptFilters, Vector<String> acceptExtensions,
284+
Vector<String> acceptDescriptions, CefFileDialogCallback callback) {
284285
if (dialogHandler_ != null && browser != null) {
285-
return dialogHandler_.onFileDialog(
286-
browser, mode, title, defaultFilePath, acceptFilters, callback);
286+
return dialogHandler_.onFileDialog(browser, mode, title, defaultFilePath, acceptFilters,
287+
acceptExtensions, acceptDescriptions, callback);
287288
}
288289
return false;
289290
}
@@ -371,10 +372,12 @@ public void removeDownloadHandler() {
371372
}
372373

373374
@Override
374-
public void onBeforeDownload(CefBrowser browser, CefDownloadItem downloadItem,
375+
public boolean onBeforeDownload(CefBrowser browser, CefDownloadItem downloadItem,
375376
String suggestedName, CefBeforeDownloadCallback callback) {
376377
if (downloadHandler_ != null && browser != null)
377-
downloadHandler_.onBeforeDownload(browser, downloadItem, suggestedName, callback);
378+
return downloadHandler_.onBeforeDownload(
379+
browser, downloadItem, suggestedName, callback);
380+
return false;
378381
}
379382

380383
@Override
@@ -849,8 +852,10 @@ public boolean onCertificateError(
849852
}
850853

851854
@Override
852-
public void onRenderProcessTerminated(CefBrowser browser, TerminationStatus status) {
853-
if (requestHandler_ != null) requestHandler_.onRenderProcessTerminated(browser, status);
855+
public void onRenderProcessTerminated(
856+
CefBrowser browser, TerminationStatus status, int error_code, String error_string) {
857+
if (requestHandler_ != null)
858+
requestHandler_.onRenderProcessTerminated(browser, status, error_code, error_string);
854859
}
855860

856861
// CefWindowHandler

java/org/cef/handler/CefDialogHandler.java

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,17 @@ enum FileDialogMode {
3838
* "image/*"), (b) individual file extensions (e.g. ".txt" or ".png"), or (c)
3939
* combined description and file extension delimited using "|" and ";" (e.g.
4040
* "Image Types|.png;.gif;.jpg").
41+
* @param acceptExtensions provides the semicolon-delimited expansion of MIME
42+
* types to file extensions (if known, or empty string otherwise).
43+
* @param acceptDescriptions provides the descriptions for MIME types (if known,
44+
* or empty string otherwise). For example, the "image/*" mime type might
45+
* have extensions ".png;.jpg;.bmp;..." and description "Image Files".
4146
* @param callback is a callback handler for handling own file dialogs.
4247
*
4348
* @return To display a custom dialog return true and execute callback.
4449
* To display the default dialog return false.
4550
*/
4651
public boolean onFileDialog(CefBrowser browser, FileDialogMode mode, String title,
47-
String defaultFilePath, Vector<String> acceptFilters, CefFileDialogCallback callback);
52+
String defaultFilePath, Vector<String> acceptFilters, Vector<String> acceptExtensions,
53+
Vector<String> acceptDescriptions, CefFileDialogCallback callback);
4854
}

java/org/cef/handler/CefDownloadHandler.java

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,17 +15,19 @@
1515
*/
1616
public interface CefDownloadHandler {
1717
/**
18-
* Called before a download begins. By default the download will be canceled.
19-
* Execute callback either asynchronously or in this method to continue the download
20-
* if desired.
18+
* Called before a download begins. Return true and execute |callback| either
19+
* asynchronously or in this method to continue or cancel the download.
20+
* Return false to proceed with default handling (cancel with Alloy style,
21+
* download shelf with Chrome style). Do not keep a reference to
22+
* downloadItem outside of this method.
2123
*
2224
* @param browser The desired browser.
2325
* @param downloadItem The item to be downloaded. Do not keep a reference to it outside this
2426
* method.
2527
* @param suggestedName is the suggested name for the download file.
2628
* @param callback start the download by calling the Continue method
2729
*/
28-
public void onBeforeDownload(CefBrowser browser, CefDownloadItem downloadItem,
30+
public boolean onBeforeDownload(CefBrowser browser, CefDownloadItem downloadItem,
2931
String suggestedName, CefBeforeDownloadCallback callback);
3032

3133
/**

java/org/cef/handler/CefDownloadHandlerAdapter.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,10 @@
1616
*/
1717
public abstract class CefDownloadHandlerAdapter implements CefDownloadHandler {
1818
@Override
19-
public void onBeforeDownload(CefBrowser browser, CefDownloadItem downloadItem,
20-
String suggestedName, CefBeforeDownloadCallback callback) {}
19+
public boolean onBeforeDownload(CefBrowser browser, CefDownloadItem downloadItem,
20+
String suggestedName, CefBeforeDownloadCallback callback) {
21+
return false;
22+
}
2123

2224
@Override
2325
public void onDownloadUpdated(

java/org/cef/handler/CefLoadHandler.java

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -213,13 +213,6 @@ enum ErrorCode {
213213
ERR_INVALID_WEB_BUNDLE(-505),
214214
ERR_TRUST_TOKEN_OPERATION_FAILED(-506),
215215
ERR_TRUST_TOKEN_OPERATION_SUCCESS_WITHOUT_SENDING_REQUEST(-507),
216-
ERR_FTP_FAILED(-601),
217-
ERR_FTP_SERVICE_UNAVAILABLE(-602),
218-
ERR_FTP_TRANSFER_ABORTED(-603),
219-
ERR_FTP_FILE_BUSY(-604),
220-
ERR_FTP_SYNTAX_ERROR(-605),
221-
ERR_FTP_COMMAND_NOT_SUPPORTED(-606),
222-
ERR_FTP_BAD_COMMAND_SEQUENCE(-607),
223216
ERR_PKCS12_IMPORT_BAD_PASSWORD(-701),
224217
ERR_PKCS12_IMPORT_FAILED(-702),
225218
ERR_IMPORT_CA_CERT_NOT_CA(-703),

java/org/cef/handler/CefRequestHandler.java

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,9 @@ enum TerminationStatus {
2424
TS_ABNORMAL_TERMINATION, //!< Non-zero exit status.
2525
TS_PROCESS_WAS_KILLED, //!< SIGKILL or task manager kill.
2626
TS_PROCESS_CRASHED, //!< Segmentation fault.
27-
TS_PROCESS_OOM //!< Out of memory.
27+
TS_PROCESS_OOM, //!< Out of memory.
28+
TS_LAUNCH_FAILED, //!< Failed to launch.
29+
TS_INTEGRITY_FAILURE //!< Integrity check failed.
2830
}
2931

3032
/**
@@ -123,6 +125,9 @@ boolean onCertificateError(CefBrowser browser, CefLoadHandler.ErrorCode cert_err
123125
* Called on the browser process UI thread when the render process terminates unexpectedly.
124126
* @param browser The corresponding browser.
125127
* @param status Indicates how the process was terminated.
128+
* @param error_code The process error code.
129+
* @param error_string A string description of the error.
126130
*/
127-
void onRenderProcessTerminated(CefBrowser browser, TerminationStatus status);
131+
void onRenderProcessTerminated(
132+
CefBrowser browser, TerminationStatus status, int error_code, String error_string);
128133
}

java/org/cef/handler/CefRequestHandlerAdapter.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,5 +51,6 @@ public boolean onCertificateError(
5151
}
5252

5353
@Override
54-
public void onRenderProcessTerminated(CefBrowser browser, TerminationStatus status) {}
54+
public void onRenderProcessTerminated(
55+
CefBrowser browser, TerminationStatus status, int error_code, String error_string) {}
5556
}

java/tests/detailed/dialog/DownloadDialog.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,13 +143,15 @@ void update(CefDownloadItem downloadItem, CefDownloadItemCallback callback) {
143143
}
144144

145145
@Override
146-
public void onBeforeDownload(CefBrowser browser, CefDownloadItem downloadItem,
146+
public boolean onBeforeDownload(CefBrowser browser, CefDownloadItem downloadItem,
147147
String suggestedName, CefBeforeDownloadCallback callback) {
148148
callback.Continue(suggestedName, true);
149149

150150
DownloadObject dlObject = new DownloadObject(downloadItem, suggestedName);
151151
downloadObjects_.put(downloadItem.getId(), dlObject);
152152
downloadPanel_.add(dlObject);
153+
154+
return true;
153155
}
154156

155157
@Override

java/tests/detailed/handler/RequestHandler.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,9 @@ public boolean onCertificateError(
161161
}
162162

163163
@Override
164-
public void onRenderProcessTerminated(CefBrowser browser, TerminationStatus status) {
165-
System.out.println("render process terminated: " + status);
164+
public void onRenderProcessTerminated(
165+
CefBrowser browser, TerminationStatus status, int error_code, String error_string) {
166+
System.out.println("render process terminated: " + status + " errorCode: " + error_code
167+
+ " errorString: " + error_string);
166168
}
167169
}

0 commit comments

Comments
 (0)