feat: allow macOS tray to maintain position (#48077)
This commit is contained in:
parent
aa022ce30e
commit
20a563c27d
13 changed files with 101 additions and 34 deletions
|
@ -45,7 +45,7 @@ class Tray final : public gin_helper::DeprecatedWrappable<Tray>,
|
|||
// gin_helper::Constructible
|
||||
static gin_helper::Handle<Tray> New(gin_helper::ErrorThrower thrower,
|
||||
v8::Local<v8::Value> image,
|
||||
std::optional<UUID> guid,
|
||||
std::optional<base::Uuid> guid,
|
||||
gin::Arguments* args);
|
||||
|
||||
static void FillObjectTemplate(v8::Isolate*, v8::Local<v8::ObjectTemplate>);
|
||||
|
@ -65,7 +65,7 @@ class Tray final : public gin_helper::DeprecatedWrappable<Tray>,
|
|||
private:
|
||||
Tray(v8::Isolate* isolate,
|
||||
v8::Local<v8::Value> image,
|
||||
std::optional<UUID> guid);
|
||||
std::optional<base::Uuid> guid);
|
||||
~Tray() override;
|
||||
|
||||
// TrayIconObserver:
|
||||
|
@ -111,10 +111,12 @@ class Tray final : public gin_helper::DeprecatedWrappable<Tray>,
|
|||
void SetContextMenu(gin_helper::ErrorThrower thrower,
|
||||
v8::Local<v8::Value> arg);
|
||||
gfx::Rect GetBounds();
|
||||
v8::Local<v8::Value> GetGUID();
|
||||
|
||||
bool CheckAlive();
|
||||
|
||||
v8::Global<v8::Value> menu_;
|
||||
std::optional<base::Uuid> guid_;
|
||||
std::unique_ptr<TrayIcon> tray_icon_;
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue