chore: bump chromium to 133.0.6943.35 (35-x-y) (#45217)
* chore: bump chromium in DEPS to 133.0.6943.16
* chore: bump chromium in DEPS to 133.0.6943.27
* chore: bump chromium in DEPS to 133.0.6943.35
* chore: bump chromium to 134.0.6968.0
cherry picked from 75eac86506
---------
Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>
This commit is contained in:
parent
599030ea08
commit
49078100f4
122 changed files with 682 additions and 622 deletions
|
@ -22,7 +22,7 @@
|
|||
#endif
|
||||
|
||||
using extensions::Command;
|
||||
using extensions::GlobalShortcutListener;
|
||||
using ui::GlobalAcceleratorListener;
|
||||
|
||||
namespace {
|
||||
|
||||
|
@ -53,8 +53,8 @@ GlobalShortcut::~GlobalShortcut() {
|
|||
|
||||
void GlobalShortcut::OnKeyPressed(const ui::Accelerator& accelerator) {
|
||||
if (!base::Contains(accelerator_callback_map_, accelerator)) {
|
||||
// This should never occur, because if it does, GlobalShortcutListener
|
||||
// notifies us with wrong accelerator.
|
||||
// This should never occur, because if it does,
|
||||
// ui::GlobalAcceleratorListener notifies us with wrong accelerator.
|
||||
NOTREACHED();
|
||||
}
|
||||
accelerator_callback_map_[accelerator].Run();
|
||||
|
@ -99,12 +99,12 @@ bool GlobalShortcut::Register(const ui::Accelerator& accelerator,
|
|||
if (RegisteringMediaKeyForUntrustedClient(accelerator))
|
||||
return false;
|
||||
|
||||
GlobalShortcutListener::SetShouldUseInternalMediaKeyHandling(false);
|
||||
ui::GlobalAcceleratorListener::SetShouldUseInternalMediaKeyHandling(false);
|
||||
}
|
||||
#endif
|
||||
|
||||
if (!GlobalShortcutListener::GetInstance()->RegisterAccelerator(accelerator,
|
||||
this)) {
|
||||
if (!ui::GlobalAcceleratorListener::GetInstance()->RegisterAccelerator(
|
||||
accelerator, this)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -123,12 +123,12 @@ void GlobalShortcut::Unregister(const ui::Accelerator& accelerator) {
|
|||
|
||||
#if BUILDFLAG(IS_MAC)
|
||||
if (accelerator.IsMediaKey() && !MapHasMediaKeys(accelerator_callback_map_)) {
|
||||
GlobalShortcutListener::SetShouldUseInternalMediaKeyHandling(true);
|
||||
ui::GlobalAcceleratorListener::SetShouldUseInternalMediaKeyHandling(true);
|
||||
}
|
||||
#endif
|
||||
|
||||
GlobalShortcutListener::GetInstance()->UnregisterAccelerator(accelerator,
|
||||
this);
|
||||
ui::GlobalAcceleratorListener::GetInstance()->UnregisterAccelerator(
|
||||
accelerator, this);
|
||||
}
|
||||
|
||||
void GlobalShortcut::UnregisterSome(
|
||||
|
@ -149,7 +149,7 @@ void GlobalShortcut::UnregisterAll() {
|
|||
return;
|
||||
}
|
||||
accelerator_callback_map_.clear();
|
||||
GlobalShortcutListener::GetInstance()->UnregisterAccelerators(this);
|
||||
ui::GlobalAcceleratorListener::GetInstance()->UnregisterAccelerators(this);
|
||||
}
|
||||
|
||||
// static
|
||||
|
|
|
@ -9,10 +9,10 @@
|
|||
#include <vector>
|
||||
|
||||
#include "base/functional/callback_forward.h"
|
||||
#include "chrome/browser/extensions/global_shortcut_listener.h"
|
||||
#include "extensions/common/extension_id.h"
|
||||
#include "gin/wrappable.h"
|
||||
#include "ui/base/accelerators/accelerator.h"
|
||||
#include "ui/base/accelerators/global_accelerator_listener/global_accelerator_listener.h"
|
||||
|
||||
namespace gin {
|
||||
template <typename T>
|
||||
|
@ -21,9 +21,8 @@ class Handle;
|
|||
|
||||
namespace electron::api {
|
||||
|
||||
class GlobalShortcut final
|
||||
: private extensions::GlobalShortcutListener::Observer,
|
||||
public gin::Wrappable<GlobalShortcut> {
|
||||
class GlobalShortcut final : private ui::GlobalAcceleratorListener::Observer,
|
||||
public gin::Wrappable<GlobalShortcut> {
|
||||
public:
|
||||
static gin::Handle<GlobalShortcut> Create(v8::Isolate* isolate);
|
||||
|
||||
|
@ -54,7 +53,7 @@ class GlobalShortcut final
|
|||
void UnregisterSome(const std::vector<ui::Accelerator>& accelerators);
|
||||
void UnregisterAll();
|
||||
|
||||
// GlobalShortcutListener::Observer implementation.
|
||||
// GlobalAcceleratorListener::Observer implementation.
|
||||
void OnKeyPressed(const ui::Accelerator& accelerator) override;
|
||||
void ExecuteCommand(const extensions::ExtensionId& extension_id,
|
||||
const std::string& command_id) override;
|
||||
|
|
|
@ -93,9 +93,8 @@ namespace electron::api {
|
|||
// FrameTreeNodeId -> WebFrameMain*
|
||||
// Using FrameTreeNode allows us to track frame across navigations. This
|
||||
// is most similar to how <iframe> works.
|
||||
using FrameTreeNodeIdMap = std::unordered_map<content::FrameTreeNodeId,
|
||||
WebFrameMain*,
|
||||
content::FrameTreeNodeId::Hasher>;
|
||||
using FrameTreeNodeIdMap =
|
||||
std::unordered_map<content::FrameTreeNodeId, WebFrameMain*>;
|
||||
|
||||
// Token -> WebFrameMain*
|
||||
// Maps exact RFH to a WebFrameMain instance.
|
||||
|
|
|
@ -399,8 +399,9 @@ content::TtsPlatform* ElectronBrowserClient::GetTtsPlatform() {
|
|||
return nullptr;
|
||||
}
|
||||
|
||||
void ElectronBrowserClient::OverrideWebkitPrefs(
|
||||
void ElectronBrowserClient::OverrideWebPreferences(
|
||||
content::WebContents* web_contents,
|
||||
content::SiteInstance& main_frame_site,
|
||||
blink::web_pref::WebPreferences* prefs) {
|
||||
prefs->javascript_enabled = true;
|
||||
prefs->web_security_enabled = true;
|
||||
|
@ -434,8 +435,7 @@ void ElectronBrowserClient::OverrideWebkitPrefs(
|
|||
SetFontDefaults(prefs);
|
||||
|
||||
// Custom preferences of guest page.
|
||||
auto* web_preferences = WebContentsPreferences::From(web_contents);
|
||||
if (web_preferences) {
|
||||
if (auto* web_preferences = WebContentsPreferences::From(web_contents)) {
|
||||
web_preferences->OverrideWebkitPrefs(prefs, renderer_prefs);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -129,8 +129,9 @@ class ElectronBrowserClient : public content::ContentBrowserClient,
|
|||
CreateSpeechRecognitionManagerDelegate() override;
|
||||
content::TtsPlatform* GetTtsPlatform() override;
|
||||
|
||||
void OverrideWebkitPrefs(content::WebContents* web_contents,
|
||||
blink::web_pref::WebPreferences* prefs) override;
|
||||
void OverrideWebPreferences(content::WebContents* web_contents,
|
||||
content::SiteInstance& main_frame_site,
|
||||
blink::web_pref::WebPreferences* prefs) override;
|
||||
void RegisterPendingSiteInstance(
|
||||
content::RenderFrameHost* render_frame_host,
|
||||
content::SiteInstance* pending_site_instance) override;
|
||||
|
|
|
@ -36,9 +36,9 @@
|
|||
#include "extensions/common/mojom/css_origin.mojom-shared.h"
|
||||
#include "extensions/common/mojom/execution_world.mojom-shared.h"
|
||||
#include "extensions/common/mojom/host_id.mojom.h"
|
||||
#include "extensions/common/mojom/match_origin_as_fallback.mojom-shared.h"
|
||||
#include "extensions/common/mojom/run_location.mojom-shared.h"
|
||||
#include "extensions/common/permissions/permissions_data.h"
|
||||
#include "extensions/common/script_constants.h"
|
||||
#include "extensions/common/user_script.h"
|
||||
#include "extensions/common/utils/content_script_utils.h"
|
||||
#include "extensions/common/utils/extension_types_utils.h"
|
||||
|
@ -686,8 +686,9 @@ bool ScriptingExecuteScriptFunction::Execute(
|
|||
user_gesture() ? blink::mojom::UserActivationOption::kActivate
|
||||
: blink::mojom::UserActivationOption::kDoNotActivate,
|
||||
blink::mojom::PromiseResultOption::kAwait)),
|
||||
frame_scope, frame_ids, ScriptExecutor::MATCH_ABOUT_BLANK, run_location,
|
||||
ScriptExecutor::DEFAULT_PROCESS,
|
||||
frame_scope, frame_ids,
|
||||
mojom::MatchOriginAsFallbackBehavior::kMatchForAboutSchemeAndClimbTree,
|
||||
run_location, ScriptExecutor::DEFAULT_PROCESS,
|
||||
/* webview_src */ GURL(),
|
||||
base::BindOnce(&ScriptingExecuteScriptFunction::OnScriptExecuted, this));
|
||||
|
||||
|
@ -810,7 +811,8 @@ bool ScriptingInsertCSSFunction::Execute(
|
|||
mojom::CodeInjection::NewCss(mojom::CSSInjection::New(
|
||||
std::move(sources), ConvertStyleOriginToCSSOrigin(injection_.origin),
|
||||
mojom::CSSInjection::Operation::kAdd)),
|
||||
frame_scope, frame_ids, ScriptExecutor::MATCH_ABOUT_BLANK,
|
||||
frame_scope, frame_ids,
|
||||
mojom::MatchOriginAsFallbackBehavior::kMatchForAboutSchemeAndClimbTree,
|
||||
kCSSRunLocation, ScriptExecutor::DEFAULT_PROCESS,
|
||||
/* webview_src */ GURL(),
|
||||
base::BindOnce(&ScriptingInsertCSSFunction::OnCSSInserted, this));
|
||||
|
@ -887,7 +889,8 @@ ExtensionFunction::ResponseAction ScriptingRemoveCSSFunction::Run() {
|
|||
mojom::CodeInjection::NewCss(mojom::CSSInjection::New(
|
||||
std::move(sources), ConvertStyleOriginToCSSOrigin(injection.origin),
|
||||
mojom::CSSInjection::Operation::kRemove)),
|
||||
frame_scope, frame_ids, ScriptExecutor::MATCH_ABOUT_BLANK,
|
||||
frame_scope, frame_ids,
|
||||
mojom::MatchOriginAsFallbackBehavior::kMatchForAboutSchemeAndClimbTree,
|
||||
kCSSRunLocation, ScriptExecutor::DEFAULT_PROCESS,
|
||||
/* webview_src */ GURL(),
|
||||
base::BindOnce(&ScriptingRemoveCSSFunction::OnCSSRemoved, this));
|
||||
|
|
|
@ -194,6 +194,16 @@ void ElectronExtensionLoader::PostActivateExtension(
|
|||
void ElectronExtensionLoader::PostDeactivateExtension(
|
||||
scoped_refptr<const Extension> extension) {}
|
||||
|
||||
void ElectronExtensionLoader::PreUninstallExtension(
|
||||
scoped_refptr<const Extension> extension) {}
|
||||
|
||||
void ElectronExtensionLoader::PostUninstallExtension(
|
||||
scoped_refptr<const Extension> extension,
|
||||
base::OnceClosure done_callback) {}
|
||||
|
||||
void ElectronExtensionLoader::PostNotifyUninstallExtension(
|
||||
scoped_refptr<const Extension> extension) {}
|
||||
|
||||
void ElectronExtensionLoader::LoadExtensionForReload(
|
||||
const ExtensionId& extension_id,
|
||||
const base::FilePath& path,
|
||||
|
@ -211,6 +221,16 @@ void ElectronExtensionLoader::LoadExtensionForReload(
|
|||
did_schedule_reload_ = true;
|
||||
}
|
||||
|
||||
void ElectronExtensionLoader::ShowExtensionDisabledError(
|
||||
const Extension* extension,
|
||||
bool is_remote_install) {}
|
||||
|
||||
void ElectronExtensionLoader::FinishDelayedInstallationsIfAny() {}
|
||||
|
||||
bool ElectronExtensionLoader::CanAddExtension(const Extension* extension) {
|
||||
return true;
|
||||
}
|
||||
|
||||
bool ElectronExtensionLoader::CanEnableExtension(const Extension* extension) {
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -72,10 +72,19 @@ class ElectronExtensionLoader : public ExtensionRegistrar::Delegate {
|
|||
void PostActivateExtension(scoped_refptr<const Extension> extension) override;
|
||||
void PostDeactivateExtension(
|
||||
scoped_refptr<const Extension> extension) override;
|
||||
void PreUninstallExtension(scoped_refptr<const Extension> extension) override;
|
||||
void PostUninstallExtension(scoped_refptr<const Extension> extension,
|
||||
base::OnceClosure done_callback) override;
|
||||
void PostNotifyUninstallExtension(
|
||||
scoped_refptr<const Extension> extension) override;
|
||||
void LoadExtensionForReload(
|
||||
const ExtensionId& extension_id,
|
||||
const base::FilePath& path,
|
||||
ExtensionRegistrar::LoadErrorBehavior load_error_behavior) override;
|
||||
void ShowExtensionDisabledError(const Extension* extension,
|
||||
bool is_remote_install) override;
|
||||
void FinishDelayedInstallationsIfAny() override;
|
||||
bool CanAddExtension(const Extension* extension) override;
|
||||
bool CanEnableExtension(const Extension* extension) override;
|
||||
bool CanDisableExtension(const Extension* extension) override;
|
||||
bool ShouldBlockExtension(const Extension* extension) override;
|
||||
|
|
|
@ -107,9 +107,9 @@ std::unique_ptr<MessagePort> ElectronMessagingDelegate::CreateReceiverForTab(
|
|||
if (!receiver_rfh)
|
||||
return nullptr;
|
||||
|
||||
return std::make_unique<ExtensionMessagePort>(
|
||||
channel_delegate, receiver_port_id, extension_id, receiver_rfh,
|
||||
include_child_frames);
|
||||
return ExtensionMessagePort::CreateForTab(channel_delegate, receiver_port_id,
|
||||
extension_id, receiver_rfh,
|
||||
include_child_frames);
|
||||
}
|
||||
|
||||
std::unique_ptr<MessagePort>
|
||||
|
|
|
@ -98,12 +98,13 @@ v8::Isolate* JavascriptEnvironment::Initialize(uv_loop_t* event_loop,
|
|||
tracing_controller, gin::V8Platform::GetCurrentPageAllocator());
|
||||
|
||||
v8::V8::InitializePlatform(platform_.get());
|
||||
gin::IsolateHolder::Initialize(gin::IsolateHolder::kNonStrictMode,
|
||||
gin::ArrayBufferAllocator::SharedInstance(),
|
||||
nullptr /* external_reference_table */,
|
||||
js_flags, nullptr /* fatal_error_callback */,
|
||||
nullptr /* oom_error_callback */,
|
||||
false /* create_v8_platform */);
|
||||
gin::IsolateHolder::Initialize(
|
||||
gin::IsolateHolder::kNonStrictMode,
|
||||
gin::ArrayBufferAllocator::SharedInstance(),
|
||||
nullptr /* external_reference_table */, js_flags,
|
||||
false /* disallow_v8_feature_flag_overrides */,
|
||||
nullptr /* fatal_error_callback */, nullptr /* oom_error_callback */,
|
||||
false /* create_v8_platform */);
|
||||
|
||||
v8::Isolate* isolate = v8::Isolate::Allocate();
|
||||
platform_->RegisterIsolate(isolate, event_loop);
|
||||
|
|
|
@ -58,7 +58,7 @@ void LayeredWindowUpdater::OnAllocatedSharedMemory(
|
|||
|
||||
canvas_ = skia::CreatePlatformCanvasWithPixels(
|
||||
pixel_size.width(), pixel_size.height(), false,
|
||||
static_cast<uint8_t*>(shm_mapping_.memory()), skia::CRASH_ON_FAILURE);
|
||||
static_cast<uint8_t*>(shm_mapping_.memory()), 0, skia::CRASH_ON_FAILURE);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
|
@ -195,8 +195,6 @@ OffScreenRenderWidgetHostView::OffScreenRenderWidgetHostView(
|
|||
|
||||
root_layer_ = std::make_unique<ui::Layer>(ui::LAYER_SOLID_COLOR);
|
||||
|
||||
bool opaque = SkColorGetA(background_color_) == SK_AlphaOPAQUE;
|
||||
root_layer()->SetFillsBoundsOpaquely(opaque);
|
||||
root_layer()->SetColor(background_color_);
|
||||
|
||||
ui::ContextFactory* context_factory = content::GetContextFactory();
|
||||
|
@ -991,8 +989,6 @@ void OffScreenRenderWidgetHostView::UpdateBackgroundColorFromRenderer(
|
|||
return;
|
||||
background_color_ = color;
|
||||
|
||||
bool opaque = SkColorGetA(color) == SK_AlphaOPAQUE;
|
||||
root_layer()->SetFillsBoundsOpaquely(opaque);
|
||||
root_layer()->SetColor(color);
|
||||
}
|
||||
|
||||
|
|
|
@ -12,6 +12,7 @@
|
|||
#include "shell/browser/ui/gtk/menu_gtk.h"
|
||||
#include "shell/browser/ui/gtk_util.h"
|
||||
#include "ui/gfx/image/image_skia.h"
|
||||
#include "ui/gfx/paint_vector_icon.h"
|
||||
|
||||
namespace electron {
|
||||
|
||||
|
@ -29,7 +30,7 @@ StatusIconGtk::StatusIconGtk() : icon_(TakeGObject(gtk_status_icon_new())) {
|
|||
|
||||
StatusIconGtk::~StatusIconGtk() = default;
|
||||
|
||||
void StatusIconGtk::SetIcon(const gfx::ImageSkia& image) {
|
||||
void StatusIconGtk::SetImage(const gfx::ImageSkia& image) {
|
||||
if (image.isNull())
|
||||
return;
|
||||
|
||||
|
@ -38,6 +39,10 @@ void StatusIconGtk::SetIcon(const gfx::ImageSkia& image) {
|
|||
g_object_unref(pixbuf);
|
||||
}
|
||||
|
||||
void StatusIconGtk::SetIcon(const gfx::VectorIcon& icon) {
|
||||
SetImage(gfx::CreateVectorIcon(icon, SK_ColorBLACK));
|
||||
}
|
||||
|
||||
void StatusIconGtk::SetToolTip(const std::u16string& tool_tip) {
|
||||
gtk_status_icon_set_tooltip_text(icon_, base::UTF16ToUTF8(tool_tip).c_str());
|
||||
}
|
||||
|
@ -53,7 +58,7 @@ void StatusIconGtk::RefreshPlatformContextMenu() {
|
|||
}
|
||||
|
||||
void StatusIconGtk::OnSetDelegate() {
|
||||
SetIcon(delegate_->GetImage());
|
||||
SetImage(delegate_->GetImage());
|
||||
SetToolTip(delegate_->GetToolTip());
|
||||
UpdatePlatformContextMenu(delegate_->GetMenuModel());
|
||||
gtk_status_icon_set_visible(icon_, TRUE);
|
||||
|
|
|
@ -28,7 +28,8 @@ class StatusIconGtk : public ui::StatusIconLinux {
|
|||
~StatusIconGtk() override;
|
||||
|
||||
// ui::StatusIconLinux:
|
||||
void SetIcon(const gfx::ImageSkia& image) override;
|
||||
void SetImage(const gfx::ImageSkia& image) override;
|
||||
void SetIcon(const gfx::VectorIcon& icon) override;
|
||||
void SetToolTip(const std::u16string& tool_tip) override;
|
||||
void UpdatePlatformContextMenu(ui::MenuModel* model) override;
|
||||
void RefreshPlatformContextMenu() override;
|
||||
|
|
|
@ -41,7 +41,7 @@ TrayIconLinux::~TrayIconLinux() = default;
|
|||
void TrayIconLinux::SetImage(const gfx::Image& image) {
|
||||
image_ = GetBestImageRep(image.AsImageSkia());
|
||||
if (auto* status_icon = GetStatusIcon())
|
||||
status_icon->SetIcon(image_);
|
||||
status_icon->SetImage(image_);
|
||||
}
|
||||
|
||||
void TrayIconLinux::SetToolTip(const std::string& tool_tip) {
|
||||
|
@ -60,6 +60,10 @@ const gfx::ImageSkia& TrayIconLinux::GetImage() const {
|
|||
return image_;
|
||||
}
|
||||
|
||||
const gfx::VectorIcon* TrayIconLinux::GetIcon() const {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
const std::u16string& TrayIconLinux::GetToolTip() const {
|
||||
return tool_tip_;
|
||||
}
|
||||
|
|
|
@ -31,6 +31,7 @@ class TrayIconLinux : public TrayIcon, public ui::StatusIconLinux::Delegate {
|
|||
void OnClick() override;
|
||||
bool HasClickAction() override;
|
||||
const gfx::ImageSkia& GetImage() const override;
|
||||
const gfx::VectorIcon* GetIcon() const override;
|
||||
const std::u16string& GetToolTip() const override;
|
||||
ui::MenuModel* GetMenuModel() const override;
|
||||
void OnImplInitializationFailed() override;
|
||||
|
|
|
@ -2,6 +2,11 @@
|
|||
// Use of this source code is governed by the MIT license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
// FIXME(samuelmaddock): refactor this class to use modern
|
||||
// Microsoft::WRL::ComPtr must come before other includes. fixes bad #defines
|
||||
// from <shlwapi.h>.
|
||||
#include "base/win/shlwapi.h" // NOLINT(build/include_order)
|
||||
|
||||
#include "shell/browser/ui/win/jump_list.h"
|
||||
|
||||
#include <propkey.h> // for PKEY_* constants
|
||||
|
|
|
@ -280,9 +280,7 @@ bool ElectronUsbDelegate::IsServiceWorkerAllowedForOrigin(
|
|||
const url::Origin& origin) {
|
||||
#if BUILDFLAG(ENABLE_ELECTRON_EXTENSIONS)
|
||||
// WebUSB is only available on extension service workers for now.
|
||||
if (base::FeatureList::IsEnabled(
|
||||
features::kEnableWebUsbOnExtensionServiceWorker) &&
|
||||
origin.scheme() == extensions::kExtensionScheme) {
|
||||
if (origin.scheme() == extensions::kExtensionScheme) {
|
||||
return true;
|
||||
}
|
||||
#endif // BUILDFLAG(ENABLE_ELECTRON_EXTENSIONS)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue