chore: bump chromium to 146.0.7645.0 (41-x-y) (#49497)

* chore: bump chromium in DEPS to 146.0.7643.0

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>

* chore: bump chromium in DEPS to 146.0.7645.0

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>

* chore: update patches

Co-authored-by: David Sanders <dsanders11@ucsbalum.com>

* 7402162: Refactor app shims to call ContentMain

Refs https://chromium-review.googlesource.com/c/chromium/src/+/7402162

Co-authored-by: David Sanders <dsanders11@ucsbalum.com>

* 7454282: Add master key management for HTTP Cache Encryption

Refs https://chromium-review.googlesource.com/c/chromium/src/+/7454282

Co-authored-by: David Sanders <dsanders11@ucsbalum.com>

* 7490440: Reland "Delete unused base::Contains()"

Refs https://chromium-review.googlesource.com/c/chromium/src/+/7490440

Co-authored-by: David Sanders <dsanders11@ucsbalum.com>

* chore: update patches

Co-authored-by: David Sanders <dsanders11@ucsbalum.com>

* 7414864: Pass CSSParserLocalContext down to CSSMathExpressionNodeParser

Refs https://chromium-review.googlesource.com/c/chromium/src/+/7414864

Co-authored-by: David Sanders <dsanders11@ucsbalum.com>

* 7460969: Move child_process_id.h to common

Refs https://chromium-review.googlesource.com/c/chromium/src/+/7460969

Co-authored-by: David Sanders <dsanders11@ucsbalum.com>

* 7474608: [api] Remove deprecated v8::PropertyCallbackInfo<T>::This()

Refs https://chromium-review.googlesource.com/c/v8/v8/+/7474608

Co-authored-by: David Sanders <dsanders11@ucsbalum.com>

* 7461067: [Viz] Rename kPreferGpuMemoryBuffer

Refs https://chromium-review.googlesource.com/c/chromium/src/+/7461067

Co-authored-by: David Sanders <dsanders11@ucsbalum.com>

* 7487174: Remove GLHelper

Refs https://chromium-review.googlesource.com/c/chromium/src/+/7487174

Co-authored-by: David Sanders <dsanders11@ucsbalum.com>

* 7457538: Set timeout from multi source page context fetcher

Refs https://chromium-review.googlesource.com/c/chromium/src/+/7457538

Co-authored-by: David Sanders <dsanders11@ucsbalum.com>

---------

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: David Sanders <dsanders11@ucsbalum.com>
This commit is contained in:
trop[bot]
2026-01-26 11:58:09 +01:00
committed by GitHub
parent a77a2ad64f
commit 86196dc588
57 changed files with 400 additions and 224 deletions

View File

@@ -4,11 +4,11 @@
#include "shell/browser/api/electron_api_protocol.h"
#include <algorithm>
#include <string_view>
#include <vector>
#include "base/command_line.h"
#include "base/containers/contains.h"
#include "base/no_destructor.h"
#include "content/common/url_schemes.h"
#include "content/public/browser/child_process_security_policy.h"
@@ -269,7 +269,7 @@ v8::Local<v8::Promise> Protocol::IsProtocolHandled(v8::Isolate* const isolate,
// So we have to test against a hard-coded builtin schemes
// list make it work with old code. We should deprecate
// this API with the new |isProtocolRegistered| API.
base::Contains(kBuiltinSchemes, scheme));
std::ranges::contains(kBuiltinSchemes, scheme));
}
void Protocol::HandleOptionalCallback(gin::Arguments* args, Error error) {

View File

@@ -544,6 +544,28 @@ constexpr std::string_view CursorTypeToString(
}
}
// Refs
// https://source.chromium.org/chromium/chromium/src/+/main:components/page_content_annotations/content/page_context_fetcher.cc;l=206-223;drc=376a51732fd3b17b83451ceb93eea7ad07204798
std::string_view CopyFromSurfaceErrorToString(
content::CopyFromSurfaceError error) {
switch (error) {
case content::CopyFromSurfaceError::kUnknown:
return "Unknown";
case content::CopyFromSurfaceError::kNotImplemented:
return "Not implemented";
case content::CopyFromSurfaceError::kFrameGone:
return "Frame Gone";
case content::CopyFromSurfaceError::kTimeout:
return "Timeout";
case content::CopyFromSurfaceError::kEmbeddingTokenChanged:
return "EmbeddingTokenChanged";
case content::CopyFromSurfaceError::kVizSentEmptyBitmap:
return "VizSentEmptyBitmap";
case content::CopyFromSurfaceError::kUnknownVizError:
return "UnknownVizError";
}
}
base::IDMap<WebContents*>& GetAllWebContents() {
static base::NoDestructor<base::IDMap<WebContents*>> s_all_web_contents;
return *s_all_web_contents;
@@ -561,7 +583,8 @@ void OnCapturePageDone(gin_helper::Promise<gfx::Image> promise,
}
if (!result.has_value()) {
promise.RejectWithErrorMessage(result.error());
promise.RejectWithErrorMessage(
CopyFromSurfaceErrorToString(result.error()));
capture_handle.RunAndReset();
return;
}

View File

@@ -10,7 +10,7 @@
#include <string>
#include "components/keyed_service/core/keyed_service.h"
#include "content/public/browser/child_process_id.h"
#include "content/public/common/child_process_id.h"
#include "mojo/public/cpp/bindings/receiver_set.h"
#include "third_party/blink/public/mojom/badging/badging.mojom.h"
#include "url/gurl.h"

View File

@@ -8,7 +8,6 @@
#include <utility>
#include "base/command_line.h"
#include "base/containers/contains.h"
#include "base/functional/bind.h"
#include "content/public/browser/web_contents.h"
#include "gin/data_object_builder.h"
@@ -153,7 +152,7 @@ void HidChooserController::OnDeviceAdded(
void HidChooserController::OnDeviceRemoved(
const device::mojom::HidDeviceInfo& device) {
if (!base::Contains(items_, PhysicalDeviceIdFromDeviceInfo(device)))
if (!std::ranges::contains(items_, PhysicalDeviceIdFromDeviceInfo(device)))
return;
gin::WeakCell<api::Session>* session = GetSession();
@@ -173,7 +172,7 @@ void HidChooserController::OnDeviceRemoved(
void HidChooserController::OnDeviceChanged(
const device::mojom::HidDeviceInfo& device) {
bool has_chooser_item =
base::Contains(items_, PhysicalDeviceIdFromDeviceInfo(device));
std::ranges::contains(items_, PhysicalDeviceIdFromDeviceInfo(device));
if (!DisplayDevice(device)) {
if (has_chooser_item)
OnDeviceRemoved(device);
@@ -264,8 +263,8 @@ bool HidChooserController::DisplayDevice(
// devices may be displayed if the origin is privileged or the blocklist is
// disabled.
const bool has_fido_collection =
base::Contains(device.collections, device::mojom::kPageFido,
[](const auto& c) { return c->usage->usage_page; });
std::ranges::contains(device.collections, device::mojom::kPageFido,
[](const auto& c) { return c->usage->usage_page; });
if (has_fido_collection) {
if (base::CommandLine::ForCurrentProcess()->HasSwitch(

View File

@@ -8,7 +8,6 @@
#include <string>
#include <vector>
#include "base/containers/contains.h"
#include "base/memory/ptr_util.h"
#include "base/strings/utf_string_conversions.h"
#include "base/values.h"
@@ -692,7 +691,7 @@ int NativeWindow::NonClientHitTest(const gfx::Point& point) {
void NativeWindow::AddDraggableRegionProvider(
DraggableRegionProvider* provider) {
if (!base::Contains(draggable_region_providers_, provider)) {
if (!std::ranges::contains(draggable_region_providers_, provider)) {
draggable_region_providers_.push_back(provider);
}
}

View File

@@ -32,7 +32,6 @@
#include "content/public/browser/context_factory.h"
#include "content/public/browser/gpu_data_manager.h"
#include "content/public/browser/render_process_host.h"
#include "gpu/command_buffer/client/gl_helper.h"
#include "shell/browser/osr/osr_host_display_client.h"
#include "third_party/blink/public/common/input/web_input_event.h"
#include "third_party/skia/include/core/SkCanvas.h"

View File

@@ -77,9 +77,10 @@ OffScreenVideoConsumer::~OffScreenVideoConsumer() = default;
void OffScreenVideoConsumer::SetActive(bool active) {
if (active) {
video_capturer_->Start(
this, view_->offscreen_use_shared_texture()
? viz::mojom::BufferFormatPreference::kPreferGpuMemoryBuffer
: viz::mojom::BufferFormatPreference::kDefault);
this,
view_->offscreen_use_shared_texture()
? viz::mojom::BufferFormatPreference::kPreferMappableSharedImage
: viz::mojom::BufferFormatPreference::kDefault);
} else {
video_capturer_->Stop();
}

View File

@@ -4,9 +4,9 @@
#include "shell/browser/printing/print_view_manager_electron.h"
#include <algorithm>
#include <utility>
#include "base/containers/contains.h"
#include "base/functional/bind.h"
#include "components/printing/browser/print_to_pdf/pdf_print_utils.h"
#include "printing/mojom/print.mojom.h"
@@ -98,7 +98,7 @@ void PrintViewManagerElectron::GetDefaultPrintSettings(
void PrintViewManagerElectron::ScriptedPrint(
printing::mojom::ScriptedPrintParamsPtr params,
ScriptedPrintCallback callback) {
if (!base::Contains(pdf_jobs_, params->cookie)) {
if (!std::ranges::contains(pdf_jobs_, params->cookie)) {
PrintViewManagerBase::ScriptedPrint(std::move(params), std::move(callback));
return;
}
@@ -134,7 +134,7 @@ void PrintViewManagerElectron::CheckForCancel(int32_t preview_ui_id,
void PrintViewManagerElectron::DidGetPrintedPagesCount(int32_t cookie,
uint32_t number_pages) {
if (!base::Contains(pdf_jobs_, cookie)) {
if (!std::ranges::contains(pdf_jobs_, cookie)) {
PrintViewManagerBase::DidGetPrintedPagesCount(cookie, number_pages);
}
}

View File

@@ -8,7 +8,6 @@
#include <utility>
#include "base/command_line.h"
#include "base/containers/contains.h"
#include "base/functional/bind.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/stringprintf.h"
@@ -106,7 +105,8 @@ bool BluetoothPortIsAllowed(
if (*port.bluetooth_service_class_id == device::GetSerialPortProfileUUID()) {
return true;
}
return base::Contains(allowed_ids, port.bluetooth_service_class_id.value());
return std::ranges::contains(allowed_ids,
port.bluetooth_service_class_id.value());
}
} // namespace