Files
23af5c4a11 chore: bump chromium to 150.0.7844.0 (main) (#51610)
* chore: bump chromium in DEPS to 150.0.7839.0

* chore: bump chromium in DEPS to 150.0.7840.0

* fix(patch-conflict): update sqlite rename_exports.h for sqlite 3.53.1 upgrade

The sqlite amalgamation was rolled to 3.53.1, which regenerated
rename_exports.h with new line numbers for all exports. Updated the patch
context to match the new file while preserving the win32 export renames.

Ref: https://chromium-review.googlesource.com/c/chromium/src/+/7828672

Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>

* chore: update patch hunk headers

Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>

* 7836112: inline media_capture_util after upstream removal

Upstream removed extensions/browser/media_capture_util.h/cc as dead code
after deleting app_shell. Electron still needs GrantMediaStreamRequest
and VerifyMediaAccessPermission, so inline the logic directly into
ElectronExtensionHostDelegate.

Ref: https://chromium-review.googlesource.com/c/chromium/src/+/7836112

* 7801320: add embedded param to GetExtensionIdForMimeType and body_cache to SendExecuteMimeTypeHandlerEvent

Upstream added an `embedded` parameter to PluginUtils::GetExtensionIdForMimeType
to honor MIME handler can_embed settings, and a `body_cache` parameter to
SendExecuteMimeTypeHandlerEvent for PDF fallback-to-native replay. Updated
Electron's implementations to accept the new parameters.

Ref: https://chromium-review.googlesource.com/c/chromium/src/+/7801320
Ref: https://chromium-review.googlesource.com/c/chromium/src/+/7781210

* fix(patch-update): update kIcCloseIcon to kIcCloseOldIcon in picture-in-picture patch

Upstream renamed ui/views/vector_icons/ic_close.icon to ic_close_old.icon,
which changes the generated symbol from kIcCloseIcon to kIcCloseOldIcon.

Ref: https://chromium-review.googlesource.com/c/chromium/src/+/7795717

* chore: bump chromium in DEPS to 150.0.7841.0

* fix(patch-conflict): update picture-in-picture patch for kCloseChromeRefresh icon rename

Upstream renamed kCloseChromeRefreshIcon to kCloseChromeRefreshOldIcon in
the same sweep that renamed kIcCloseIcon to kIcCloseOldIcon. Updated the
patch to reference kCloseChromeRefreshOldIcon in the GOOGLE_CHROME_BRANDING
guard.

Ref: https://chromium-review.googlesource.com/c/chromium/src/+/7795717

* chore: update patch hunk headers

* 7795717: update window control icon names for upstream rename

Upstream renamed all views vector icons with an "Old" suffix as part of
the GlowUp icon refresh. Updated kWindowControlMinimizeIcon,
kWindowControlMaximizeIcon, kWindowControlRestoreIcon, and
kWindowControlCloseIcon to their *OldIcon variants.

Ref: https://chromium-review.googlesource.com/c/chromium/src/+/7795717

* chore: regenerate filenames.libcxx.gni

Removed ctype.h, fenv.h, and inttypes.h which were deleted upstream.

* chore: remove obsolete siso patches

Upstream rewrote file_parser.go's readFile to use mmapfile.Read instead
of os.Open + chunked ReadAt goroutines. The race condition in bindflt.sys
that these patches worked around (redundant CreateFileW calls under
concurrent opens) can no longer occur with the new mmap-based approach.

Also guard the git am step against an empty patches directory.

* chore: bump chromium in DEPS to 150.0.7843.0

* chore: bump chromium in DEPS to 150.0.7844.0

* fix(patch-conflict): update mas patch for CATransactionV2 feature guard

Upstream guarded the CAContext reallocation on resize behind the
kCATransactionV2 feature flag. Updated the MAS build guard to preserve
this new condition alongside the existing allow_remote_layers_ check.

Ref: https://chromium-review.googlesource.com/c/chromium/src/+/7850052

Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>

* chore: update patch hunk headers

Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>

* fixup! 7836112: inline media_capture_util after upstream removal

* fixup! chore: remove obsolete siso patches

* 7832184: [asm.js] Disable asm.js-to-Wasm translation

The codepath that produced the warning this Node.js test was
asserting on is no longer taken after the upstream change.

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

* chore: update patches

* chore: back out unrelated formatting changes

---------

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: Keeley Hammond <khammond@slack-corp.com>
Co-authored-by: Claude <svc-devxp-claude@slack-corp.com>
Co-authored-by: David Sanders <dsanders11@ucsbalum.com>
2026-05-20 10:54:42 -05:00

38 lines
1.2 KiB
C++

// Copyright 2016 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef ELECTRON_SHELL_BROWSER_PLUGINS_PLUGIN_UTILS_H_
#define ELECTRON_SHELL_BROWSER_PLUGINS_PLUGIN_UTILS_H_
#include <string>
#include "base/containers/flat_map.h"
namespace content {
class BrowserContext;
}
class PluginUtils {
public:
// disable copy
PluginUtils() = delete;
PluginUtils(const PluginUtils&) = delete;
PluginUtils& operator=(const PluginUtils&) = delete;
// If there's an extension that is allowed to handle `mime_type`, returns its
// ID. Otherwise returns an empty string. If `embedded` is true, skips generic
// handlers that do not allow embedding for `mime_type`.
static std::string GetExtensionIdForMimeType(
content::BrowserContext* browser_context,
const std::string& mime_type,
bool embedded);
// Returns a map populated with MIME types that are handled by an extension as
// keys and the corresponding extensions Ids as values.
static base::flat_map<std::string, std::string> GetMimeTypeToExtensionIdMap(
content::BrowserContext* browser_context);
};
#endif // ELECTRON_SHELL_BROWSER_PLUGINS_PLUGIN_UTILS_H_