mirror of
https://github.com/electron/electron.git
synced 2026-01-08 07:04:01 -05:00
* chore: bump chromium in DEPS to 144.0.7543.0 * Pass PipScreenCaptureCoordinatorProxy to ScreenCaptureKitDeviceMac https://chromium-review.googlesource.com/c/chromium/src/+/7157590 * chore: update patches * chore: update filenames.libcxx.gni * 7142359: Spanification of process_singleton_posix.cc https: //chromium-review.googlesource.com/c/chromium/src/+/7142359 Co-Authored-By: Charles Kerr <70381+ckerr@users.noreply.github.com> * Move logging::LoggingSettings to base/logging/logging_settings.h https://chromium-review.googlesource.com/c/chromium/src/+/7173024 * chore: bump chromium in DEPS to 144.0.7545.0 * 7159368: update PluginService API for sync GetPlugins Upstream removed async PluginService APIs: - GetPluginsAsync() removed, use synchronous GetPlugins() - RegisterInternalPlugin() now takes single argument (remove add_at_beginning) - RefreshPlugins() removed entirely Updated ElectronPluginInfoHostImpl to use synchronous plugin loading and simplified ElectronBrowserMainParts internal plugin registration. Ref: https://chromium-review.googlesource.com/c/chromium/src/+/7159368 Ref: https://chromium-review.googlesource.com/c/chromium/src/+/7159328 Ref: https://chromium-review.googlesource.com/c/chromium/src/+/7159056 (cherry picked from commit88cdf50b0a) * 7159184: add missing base/files/file_path.h include Add explicit include for base/files/file_path.h in electron_browser_context.h. After removal of superfluous Mojo includes from content headers, base::FilePath is no longer transitively included via content/public/browser/browser_context.h. Ref: https://chromium-review.googlesource.com/c/chromium/src/+/7159184 (cherry picked from commit6ca8ea03ec) * 7126479: add ShouldForceRefreshTextCheckService parameter to SpellCheckClient Upstream added a force-refresh parameter to WebTextCheckClient::RequestCheckingOfText to bypass spell check cache. Add the new ShouldForceRefreshTextCheckService parameter to SpellCheckClient's override (currently unused in Electron). Ref: https://chromium-review.googlesource.com/c/chromium/src/+/7126479 (cherry picked from commit879c0401c4) * 7083663: remove fingerprinting_protection_ruleset_service override Upstream deleted external references to Fingerprinting Protection Filter (FPF) component. Remove the fingerprinting_protection_ruleset_service() override from BrowserProcessImpl as the method no longer exists in the base class. Ref: https://chromium-review.googlesource.com/c/chromium/src/+/7083663 (cherry picked from commit8350d152f9) * 7155287: implement WebContentsView::GetSize and Resize Upstream delegated WebContents::GetSize() and Resize() to WebContentsView, making them pure virtual. Add const qualifier to GetSize() and implement the Resize() override in OffScreenWebContentsView (no-op for offscreen). Ref: https://chromium-review.googlesource.com/c/chromium/src/+/7155287 (cherry picked from commit084eaa568e) * 7184238: add OnUnconfirmedTapConvertedToTap override Upstream added OnUnconfirmedTapConvertedToTap as a pure virtual method to RenderWidgetHostViewBase to inform root view when child frame converts an unconfirmed tap. Add empty override for offscreen rendering. Ref: https://chromium-review.googlesource.com/c/chromium/src/+/7184238 (cherry picked from commitef03400d9a) * 7143586: add widget parameter to OnCommandsChanged GlobalAcceleratorListener::OnCommandsChanged gained a gfx::AcceleratedWidget parameter for window association in the GlobalShortcutListenerLinux implementation. Pass gfx::kNullAcceleratedWidget for Electron's usage. Ref: : Pass parent handle to GlobalAcceleratorListenerLinux::BindShortcuts | https://chromium-review.googlesource.com/c/chromium/src/+/7143586 (cherry picked from commit38306e2bfc) Co-Authored-By: Samuel Attard <MarshallOfSound@users.noreply.github.com> * chore: update patches Co-Authored-By: Samuel Attard <MarshallOfSound@users.noreply.github.com> * chore: bump chromium in DEPS to 144.0.7547.0 * chore: update patches * 7189232: Add support for UnownedUserData in GlobalFeatures https: //chromium-review.googlesource.com/c/chromium/src/+/7189232 * Refactor: Use std::u16string for extension load error messages https://chromium-review.googlesource.com/c/chromium/src/+/7185844 * fixup Add support for UnownedUserData in GlobalFeatures * 7165650: Remove ResourceContext https://chromium-review.googlesource.com/c/chromium/src/+/7165650 * fixup BUILD.gn for lint * 7202164: Reland "Reland "Remove GenericScopedHandle:IsValid"" https://chromium-review.googlesource.com/c/chromium/src/+/7202164 * advance deprecation of v8::ReturnValue<void>::Set(Local<S>). 7168624: [runtime][api] Relax requirements for setter/definer/deleter callbacks | https://chromium-review.googlesource.com/c/v8/v8/+/7168624 * fixup advance deprecation of v8::ReturnValue<void>::Set(Local<S>) * chore: skip setting LPAC ACLs * Revert "chore: skip setting LPAC ACLs" This reverts commite187aec488. * chore: revert Convert to UNSAFE_TODO in sandbox revert https://chromium-review.googlesource.com/c/chromium/src/+/7131661 to see if it fixes the Windows sandbox issue. * Revert "chore: revert Convert to UNSAFE_TODO in sandbox" This reverts commit57afbfefe5. * chore: Revert "Enable network sandbox by default on Windows" see if this fixes the Windows sandbox issue * Enable network sandbox by default on Windows https://chromium-review.googlesource.com/c/chromium/src/+/7204292 * Revert "chore: Revert "Enable network sandbox by default on Windows"" This reverts commit530ab6af82. * fixup! Enable network sandbox by default on Windows | https://chromium-review.googlesource.com/c/chromium/src/+/7204292 * fixup!: Correct flag name, add kLocalNetworkAccessChecks to all platforms --------- Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com> Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org> Co-authored-by: Charles Kerr <70381+ckerr@users.noreply.github.com> Co-authored-by: Samuel Attard <sattard@anthropic.com> Co-authored-by: Samuel Attard <MarshallOfSound@users.noreply.github.com> Co-authored-by: John Kleinschmidt <kleinschmidtorama@gmail.com> Co-authored-by: Keeley Hammond <khammond@slack-corp.com>
46 lines
1.5 KiB
C++
46 lines
1.5 KiB
C++
// Copyright 2012 The Chromium Authors
|
|
// Use of this source code is governed by a BSD-style license that can be
|
|
// found in the LICENSE file.
|
|
|
|
#include "shell/browser/electron_plugin_info_host_impl.h"
|
|
|
|
#include <string>
|
|
#include <vector>
|
|
|
|
#include "content/public/browser/browser_thread.h"
|
|
#include "content/public/browser/plugin_service.h"
|
|
#include "url/gurl.h"
|
|
|
|
using content::PluginService;
|
|
using content::WebPluginInfo;
|
|
|
|
namespace electron {
|
|
|
|
ElectronPluginInfoHostImpl::ElectronPluginInfoHostImpl() = default;
|
|
|
|
ElectronPluginInfoHostImpl::~ElectronPluginInfoHostImpl() = default;
|
|
|
|
void ElectronPluginInfoHostImpl::GetPluginInfo(const GURL& url,
|
|
const url::Origin& origin,
|
|
const std::string& mime_type,
|
|
GetPluginInfoCallback callback) {
|
|
DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
|
|
|
|
// Ensure plugins are loaded (synchronous, non-blocking on UI thread).
|
|
PluginService::GetInstance()->GetPlugins();
|
|
|
|
mojom::PluginInfoPtr output = mojom::PluginInfo::New();
|
|
std::vector<WebPluginInfo> matching_plugins;
|
|
std::vector<std::string> mime_types;
|
|
PluginService::GetInstance()->GetPluginInfoArray(
|
|
url, mime_type, &matching_plugins, &mime_types);
|
|
if (!matching_plugins.empty()) {
|
|
output->plugin = matching_plugins[0];
|
|
output->actual_mime_type = mime_types[0];
|
|
}
|
|
|
|
std::move(callback).Run(std::move(output));
|
|
}
|
|
|
|
} // namespace electron
|