feat: update app.{set|get}LoginItemSettings(settings) (#37244)

* feat: update app.{set|get}LoginItemSettings(settings)

* test: fixup and add tests

* docs: add type link

* chore: name -> serviceName
This commit is contained in:
Shelley Vohr 2023-10-16 18:25:11 +02:00 committed by GitHub
parent 6d0d350e13
commit f7b1c75c72
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 321 additions and 89 deletions

View file

@ -135,7 +135,11 @@ class Browser : public WindowListObserver {
std::u16string path;
std::vector<std::u16string> args;
#if BUILDFLAG(IS_WIN)
#if BUILDFLAG(IS_MAC)
std::string type = "mainAppService";
std::string service_name;
std::string status;
#elif BUILDFLAG(IS_WIN)
// used in browser::setLoginItemSettings
bool enabled = true;
std::wstring name;
@ -205,9 +209,9 @@ class Browser : public WindowListObserver {
void ApplyForcedRTL();
// Bounce the dock icon.
enum class BounceType {
kCritical = 0, // NSCriticalRequest
kInformational = 10, // NSInformationalRequest
enum class BounceType{
kCritical = 0, // NSCriticalRequest
kInformational = 10, // NSInformationalRequest
};
int DockBounce(BounceType type);
void DockCancelBounce(int request_id);