chore: bump chromium to 129.0.6650.0 (main) (#43266)
* chore: bump chromium in DEPS to 129.0.6645.0 * chore: update patches * chore: bump chromium in DEPS to 129.0.6646.0 * refactor: remove ppapi dependency PPAPI removal - https://issues.chromium.org/issues/40511450 PDF viewer migration - https://issues.chromium.org/issues/40511452 * chore: update patches * chore: enable `content_enable_legacy_ipc` We were indirectly relying on this via `enable_ppapi=true`, with 633a57d9b62da7850ef7946f6b101ed440d04cdd ppapi is now disabled and this commit makes the dependency explicit. * fix: gn check --------- Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com> Co-authored-by: deepak1556 <hop2deep@gmail.com>
This commit is contained in:
parent
23bcca3ffc
commit
c9b7806418
65 changed files with 333 additions and 673 deletions
|
@ -77,7 +77,6 @@
|
|||
#include "mojo/public/cpp/bindings/pending_receiver.h"
|
||||
#include "mojo/public/cpp/bindings/remote.h"
|
||||
#include "mojo/public/cpp/system/platform_handle.h"
|
||||
#include "ppapi/buildflags/buildflags.h"
|
||||
#include "printing/buildflags/buildflags.h"
|
||||
#include "services/resource_coordinator/public/cpp/memory_instrumentation/memory_instrumentation.h"
|
||||
#include "services/service_manager/public/cpp/interface_provider.h"
|
||||
|
|
|
@ -34,7 +34,6 @@
|
|||
#include "content/browser/keyboard_lock/keyboard_lock_service_impl.h" // nogncheck
|
||||
#include "content/browser/site_instance_impl.h" // nogncheck
|
||||
#include "content/public/browser/browser_main_runner.h"
|
||||
#include "content/public/browser/browser_ppapi_host.h"
|
||||
#include "content/public/browser/browser_task_traits.h"
|
||||
#include "content/public/browser/client_certificate_delegate.h"
|
||||
#include "content/public/browser/login_delegate.h"
|
||||
|
@ -59,10 +58,9 @@
|
|||
#include "extensions/browser/extension_navigation_ui_data.h"
|
||||
#include "extensions/common/extension_id.h"
|
||||
#include "mojo/public/cpp/bindings/binder_map.h"
|
||||
#include "mojo/public/cpp/bindings/self_owned_associated_receiver.h"
|
||||
#include "net/ssl/ssl_cert_request_info.h"
|
||||
#include "net/ssl/ssl_private_key.h"
|
||||
#include "ppapi/buildflags/buildflags.h"
|
||||
#include "ppapi/host/ppapi_host.h"
|
||||
#include "printing/buildflags/buildflags.h"
|
||||
#include "services/device/public/cpp/geolocation/geolocation_system_permission_manager.h"
|
||||
#include "services/device/public/cpp/geolocation/location_provider.h"
|
||||
|
@ -86,6 +84,7 @@
|
|||
#include "shell/browser/electron_browser_context.h"
|
||||
#include "shell/browser/electron_browser_main_parts.h"
|
||||
#include "shell/browser/electron_navigation_throttle.h"
|
||||
#include "shell/browser/electron_plugin_info_host_impl.h"
|
||||
#include "shell/browser/electron_speech_recognition_manager_delegate.h"
|
||||
#include "shell/browser/electron_web_contents_utility_handler_impl.h"
|
||||
#include "shell/browser/font_defaults.h"
|
||||
|
@ -117,6 +116,7 @@
|
|||
#include "shell/common/logging.h"
|
||||
#include "shell/common/options_switches.h"
|
||||
#include "shell/common/platform_util.h"
|
||||
#include "shell/common/plugin.mojom.h"
|
||||
#include "shell/common/thread_restrictions.h"
|
||||
#include "third_party/blink/public/common/associated_interfaces/associated_interface_registry.h"
|
||||
#include "third_party/blink/public/common/loader/url_loader_throttle.h"
|
||||
|
@ -580,9 +580,6 @@ void ElectronBrowserClient::AppendExtraCommandLineSwitches(
|
|||
}
|
||||
}
|
||||
|
||||
void ElectronBrowserClient::DidCreatePpapiPlugin(
|
||||
content::BrowserPpapiHost* host) {}
|
||||
|
||||
// attempt to get api key from env
|
||||
std::string ElectronBrowserClient::GetGeolocationApiKey() {
|
||||
auto env = base::Environment::Create();
|
||||
|
@ -1460,6 +1457,16 @@ void ElectronBrowserClient::
|
|||
render_frame_host);
|
||||
},
|
||||
&render_frame_host));
|
||||
associated_registry.AddInterface<mojom::ElectronPluginInfoHost>(
|
||||
base::BindRepeating(
|
||||
[](content::RenderFrameHost* render_frame_host,
|
||||
mojo::PendingAssociatedReceiver<mojom::ElectronPluginInfoHost>
|
||||
receiver) {
|
||||
mojo::MakeSelfOwnedAssociatedReceiver(
|
||||
std::make_unique<ElectronPluginInfoHostImpl>(),
|
||||
std::move(receiver));
|
||||
},
|
||||
&render_frame_host));
|
||||
#if BUILDFLAG(ENABLE_PRINTING)
|
||||
associated_registry.AddInterface<printing::mojom::PrintManagerHost>(
|
||||
base::BindRepeating(
|
||||
|
|
|
@ -134,7 +134,6 @@ class ElectronBrowserClient : public content::ContentBrowserClient,
|
|||
content::SiteInstance* pending_site_instance) override;
|
||||
void AppendExtraCommandLineSwitches(base::CommandLine* command_line,
|
||||
int child_process_id) override;
|
||||
void DidCreatePpapiPlugin(content::BrowserPpapiHost* browser_host) override;
|
||||
std::string GetGeolocationApiKey() override;
|
||||
content::GeneratedCodeCacheSettings GetGeneratedCodeCacheSettings(
|
||||
content::BrowserContext* context) override;
|
||||
|
|
61
shell/browser/electron_plugin_info_host_impl.cc
Normal file
61
shell/browser/electron_plugin_info_host_impl.cc
Normal file
|
@ -0,0 +1,61 @@
|
|||
// 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 <memory>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
#include "base/functional/bind.h"
|
||||
#include "content/public/browser/browser_thread.h"
|
||||
#include "content/public/browser/plugin_service.h"
|
||||
#include "content/public/common/content_constants.h"
|
||||
#include "url/gurl.h"
|
||||
#include "url/origin.h"
|
||||
|
||||
using content::PluginService;
|
||||
using content::WebPluginInfo;
|
||||
|
||||
namespace electron {
|
||||
|
||||
ElectronPluginInfoHostImpl::ElectronPluginInfoHostImpl() = default;
|
||||
|
||||
ElectronPluginInfoHostImpl::~ElectronPluginInfoHostImpl() = default;
|
||||
|
||||
struct ElectronPluginInfoHostImpl::GetPluginInfo_Params {
|
||||
GURL url;
|
||||
url::Origin main_frame_origin;
|
||||
std::string mime_type;
|
||||
};
|
||||
|
||||
void ElectronPluginInfoHostImpl::GetPluginInfo(const GURL& url,
|
||||
const url::Origin& origin,
|
||||
const std::string& mime_type,
|
||||
GetPluginInfoCallback callback) {
|
||||
DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
|
||||
GetPluginInfo_Params params = {url, origin, mime_type};
|
||||
PluginService::GetInstance()->GetPlugins(
|
||||
base::BindOnce(&ElectronPluginInfoHostImpl::PluginsLoaded,
|
||||
weak_factory_.GetWeakPtr(), params, std::move(callback)));
|
||||
}
|
||||
|
||||
void ElectronPluginInfoHostImpl::PluginsLoaded(
|
||||
const GetPluginInfo_Params& params,
|
||||
GetPluginInfoCallback callback,
|
||||
const std::vector<WebPluginInfo>& plugins) {
|
||||
mojom::PluginInfoPtr output = mojom::PluginInfo::New();
|
||||
std::vector<WebPluginInfo> matching_plugins;
|
||||
std::vector<std::string> mime_types;
|
||||
PluginService::GetInstance()->GetPluginInfoArray(
|
||||
params.url, params.mime_type, true, &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
|
56
shell/browser/electron_plugin_info_host_impl.h
Normal file
56
shell/browser/electron_plugin_info_host_impl.h
Normal file
|
@ -0,0 +1,56 @@
|
|||
// 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.
|
||||
|
||||
#ifndef SHELL_BROWSER_ELECTRON_PLUGIN_INFO_HOST_IMPL_H_
|
||||
#define SHELL_BROWSER_ELECTRON_PLUGIN_INFO_HOST_IMPL_H_
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include "shell/common/plugin.mojom.h"
|
||||
|
||||
class GURL;
|
||||
|
||||
namespace content {
|
||||
struct WebPluginInfo;
|
||||
} // namespace content
|
||||
|
||||
namespace url {
|
||||
class Origin;
|
||||
}
|
||||
|
||||
namespace electron {
|
||||
|
||||
// Implements ElectronPluginInfoHost interface.
|
||||
class ElectronPluginInfoHostImpl : public mojom::ElectronPluginInfoHost {
|
||||
public:
|
||||
struct GetPluginInfo_Params;
|
||||
|
||||
ElectronPluginInfoHostImpl();
|
||||
|
||||
ElectronPluginInfoHostImpl(const ElectronPluginInfoHostImpl&) = delete;
|
||||
ElectronPluginInfoHostImpl& operator=(const ElectronPluginInfoHostImpl&) =
|
||||
delete;
|
||||
|
||||
~ElectronPluginInfoHostImpl() override;
|
||||
|
||||
// mojom::ElectronPluginInfoHost
|
||||
void GetPluginInfo(const GURL& url,
|
||||
const url::Origin& origin,
|
||||
const std::string& mime_type,
|
||||
GetPluginInfoCallback callback) override;
|
||||
|
||||
private:
|
||||
// |params| wraps the parameters passed to |OnGetPluginInfo|, because
|
||||
// |base::Bind| doesn't support the required arity <http://crbug.com/98542>.
|
||||
void PluginsLoaded(const GetPluginInfo_Params& params,
|
||||
GetPluginInfoCallback callback,
|
||||
const std::vector<content::WebPluginInfo>& plugins);
|
||||
|
||||
base::WeakPtrFactory<ElectronPluginInfoHostImpl> weak_factory_{this};
|
||||
};
|
||||
|
||||
} // namespace electron
|
||||
|
||||
#endif // SHELL_BROWSER_ELECTRON_PLUGIN_INFO_HOST_IMPL_H_
|
Loading…
Add table
Add a link
Reference in a new issue