mirror of
https://github.com/electron/electron.git
synced 2026-01-14 09:58:04 -05:00
* chore: bump chromium in DEPS to 145.0.7562.0 * fix(patch-conflict): update code cache patch for PersistentCache refactor Upstream refactored code cache to use PersistentCache with new class-based implementation (NoopCodeCacheHost, LocalCodeCacheHost, CodeCacheWithPersistentCacheHost). Updated patch to integrate custom scheme support into the new structure while preserving ProcessLockURLIsCodeCacheScheme checks for embedder-registered schemes. Ref: https://chromium-review.googlesource.com/c/chromium/src/+/7044986 Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com> * fix(patch-conflict): update dialog patch for RequestXdgDesktopPortal API Upstream changed from SetSystemdScopeUnitNameForXdgPortal to RequestXdgDesktopPortal API pattern. Updated OnServiceStarted signature and kept OnSystemdUnitStarted callback that calls Electron's file_dialog::StartPortalAvailabilityTestInBackground(). Ref: https://chromium-review.googlesource.com/c/chromium/src/+/7204285 Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com> * fix(patch-conflict): remove reference to deleted AbortByPlaceholderLayout flag Upstream removed the AbortByPlaceholderLayout runtime flag from runtime_enabled_features.json5. Updated patch to only add ElectronCSSCornerSmoothing without the removed flag reference. Ref: https://chromium-review.googlesource.com/c/chromium/src/+/7226494 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> * fix(build): guard media_file_system_registry for ChromeOS only Upstream CL https://chromium-review.googlesource.com/c/chromium/src/+/7100719 moved media_file_system_registry to be ChromeOS-only since Media Galleries is a Chrome Apps API and Chrome Apps are only available on Chrome OS now. Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com> * fix(build): update VideoPixelFormat API for SharedImageFormat Upstream CL https://chromium-review.googlesource.com/c/chromium/src/+/7207153 removed VideoPixelFormatToGfxBufferFormat as part of migration to SharedImageFormat. Update to use VideoPixelFormatToSharedImageFormat which directly returns the SharedImageFormat. Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com> * fix(build): extend profile methods patch for ShouldEnableXfaForms The ShouldEnableXfaForms function uses Profile::FromBrowserContext() which is not available in Electron. Wrap the profile-dependent code in #if 0 to fall through to the feature flag default. Co-Authored-By: Claude <noreply@anthropic.com> * chore: bump chromium in DEPS to 145.0.7563.0 * chore: bump chromium in DEPS to 145.0.7565.0 * chore: bump chromium in DEPS to 145.0.7567.0 * chore: bump chromium in DEPS to 145.0.7568.0 * fix(patch-conflict): update content_main_delegate.h context for IsInitFeatureListEarly Upstream added a new IsInitFeatureListEarly() virtual method to ContentMainDelegate just before where our GetBrowserV8SnapshotFilename() method is added. Updated patch context to account for this new method. Ref: https://chromium-review.googlesource.com/c/chromium/src/+/7092856 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> * fix(patch-update): include v8-cppgc.h for CppHeap complete type The std::unique_ptr<v8::CppHeap> default argument in node.h requires the complete CppHeap type definition for the destructor. Added the v8-cppgc.h include to provide the full type definition. Ref: Unable to locate CL - libc++ unique_ptr requires complete type for destructor 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> * fix(build): move NativeAppWindowFrameViewMacClient before constructor The std::unique_ptr<NativeAppWindowFrameViewMacClient> member requires the complete type definition to be visible at the point of the constructor because the unique_ptr destructor may be instantiated during exception handling. Moved the class definition before the NativeWindowMac constructor. Ref: Unable to locate CL - libc++ unique_ptr requires complete type for destructor Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com> * fix(patch-conflict): update create_browser_v8_snapshot_file_name_fuse context for IsInitFeatureListEarly The upstream added IsInitFeatureListEarly() virtual method declaration to ContentMainDelegate class. Updated the patch context to account for this new function being present before the GetBrowserV8SnapshotFilename() declaration we add. Ref: https://chromium-review.googlesource.com/c/chromium/src/+/7092856 Co-Authored-By: Claude <noreply@anthropic.com> * chore: update patch hunk headers Co-Authored-By: Claude <noreply@anthropic.com> * fix(patch-update): remove reverted IsInitFeatureListEarly from v8 snapshot patch The upstream added IsInitFeatureListEarly() was reverted, so the patch should not include this declaration. Only GetBrowserV8SnapshotFilename() should be added by the create_browser_v8_snapshot_file_name_fuse patch. Ref: https://chromium-review.googlesource.com/c/chromium/src/+/7230430 Co-Authored-By: Claude <noreply@anthropic.com> * 6171655: include single_thread_task_runner.h for complete type Added include for base/task/single_thread_task_runner.h in osr_converter.cc to resolve incomplete type error when using base::SingleThreadTaskRunner::GetCurrentDefault(). Ref: https://chromium-review.googlesource.com/c/chromium/src/+/6171655 Co-Authored-By: Claude <noreply@anthropic.com> * 7224136: use CHROMIUM_GIT_REVISION directly instead of removed function Upstream removed GetChromiumGitRevision() function from embedder_support. Updated to use CHROMIUM_GIT_REVISION macro directly via build/util/chromium_git_revision.h as recommended in the Chromium CL. Ref: https://chromium-review.googlesource.com/c/chromium/src/+/7224136 Co-Authored-By: Claude <noreply@anthropic.com> * fixup! 7224136: use CHROMIUM_GIT_REVISION directly instead of removed function * fix(build): add missing include `components/dbus/xdg/systemd.h` for `void OnSystemdUnitStarted(dbus_xdg::SystemdUnitStatus)` in the same patch. * fix(build): adapt to string-view-ification change in windows jump_list.cc 7186922: Fix unsafe buffer usage in base/win/win_util.cc https://chromium-review.googlesource.com/c/chromium/src/+/7186922 * chore: update libc++ filenames * fixup! fix(build): add missing include * fixup! fix(build): extend profile methods patch for ShouldEnableXfaForms * fixup! fix(build): guard media_file_system_registry for ChromeOS only * fixup! fixup! fix(build): extend profile methods patch for ShouldEnableXfaForms --------- 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: Claude <noreply@anthropic.com> Co-authored-by: clavin <clavin@electronjs.org>
79 lines
3.8 KiB
Diff
79 lines
3.8 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Damglador <vse.stopchanskyi@gmail.com>
|
|
Date: Mon, 27 Oct 2025 23:35:43 +0100
|
|
Subject: fix: allow setting tray id
|
|
|
|
This is needed to allow setting custom tray id when initializing a tray icon.
|
|
With current behaviour all programs get chrome_status_icon_1 as their id in tray.
|
|
So tray can't tell apart Electron apps,
|
|
which introduces issues like https://bugs.kde.org/show_bug.cgi?id=470840.
|
|
|
|
This patch can be removed after being upstreamed. See discussion at
|
|
https://github.com/electron/electron/pull/48675#issuecomment-3452781711
|
|
for more info.
|
|
|
|
diff --git a/chrome/browser/ui/views/status_icons/status_icon_linux_dbus.cc b/chrome/browser/ui/views/status_icons/status_icon_linux_dbus.cc
|
|
index 72a61f80eb5dfafe2609ec9e3f8f34c7c84f7abe..af68cc7486c450f9b9765f562fab71855686cc2e 100644
|
|
--- a/chrome/browser/ui/views/status_icons/status_icon_linux_dbus.cc
|
|
+++ b/chrome/browser/ui/views/status_icons/status_icon_linux_dbus.cc
|
|
@@ -133,8 +133,9 @@ int NextServiceId() {
|
|
return ++status_icon_count;
|
|
}
|
|
|
|
-std::string PropertyIdFromId(int service_id) {
|
|
- return "chrome_status_icon_" + base::NumberToString(service_id);
|
|
+std::string PropertyIdFromId(int service_id, const std::string_view app_name) {
|
|
+ return base::StrCat(
|
|
+ {app_name, "_status_icon_", base::NumberToString(service_id)});
|
|
}
|
|
|
|
using DbusImage = std::tuple</*width=*/int32_t,
|
|
@@ -224,12 +225,13 @@ base::FilePath WriteIconFile(size_t icon_file_id,
|
|
|
|
} // namespace
|
|
|
|
-StatusIconLinuxDbus::StatusIconLinuxDbus()
|
|
+StatusIconLinuxDbus::StatusIconLinuxDbus(const std::string_view app_name)
|
|
: bus_(dbus_thread_linux::GetSharedSessionBus()),
|
|
should_write_icon_to_file_(ShouldWriteIconToFile()),
|
|
icon_task_runner_(base::ThreadPool::CreateSequencedTaskRunner(
|
|
{base::MayBlock(), base::TaskPriority::USER_VISIBLE,
|
|
- base::TaskShutdownBehavior::BLOCK_SHUTDOWN})) {
|
|
+ base::TaskShutdownBehavior::BLOCK_SHUTDOWN})),
|
|
+ app_name_(app_name) {
|
|
DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
|
|
CheckStatusNotifierWatcherHasOwner();
|
|
}
|
|
@@ -405,7 +407,8 @@ void StatusIconLinuxDbus::OnHostRegisteredResponse(
|
|
properties_->SetProperty<"s">(kInterfaceStatusNotifierItem, kPropertyCategory,
|
|
kPropertyValueCategory, false);
|
|
properties_->SetProperty<"s">(kInterfaceStatusNotifierItem, kPropertyId,
|
|
- PropertyIdFromId(service_id_), false);
|
|
+ PropertyIdFromId(service_id_, app_name_),
|
|
+ false);
|
|
properties_->SetProperty<"s">(kInterfaceStatusNotifierItem,
|
|
kPropertyOverlayIconName, "", false);
|
|
properties_->SetProperty<"s">(kInterfaceStatusNotifierItem, kPropertyStatus,
|
|
diff --git a/chrome/browser/ui/views/status_icons/status_icon_linux_dbus.h b/chrome/browser/ui/views/status_icons/status_icon_linux_dbus.h
|
|
index 5457f98158a094a5b8768352d2868e3005afd395..13ac4e51019ea68fdccd17aac8a4855bde50964b 100644
|
|
--- a/chrome/browser/ui/views/status_icons/status_icon_linux_dbus.h
|
|
+++ b/chrome/browser/ui/views/status_icons/status_icon_linux_dbus.h
|
|
@@ -37,7 +37,7 @@ class StatusIconLinuxDbus : public ui::StatusIconLinux,
|
|
public ui::SimpleMenuModel::Delegate,
|
|
public base::RefCounted<StatusIconLinuxDbus> {
|
|
public:
|
|
- StatusIconLinuxDbus();
|
|
+ StatusIconLinuxDbus(const std::string_view app_name = "chrome");
|
|
|
|
StatusIconLinuxDbus(const StatusIconLinuxDbus&) = delete;
|
|
StatusIconLinuxDbus& operator=(const StatusIconLinuxDbus&) = delete;
|
|
@@ -135,6 +135,8 @@ class StatusIconLinuxDbus : public ui::StatusIconLinux,
|
|
size_t icon_file_id_ = 0;
|
|
base::FilePath icon_file_;
|
|
|
|
+ std::string app_name_;
|
|
+
|
|
base::WeakPtrFactory<StatusIconLinuxDbus> weak_factory_{this};
|
|
};
|
|
|