chore: bump chromium to 134.0.6968.0 (main) (#45172)
* chore: bump chromium in DEPS to 134.0.6948.0 * chore: update can_create_window.patch6151982
no patch code changes, but had to manually apply due to upstream context shear * chore: update proxy_config_monitor.patch no manual changes; patch applied with fuzz 2 Xref:6126219
* chore: update build_add_electron_tracing_category.patch Xref:6149256
* chore: update adjust_accessibility_ui_for_electron.patch6105650
no patch code changes, but had to manually apply due to upstream context shear * chore: e patches all * chore: use fully-qualified path for all.gn Xref:6154997
* chore: do not use a variable when assigning rtc_use_h264 Xref:6154997
* Move GlobalShortcutListenerLinux to //ui/base Xref:6097375
* [MPArch Guest View] Make WebPreferences queried per frame tree root Xref:6096390
* [Status Icons] Allow vector resources6139403
* [Extensions] Move MatchOriginAsFallbackBehavior to Mojom Xref:6141793
* Remove StrongAlias::Hasher Xref:6132291
* Rename text-change and select-change methods and related stuff Xref:6148816
* [Code Health] Remove stale feature EnableWebUsbOnExtensionServiceWorker6115161
* [Extensions Cleanup] Move creation of tab-based ports to factory method6143725
* refactor: add StatusIconGtk::SetIcon() Xref:6139403
copied from chrome/browser/status_icons/status_icon.cc * refactor: add TrayIconLinux::GetIcon() Xref:6139403
* chore: update feat_allow_usage_of_sccontentsharingpicker_on_supported_platforms.patch remove unused filter_ field * chore: bump chromium in DEPS to 134.0.6950.0 * chore: bump chromium in DEPS to 134.0.6952.0 * chore: bump chromium in DEPS to 134.0.6954.0 * chore: bump chromium in DEPS to 134.0.6956.0 * chore: update Chromium patches * 6165749: Check scanout support in RenderableGpuMemoryBufferPool |6165749
* 6106730: [Win] Use DXGI swapchains and DCOMP visuals in software mode |6106730
* chore: update patches * chore: bump chromium in DEPS to 134.0.6958.0 * chore: bump chromium in DEPS to 134.0.6960.0 * chore: update chromium patches * 6168371: Remove extensions GlobalShortcutListener wrapper |6168371
* chore: update patches * 6161637: WebUI: Leverage build_webui() in chrome://translate-internals |6161637
* chore: bump chromium in DEPS to 134.0.6962.0 * 6177329: Remove policy.used_policy_certificates pref on ChromeOS |6177329
* 6180524: Simplify logic in components/os_crypt/sync/BUILD.gn |6180524
* 6144831: Enforce --disallow-v8-feature-flag-overrides in the renderer |6144831
* chore: update patches * chore: bump chromium in DEPS to 134.0.6964.0 * 6181010: Ensure busy cursor does not show via LaunchWithoutSandbox |6181010
* chore: update patches * chore: bump chromium in DEPS to 134.0.6966.0 * 6180598: [api] Remove Reallocate |6180598
* 6170781: [Refactor] Move UninstallExtension to ExtensionRegistrar. |6170781
* chore: update filenames.libcxx.gni * 6168207: cdm: Remove widevine_cdm_version.h |6168207
* chore: bump chromium in DEPS to 134.0.6968.0 * 6030552: [macOS] Allow using vibrancy with NativeWidgetNSWindowBridge |6030552
* fix: use explicit copy to replace realloc impl6180598
https://issues.chromium.org/issues/331326406 As per recommendation, "File an issue with Node to explicitly copy,because they copy under the hood anyway" * fixup! 6106730: [Win] Use DXGI swapchains and DCOMP visuals in software mode |6106730
* fix: undefine win32 StrCat6172292
* fix: //device/vr:directx_helpers breaking the build6064548
Upstreamed in6186102
* fix: avoid calling ui::Layer::SetFillsBoundsOpaquely6175787
The layer opacity is determined by the background color's alpha value * fix: build with proprietary_codecs The explicit setting of rtc_use_h264 is no longer needed since https://webrtc-review.googlesource.com/c/src/+/62380 * fix: increase empty trace file size threshold6176642
Traces now contain a net-constants property to allow them to be converted to a net log. These contain ~1240 new properties with formatted JSON data. * fix: node tests missing resource management globals6174695
* fixup! fix: use explicit copy to replace realloc impl * chore: disable focus handling test due to win32/ia32 regression --------- Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com> Co-authored-by: Charles Kerr <charles@charleskerr.com> Co-authored-by: Keeley Hammond <khammond@slack-corp.com> Co-authored-by: VerteDinde <vertedinde@electronjs.org> Co-authored-by: Samuel Maddock <smaddock@slack-corp.com> Co-authored-by: Samuel Maddock <samuelmaddock@electronjs.org>
This commit is contained in:
parent
996477152d
commit
75eac86506
122 changed files with 680 additions and 1118 deletions
|
@ -25,8 +25,6 @@
|
|||
#include "ui/base/l10n/l10n_util.h"
|
||||
#include "ui/base/resource/resource_bundle.h"
|
||||
#include "url/url_constants.h"
|
||||
// In SHARED_INTERMEDIATE_DIR.
|
||||
#include "widevine_cdm_version.h" // NOLINT(build/include_directory)
|
||||
|
||||
#if BUILDFLAG(ENABLE_WIDEVINE)
|
||||
#include "base/native_library.h"
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
#endif
|
||||
|
||||
using extensions::Command;
|
||||
using extensions::GlobalShortcutListener;
|
||||
using ui::GlobalAcceleratorListener;
|
||||
|
||||
namespace {
|
||||
|
||||
|
@ -59,8 +59,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();
|
||||
|
@ -69,7 +69,7 @@ void GlobalShortcut::OnKeyPressed(const ui::Accelerator& accelerator) {
|
|||
void GlobalShortcut::ExecuteCommand(const extensions::ExtensionId& extension_id,
|
||||
const std::string& command_id) {
|
||||
if (!base::Contains(command_callback_map_, command_id)) {
|
||||
// This should never occur, because if it does, GlobalShortcutListener
|
||||
// This should never occur, because if it does, GlobalAcceleratorListener
|
||||
// notifies us with wrong command.
|
||||
NOTREACHED();
|
||||
}
|
||||
|
@ -110,11 +110,11 @@ bool GlobalShortcut::Register(const ui::Accelerator& accelerator,
|
|||
if (RegisteringMediaKeyForUntrustedClient(accelerator))
|
||||
return false;
|
||||
|
||||
GlobalShortcutListener::SetShouldUseInternalMediaKeyHandling(false);
|
||||
ui::GlobalAcceleratorListener::SetShouldUseInternalMediaKeyHandling(false);
|
||||
}
|
||||
#endif
|
||||
|
||||
auto* instance = GlobalShortcutListener::GetInstance();
|
||||
auto* instance = ui::GlobalAcceleratorListener::GetInstance();
|
||||
if (!instance) {
|
||||
return false;
|
||||
}
|
||||
|
@ -126,7 +126,7 @@ bool GlobalShortcut::Register(const ui::Accelerator& accelerator,
|
|||
// Need a unique profile id. Set one if not generated yet, otherwise re-use
|
||||
// the same so that the session for the globalShortcuts is able to get
|
||||
// already registered shortcuts from the previous session. This will be used
|
||||
// by GlobalShortcutListenerLinux as a session key.
|
||||
// by GlobalAcceleratorListenerLinux as a session key.
|
||||
std::string profile_id = prefs->GetString(kElectronGlobalShortcutsUuid);
|
||||
if (profile_id.empty()) {
|
||||
profile_id = base::Uuid::GenerateRandomV4().AsLowercaseString();
|
||||
|
@ -177,13 +177,13 @@ 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
|
||||
|
||||
if (GlobalShortcutListener::GetInstance()) {
|
||||
GlobalShortcutListener::GetInstance()->UnregisterAccelerator(accelerator,
|
||||
this);
|
||||
if (ui::GlobalAcceleratorListener::GetInstance()) {
|
||||
ui::GlobalAcceleratorListener::GetInstance()->UnregisterAccelerator(
|
||||
accelerator, this);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -210,8 +210,8 @@ void GlobalShortcut::UnregisterAll() {
|
|||
return;
|
||||
}
|
||||
accelerator_callback_map_.clear();
|
||||
if (GlobalShortcutListener::GetInstance()) {
|
||||
GlobalShortcutListener::GetInstance()->UnregisterAccelerators(this);
|
||||
if (ui::GlobalAcceleratorListener::GetInstance()) {
|
||||
ui::GlobalAcceleratorListener::GetInstance()->UnregisterAccelerators(this);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
@ -55,7 +54,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)
|
||||
|
|
|
@ -96,18 +96,18 @@ void AutofillAgent::TextFieldDidEndEditing(const blink::WebInputElement&) {
|
|||
HidePopup();
|
||||
}
|
||||
|
||||
void AutofillAgent::TextFieldDidChange(
|
||||
void AutofillAgent::TextFieldValueChanged(
|
||||
const blink::WebFormControlElement& element) {
|
||||
if (!IsUserGesture() && !render_frame()->IsPasting())
|
||||
return;
|
||||
|
||||
weak_ptr_factory_.InvalidateWeakPtrs();
|
||||
base::SingleThreadTaskRunner::GetCurrentDefault()->PostTask(
|
||||
FROM_HERE, base::BindOnce(&AutofillAgent::TextFieldDidChangeImpl,
|
||||
FROM_HERE, base::BindOnce(&AutofillAgent::TextFieldValueChangedImpl,
|
||||
weak_ptr_factory_.GetWeakPtr(), element));
|
||||
}
|
||||
|
||||
void AutofillAgent::TextFieldDidChangeImpl(
|
||||
void AutofillAgent::TextFieldValueChangedImpl(
|
||||
const blink::WebFormControlElement& element) {
|
||||
ShowSuggestions(element, {.requires_caret_at_end = true});
|
||||
}
|
||||
|
|
|
@ -62,8 +62,8 @@ class AutofillAgent : private content::RenderFrameObserver,
|
|||
|
||||
// blink::WebAutofillClient:
|
||||
void TextFieldDidEndEditing(const blink::WebInputElement&) override;
|
||||
void TextFieldDidChange(const blink::WebFormControlElement&) override;
|
||||
void TextFieldDidChangeImpl(const blink::WebFormControlElement&);
|
||||
void TextFieldValueChanged(const blink::WebFormControlElement&) override;
|
||||
void TextFieldValueChangedImpl(const blink::WebFormControlElement&);
|
||||
void TextFieldDidReceiveKeyDown(const blink::WebInputElement&,
|
||||
const blink::WebKeyboardEvent&) override;
|
||||
void OpenTextDataListChooser(const blink::WebInputElement&) override;
|
||||
|
|
|
@ -10,8 +10,6 @@
|
|||
|
||||
#include "content/public/renderer/content_renderer_client.h"
|
||||
#include "electron/buildflags/buildflags.h"
|
||||
// In SHARED_INTERMEDIATE_DIR.
|
||||
#include "widevine_cdm_version.h" // NOLINT(build/include_directory)
|
||||
|
||||
#if BUILDFLAG(ENABLE_BUILTIN_SPELLCHECKER)
|
||||
#include "services/service_manager/public/cpp/binder_registry.h"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue