mirror of
https://github.com/electron/electron.git
synced 2026-01-09 15:38:08 -05:00
chore: bump chromium to 145.0.7577.0 (main) (#49175)
* chore: bump chromium in DEPS to 145.0.7572.0 * chore: update patches (trivial only) * chore(patch-conflict): feat_filter_out_non-shareable_windows_in_the_current_application_in.patch Polished the edits and formatted the result. No real changes. Ref: https://chromium-review.googlesource.com/c/chromium/src/+/7232079 "7232079: Use WindowsToExclude to exclude PiP window in macOS screencapture device" * chore(patch-conflict): feat_add_support_for_missing_dialog_features_to_shell_dialogs.patch Ref: https://chromium-review.googlesource.com/c/chromium/src/+/7214586 "7214586: Refactor SelectFileDialogLinuxPortal to request XDG portal on demand" Ref: https://chromium-review.googlesource.com/c/chromium/src/+/7237910 "7237910: Remove g_gtk_ui global" * 7228586: Migrate SystemMemoryInfo from ByteCount to ByteSize Ref: https://chromium-review.googlesource.com/c/chromium/src/+/7228586 * 7207583: GlobalRenderFrameHostId to ChildProcessId Ref: https://chromium-review.googlesource.com/c/chromium/src/+/7207583 * 7205548: Remove uses of BodyAsStringCallbackDeprecated (extensions/) Ref: https://chromium-review.googlesource.com/c/chromium/src/+/7205548 * chore: bump chromium in DEPS to 145.0.7574.0 * chore: update libc++ filenames * chore: update patches (trivial only) * chore(patch-conflict): feat_filter_out_non-shareable_windows_in_the_current_application_in.patch Ref: https://chromium-review.googlesource.com/c/chromium/src/+/7246150 "7246150: Fix crash in ScreenCaptureKitDeviceMac due to null PIPScreenCaptureCoordinator" * fixup! chore(patch-conflict): feat_add_support_for_missing_dialog_features_to_shell_dialogs.patch * fixup! chore(patch-conflict): feat_filter_out_non-shareable_windows_in_the_current_application_in.patch * 7239572: [OOPIF PDF] Enable OOPIF PDF by default on Windows/macOS/Linux Ref: https://chromium-review.googlesource.com/c/chromium/src/+/7239572 * chore: bump chromium in DEPS to 145.0.7576.0 * fixup! chore(patch-conflict): feat_add_support_for_missing_dialog_features_to_shell_dialogs.patch * chore: update patches (trivial only) * chore: add note to keep patch that was upstreamed but reverted fix_restore_original_resize_performance_on_macos.patch was organically upstreamed but that change got reverted just after the current roll's cutoff. I've added a note in the patch contents so the patch sticks around and so we can keep it after the revert is included. Ref: https://chromium-review.googlesource.com/c/chromium/src/+/7255334 "7255334: Revert 'Fix jank when resizing browser window'" * chore: bump chromium in DEPS to 145.0.7577.0 * chore: update patches (trivial only) * chore(patch-conflict): keep patch after revert Ref: https://chromium-review.googlesource.com/c/chromium/src/+/7255334 "7255334: Revert 'Fix jank when resizing browser window'" * 7237910: Remove g_gtk_ui global I tried to find a way to avoid the patch, but other approaches seemed complex and involved. Ref: https://chromium-review.googlesource.com/c/chromium/src/+/7237910 * 7251900: Reland "Remove callback_helpers.h include from is_callback.h (try 5)" Ref: https://chromium-review.googlesource.com/c/chromium/src/+/7251900 * 7170174: [LNA] Retry requests for cached local resources Ref: https://chromium-review.googlesource.com/c/chromium/src/+/7170174 * fix: PDFs use OOPIF (behavior change) * fixup! 7237910: Remove g_gtk_ui global * fixup! 7251900: Reland "Remove callback_helpers.h include from is_callback.h (try 5)" --------- Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com> Co-authored-by: clavin <clavin@electronjs.org>
This commit is contained in:
committed by
GitHub
parent
e181fd040f
commit
a90ccc753b
@@ -7,6 +7,7 @@
|
||||
#include <utility>
|
||||
|
||||
#include "base/functional/bind.h"
|
||||
#include "base/functional/callback_helpers.h"
|
||||
#include "base/memory/ptr_util.h"
|
||||
#include "content/public/browser/browser_task_traits.h"
|
||||
#include "content/public/browser/browser_thread.h"
|
||||
|
||||
@@ -26,25 +26,23 @@ void ElectronPDFDocumentHelperClient::UpdateContentRestrictions(
|
||||
// second time it is called is when loading is finished and if printing is
|
||||
// allowed there won't be a printing restriction passed, so we can use this
|
||||
// second call to notify that the pdf document is ready to print.
|
||||
if (!(content_restrictions & chrome_pdf::kContentRestrictionPrint)) {
|
||||
// It's a WebView - emit the event on the WebView webContents.
|
||||
auto* guest_view = extensions::MimeHandlerViewGuest::FromRenderFrameHost(
|
||||
render_frame_host);
|
||||
if (guest_view) {
|
||||
auto* gv_api_wc =
|
||||
electron::api::WebContents::From(guest_view->embedder_web_contents());
|
||||
if (gv_api_wc)
|
||||
gv_api_wc->PDFReadyToPrint();
|
||||
return;
|
||||
}
|
||||
if (content_restrictions & chrome_pdf::kContentRestrictionPrint) {
|
||||
return;
|
||||
}
|
||||
|
||||
auto* wc = content::WebContents::FromRenderFrameHost(render_frame_host);
|
||||
if (wc) {
|
||||
auto* api_wc =
|
||||
electron::api::WebContents::From(wc->GetOuterWebContents());
|
||||
if (api_wc)
|
||||
api_wc->PDFReadyToPrint();
|
||||
}
|
||||
// If it's a WebView, emit the event on the WebView's webContents
|
||||
auto* guest_view =
|
||||
extensions::MimeHandlerViewGuest::FromRenderFrameHost(render_frame_host);
|
||||
auto* wc = guest_view
|
||||
? guest_view->embedder_web_contents()
|
||||
: content::WebContents::FromRenderFrameHost(render_frame_host);
|
||||
if (!wc) {
|
||||
return;
|
||||
}
|
||||
|
||||
auto* api_wc = electron::api::WebContents::From(wc);
|
||||
if (api_wc) {
|
||||
api_wc->PDFReadyToPrint();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -75,8 +75,11 @@ class ElectronPermissionManager::PendingRequest {
|
||||
const auto permission = blink::PermissionDescriptorToPermissionType(
|
||||
permissions_[permission_id]);
|
||||
if (permission == blink::PermissionType::MIDI_SYSEX) {
|
||||
// TODO: remove `GetUnsafeValue()` once `GrantSendMidiSysExMessage`
|
||||
// accepts `ChildProcessId`
|
||||
content::ChildProcessSecurityPolicy::GetInstance()
|
||||
->GrantSendMidiSysExMessage(render_frame_host_id_.child_id);
|
||||
->GrantSendMidiSysExMessage(
|
||||
render_frame_host_id_.child_id.GetUnsafeValue());
|
||||
} else if (permission == blink::PermissionType::GEOLOCATION) {
|
||||
ElectronBrowserMainParts::Get()
|
||||
->GetGeolocationControl()
|
||||
|
||||
@@ -109,7 +109,7 @@ std::vector<mojom::JSSourcePtr> FileSourcesToJSSources(
|
||||
js_sources.reserve(file_sources.size());
|
||||
for (auto& file_source : file_sources) {
|
||||
js_sources.push_back(mojom::JSSource::New(
|
||||
std::move(*file_source.data),
|
||||
std::move(file_source.data),
|
||||
extension.ResolveExtensionURL(file_source.file_name)));
|
||||
}
|
||||
|
||||
@@ -125,7 +125,7 @@ std::vector<mojom::CSSSourcePtr> FileSourcesToCSSSources(
|
||||
css_sources.reserve(file_sources.size());
|
||||
for (auto& file_source : file_sources) {
|
||||
css_sources.push_back(mojom::CSSSource::New(
|
||||
std::move(*file_source.data),
|
||||
std::move(file_source.data),
|
||||
InjectionKeyForFile(
|
||||
host_id, extension.ResolveExtensionURL(file_source.file_name))));
|
||||
}
|
||||
|
||||
@@ -66,6 +66,7 @@ class URLLoaderNetworkObserver
|
||||
mojo::PendingRemote<network::mojom::ClientCertificateResponder>
|
||||
client_cert_responder) override {}
|
||||
void OnLocalNetworkAccessPermissionRequired(
|
||||
network::mojom::TransportType transport_type,
|
||||
OnLocalNetworkAccessPermissionRequiredCallback callback) override {}
|
||||
void OnUrlLoaderConnectedToPrivateNetwork(
|
||||
const GURL& request_url,
|
||||
|
||||
@@ -42,12 +42,21 @@ base::flat_map<int, GtkWidget*>& GetDialogsMap() {
|
||||
return *dialogs;
|
||||
}
|
||||
|
||||
gtk::GtkUiPlatform* GetGtkUiPlatform() {
|
||||
auto* linux_ui = ui::LinuxUi::instance();
|
||||
auto* gtk_ui = static_cast<gtk::GtkUi*>(linux_ui);
|
||||
gtk::GtkUiPlatform* platform = gtk_ui->GetPlatform();
|
||||
DCHECK(platform);
|
||||
return platform;
|
||||
}
|
||||
|
||||
class GtkMessageBox : private NativeWindowObserver {
|
||||
public:
|
||||
explicit GtkMessageBox(const MessageBoxSettings& settings)
|
||||
: id_(settings.id),
|
||||
cancel_id_(settings.cancel_id),
|
||||
parent_(static_cast<NativeWindow*>(settings.parent_window)) {
|
||||
parent_(static_cast<NativeWindow*>(settings.parent_window)),
|
||||
platform_(GetGtkUiPlatform()) {
|
||||
// Create dialog.
|
||||
dialog_ =
|
||||
gtk_message_dialog_new(nullptr, // parent
|
||||
@@ -109,7 +118,8 @@ class GtkMessageBox : private NativeWindowObserver {
|
||||
if (parent_) {
|
||||
parent_->AddObserver(this);
|
||||
static_cast<NativeWindowViews*>(parent_)->SetEnabled(false);
|
||||
gtk::SetGtkTransientForAura(dialog_, parent_->GetNativeWindow());
|
||||
gtk::SetGtkTransientForAura(dialog_, parent_->GetNativeWindow(),
|
||||
platform_);
|
||||
gtk_window_set_modal(GTK_WINDOW(dialog_), TRUE);
|
||||
}
|
||||
}
|
||||
@@ -160,7 +170,7 @@ class GtkMessageBox : private NativeWindowObserver {
|
||||
|
||||
void Show() {
|
||||
gtk_widget_show(dialog_);
|
||||
gtk::GtkUi::GetPlatform()->ShowGtkWindow(GTK_WINDOW(dialog_));
|
||||
platform_->ShowGtkWindow(GTK_WINDOW(dialog_));
|
||||
}
|
||||
|
||||
int RunSynchronous() {
|
||||
@@ -202,6 +212,7 @@ class GtkMessageBox : private NativeWindowObserver {
|
||||
RAW_PTR_EXCLUSION GtkWidget* dialog_;
|
||||
MessageBoxCallback callback_;
|
||||
std::vector<ScopedGSignal> signals_;
|
||||
raw_ptr<gtk::GtkUiPlatform> platform_;
|
||||
};
|
||||
|
||||
void GtkMessageBox::OnResponseDialog(GtkWidget* widget, int response) {
|
||||
|
||||
@@ -105,6 +105,7 @@ class SimpleURLLoaderWrapper final
|
||||
mojo::PendingRemote<network::mojom::ClientCertificateResponder>
|
||||
client_cert_responder) override {}
|
||||
void OnLocalNetworkAccessPermissionRequired(
|
||||
network::mojom::TransportType transport_type,
|
||||
OnLocalNetworkAccessPermissionRequiredCallback callback) override {}
|
||||
void OnClearSiteData(
|
||||
const GURL& url,
|
||||
|
||||
@@ -178,7 +178,7 @@ v8::Local<v8::Value> ElectronBindings::GetSystemMemoryInfo(
|
||||
dict.Set("total", mem_info.total.InKiB());
|
||||
|
||||
// See Chromium's "base/process/process_metrics.h" for an explanation.
|
||||
base::ByteCount free =
|
||||
base::ByteSize free =
|
||||
#if BUILDFLAG(IS_WIN)
|
||||
mem_info.avail_phys;
|
||||
#else
|
||||
|
||||
Reference in New Issue
Block a user