feat: allow GUID parameter to avoid systray demotion on Windows (#21891)

* fix: systray icon demotion

Adding support for GUID parameter in Tray API.
In combination with signed binaries this allows to maintain
the position in the systray on Windows.

* unit tests

* make mac and linux compile
This commit is contained in:
bitdisaster 2020-01-30 21:37:03 -08:00 committed by GitHub
parent 2955c67c4e
commit 89eb309d0b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
13 changed files with 143 additions and 15 deletions

View file

@ -11,13 +11,14 @@
#include "base/observer_list.h"
#include "shell/browser/ui/atom_menu_model.h"
#include "shell/browser/ui/tray_icon_observer.h"
#include "shell/common/gin_converters/guid_converter.h"
#include "ui/gfx/geometry/rect.h"
namespace electron {
class TrayIcon {
public:
static TrayIcon* Create();
static TrayIcon* Create(base::Optional<UUID> guid);
#if defined(OS_WIN)
using ImageType = HICON;