Commit Graph
58 Commits
Author SHA1 Message Date
Peter Van der Beken b0d751d865 Bug 1900930 - Make ENSURE_SUCCESS call WouldReportJSException. r=dom-core,win-reviewers,emilio,gstoll,edgar
Making ENSURE_SUCCESS return the result of StealNSResult() ensures that
exceptions in the ErrorResult are deal with. We can then signal that through
WouldReportJSException.

Differential Revision: https://phabricator.services.mozilla.com/D214792
2024-08-21 08:43:09 +00:00
Stanca Serban 68116687ca Backed out 6 changesets (bug 1900930) for causing xpcshell assertion failures in ErrorResult.h. CLOSED TREE
Backed out changeset 5234a13894b2 (bug 1900930)
Backed out changeset 638842494167 (bug 1900930)
Backed out changeset 36695bae43ed (bug 1900930)
Backed out changeset 23ab72aa4589 (bug 1900930)
Backed out changeset c89109c12d59 (bug 1900930)
Backed out changeset 2d3f52edb98a (bug 1900930)
2024-07-25 13:53:53 +03:00
Peter Van der Beken dfe3258373 Bug 1900930 - Make ENSURE_SUCCESS call WouldReportJSException. r=dom-core,win-reviewers,emilio,gstoll,edgar
Making ENSURE_SUCCESS return the result of StealNSResult() ensures that
exceptions in the ErrorResult are deal with. We can then signal that through
WouldReportJSException.

Differential Revision: https://phabricator.services.mozilla.com/D214792
2024-07-25 07:40:40 +00:00
Magnus Melin bbd67965e9 Bug 1898709 - Use GetMostRecentBrowserWindow() instead of GetMostRecentWindow(u"navigator:browser") to cater for Thunderbird's main window. r=nalexander
Based on https://github.com/Betterbird/thunderbird-patches/blob/main/115/bugs/1863798-toast-notification-foreground-mail-client-m-c.patch

Fixed cases where general code assume main window is Firefox.
GetMostRecentBrowserWindow is getting "navigator:browser" for Firefox, so there is no change in behavior,
but it means more things will work for Thunderbird.

Differential Revision: https://phabricator.services.mozilla.com/D211520
2024-05-24 17:43:52 +00:00
Kagami Sascha Rosylight 8bd54b2382 Bug 1879112 - Check permission earlier and mark as closed if failed r=asuth
Differential Revision: https://phabricator.services.mozilla.com/D201140
2024-04-22 16:59:56 +00:00
Sandor Molnar bf0112a5e0 Backed out 2 changesets (bug 1879112, bug 1879934) for causing assertion failures @ widget/windows/ToastNotification.cpp
Backed out changeset 2b3b6edc0cff (bug 1879112)
Backed out changeset 3dd0aa903d7f (bug 1879934)
2024-03-01 20:25:16 +02:00
Kagami Sascha Rosylight 6fa527337a Bug 1879112 - Check permission earlier and mark as closed if failed r=asuth
Differential Revision: https://phabricator.services.mozilla.com/D201140
2024-03-01 11:27:53 +00:00
Nicholas Rishel 32025f3198 Bug 1870757 - Add image placement attribute to nsIWindowsAlertNotification. r=nalexander,mhughes
Adds option to specify Windows toast image placement for notifications popped from the system principal.

Differential Revision: https://phabricator.services.mozilla.com/D197029
2023-12-27 21:49:33 +00:00
Nicholas Rishel e32a9e9359 Bug 1871210 - Extend AlertNotification with WindowsAlertNotification for custom handling of alert buttons on Windows. r=nalexander,mhughes
When `nsIWindowsAlertNotification`'s `handleActions` property is set to true, actions are sent in the notification observer's `aData` field instead of the notification cookie.

Differential Revision: https://phabricator.services.mozilla.com/D196613
2023-12-27 21:49:32 +00:00
Emilio Cobos Álvarez c1cbae5730 Bug 1863035 - Implement a native WinRegistry key. r=win-reviewers,rkraesig
Use it to implement nsIWindowsRegKey, and to replace existing native
callers like WinUtils and nsLookAndFeel.

Differential Revision: https://phabricator.services.mozilla.com/D192756
2023-11-20 10:08:09 +00:00
Nicholas Rishel 29b2ebaf66 Bug 1859957 - Remove unnecessary dynamic loading of GetCurrentApplicationUserModelId. r=bytesized,win-reviewers,gstoll
Differential Revision: https://phabricator.services.mozilla.com/D191382
2023-10-24 17:05:29 +00:00
Masatoshi Kimura a3e419385e Bug 1844908 - Remove pre-Win10-specific codepath from widget/. r=handyman
Differential Revision: https://phabricator.services.mozilla.com/D184307
2023-07-26 08:52:54 +00:00
Natalia Csoregi 42e803a2dd Backed out 19 changesets (bug 1844908) for causing win bustage on AvailableMemoryTracker.cpp. CLOSED TREE
Backed out changeset 44c66f2233cf (bug 1844908)
Backed out changeset a8010ff534bf (bug 1844908)
Backed out changeset 225dc3aeb220 (bug 1844908)
Backed out changeset a1414db64e33 (bug 1844908)
Backed out changeset 7f1e0a527839 (bug 1844908)
Backed out changeset 6dc7646d1ffa (bug 1844908)
Backed out changeset 8d715131510f (bug 1844908)
Backed out changeset 4b6fe8a4e7db (bug 1844908)
Backed out changeset 2b419fabf1e8 (bug 1844908)
Backed out changeset af84e701d616 (bug 1844908)
Backed out changeset 2fa203969ec5 (bug 1844908)
Backed out changeset 2b3d2df94db3 (bug 1844908)
Backed out changeset 7eca452f5fd7 (bug 1844908)
Backed out changeset 3d961cf25afe (bug 1844908)
Backed out changeset 3c59143f8dd7 (bug 1844908)
Backed out changeset ab50c6c5425a (bug 1844908)
Backed out changeset b2c5636df673 (bug 1844908)
Backed out changeset e9a0f1c6760c (bug 1844908)
Backed out changeset 945ccbedde0b (bug 1844908)
2023-07-25 19:55:35 +03:00
Masatoshi Kimura 4182954d50 Bug 1844908 - Remove pre-Win10-specific codepath from widget/. r=handyman
Differential Revision: https://phabricator.services.mozilla.com/D184307
2023-07-25 14:41:05 +00:00
Nick Alexander 9f2bea61fe Bug 1805514 - Part 3: Allow JS opaque relaunch data and actions. r=nrishel
This commit replaces two existing launch argument keys, `launchURL`
and `privilegedName`, with an opaque string of data.  Here opaque
means, "does not need to be inspected by the Windows notification
server DLL" (and in general, by the system backend components).

The existing `action` argument key was always intended for this
purpose but was not used in the first implementation.  Here, we make
`action` a stringified JSON object, which is easy for API consumers to
manage and generalizes to (mostly) arbitrary relaunch data.

This JSON object is a compound `notificationData` object containing
both:
- the consumer-provided `opaqueRelaunchData` (generally, an action);
- and implementation-provided details (the alert's name, if
  privileged, etc).
This compound object and the fact that everything transits as strings
makes everything a little more confusing than it really is.

The API to this opaque relaunch data is based on strings for
convenience.  It would be possible to manage JSON objects, perhaps by
using `nsIStructuredCloneContainer` to serialize "structured clone
encodable" JS objects across the process boundaries, but managing the
objects and container in that approach is much more effort than having
the API consumer stringify as desired.

In addition, this patch makes the notification server extract the
Firefox `action` data from the Windows toast `arguments` passed to the
server callback.  Since this fallback data is now provided to Firefox
at launch, there's no need to fetch it from the Windows notification
object; we simply need to know whether to pass through to a Windows
8.1 callback (`tagWasHandled=true`) or to act on the fallback data
(`tagWasHandled=false`).  This is simpler than teaching Firefox to
extract the arguments for toast itself or the appropriate action
button.

Differential Revision: https://phabricator.services.mozilla.com/D182314
2023-07-15 02:34:06 +00:00
Nicholas Rishel 17fc02597d Bug 1828073 - Fix invalid UTF-16 crashing Windows Toast notifications. r=nalexander
Differential Revision: https://phabricator.services.mozilla.com/D178745
2023-06-02 17:40:55 +00:00
Nicholas Rishel 6ce88ebe57 Bug 1822817 - Part 1: Fix Windows 8 native notifications failing. r=nalexander
`IToastNotification2` is not available in Windows 8, so querying it caused the toast to fail. When the content was only text, the toast would immediately fail triggering a fallback to XUL style alerts. When it contained an image, the async image load caused the toast to fail after the fallback branch had been decided.

The toast tag assigned and retrieved from `IToastNotification2` is used by Windows to track notifications in the Action Center and is only relevant in the context of Windows 10+.

Differential Revision: https://phabricator.services.mozilla.com/D173496
2023-03-31 17:30:14 +00:00
Matthew Noorenberghe 2aea99c96d Bug 1073717 - [Web Notifications] Add support for "silent" toast notifications on Windows. r=mhowell
Depends on D119590

Differential Revision: https://phabricator.services.mozilla.com/D119591
2023-01-07 01:03:53 +00:00
Nicholas Rishel cf906f48f9 Bug 1797679 - Post: Prevent Windows notifications from leaking URL from private browsing session. r=nalexander
When a notification's originating tab is closed, it remains in the action center and launches to the originating domain when clicked. When the notification is from a private browsing session, the originating domain leaks to a non-private context when a private browsing session is still active. This fixes the leak by closing the notification with it's originating tab.

Differential Revision: https://phabricator.services.mozilla.com/D164296
2023-01-06 18:36:24 +00:00
Nicholas Rishel 35c2c30aae Bug 1787004 - Fix notifications not closing when notification.close() is called. r=nalexander,geckoview-reviewers,smaug,jonalmeida
This adds context to `CloseAlert()` such that explicitly closing the notification e.g. `notification.close()` can be differentiated from a tab or window implicitly closing the notification. This is necessary as we want notifications to persist after a tab or window is closed for Windows.

This change in behavior is necessary to match user expectations. Users expect notifications to persist in the system tray and do not expect notifications to be lost due to a tab being closed. The content of the message is more important than the interaction in that lens. This change is also necessary for parity with Chrome.

Differential Revision: https://phabricator.services.mozilla.com/D161024
2023-01-06 18:36:23 +00:00
Nicholas Rishel 2bb46b9407 Bug 1787004 - Pre: Refactor logic for hiding private notifications when the private browsing context is closed to share code from cleaning up notification data when the application quits. r=nalexander
Differential Revision: https://phabricator.services.mozilla.com/D162178
2023-01-06 18:36:23 +00:00
Nicholas Rishel 784c7d531b Bug 1795974 - Allow Firefox to focus itself when a Windows native notification is clicked. r=nalexander,nika
Notifications are now routed through a notification DLL server, which receives permission to set the foreground window when invoked. When the server launches Firefox, the command line is redirected to the currently running application. An instance of Firefox running as a remote client doesn't meet Window's criteria for receiving the set foreground permission, breaking the chain of set foreground window permissions.

This change fixes the chain by piping the PID of the notification handling process such that the DLL server can grant it foreground permission directly.

Differential Revision: https://phabricator.services.mozilla.com/D160457
2023-01-06 18:36:23 +00:00
Nicholas Rishel 323bf529dd Bug 1797678 - Fix Windows native notifications interaction from prior Firefox instances and closed tabs. r=nalexander,Jamie,mossop
We need to ensure we're not in a `WndProc` callback context when interacting with native notification COM objects, which is currently a problem when called from the command line handler (see Bug 1805802). We achieve this by moving COM work onto a background task which defers processing until after `WndProc` returns.

Now that retrieving the fallback URL occurs on a background task waiting for it before returning would block the main thread. Making `handleWindowsTag` async introduced race conditions with commandline handling, requiring a `enterLastWindowClosingSurvivalArea`/`exitLastWindowClosingSurvivalArea` to prevent misbehavior in case early blank window is pref'd off. In order to simplify exit cleanup, the API was updated to return a `Promise`.

Differential Revision: https://phabricator.services.mozilla.com/D160458
2023-01-06 18:36:21 +00:00
Nicholas Rishel 8833631bbc Bug 1786578 - Dismiss Windows native toast notifications when Firefox is closed in a private browsing session. r=nalexander.
Prior to this commit the `ToastNotification`'s observer registration doesn't work due to `ToastNotification` not implementing `nsIWeakReference` while attempting to register itself as an observer as a weak reference.

Differential Revision: https://phabricator.services.mozilla.com/D155764
2022-09-14 20:48:48 +00:00
Nicholas Rishel 140b0f02a3 Bug 1789390 - Remove scheduled and Action Center notifications during uninstall. r=nalexander
Non-MSIX notifications are not removed when Firefox is uninstalled. To handled this we've added a new `uninstall` background task and extended `nsIWindowsAlertService` to deregister notifications on uninstall.

Differential Revision: https://phabricator.services.mozilla.com/D156625
2022-09-14 00:42:43 +00:00
Iulian Moraru f8926a3448 Backed out 2 changesets (bug 1789390) for causing bc failures regarding unreferenced file on BackgroundTask_uninstall.jsm. CLOSED TREE
Backed out changeset 4cec525d92f4 (bug 1789390)
Backed out changeset 6fcec3502cb2 (bug 1789390)
2022-09-13 13:20:20 +03:00
Nicholas Rishel 7ff5d79899 Bug 1789390 - Remove scheduled and Action Center notifications during uninstall. r=nalexander
Non-MSIX notifications are not removed when Firefox is uninstalled. To handled this we've added a new `uninstall` background task and extended `nsIWindowsAlertService` to deregister notifications on uninstall.

Differential Revision: https://phabricator.services.mozilla.com/D156625
2022-09-13 06:09:30 +00:00
Nick Alexander b85602e1a7 Bug 1788960 - Part 1: Round trip name for privileged alerts through Firefox restart. r=nrishel
On Windows, when an alert is privileged and `name` is non-empty, round
trip its `name` (as `privilegedName`) through the Windows notification
mechanism, and provide it to the "relaunch" callback.

Differential Revision: https://phabricator.services.mozilla.com/D156636
2022-09-13 02:43:17 +00:00
Nick Alexander 5025b0ded2 Bug 1781929 - Part 4: Pass through or launch Firefox from notification server. r=nrishel
When the notification server callback is executed by the Windows
notification system, it invokes Firefox with additional command line
parameters, most importantly the Windows-specific notification
"Windows tag".

If no appropriate Firefox is running, the command line will be
processed, the provided Windows tag will be inspected (and seen to not
be registered with this running Firefox instance) and a "launch URL"
stored as part of the Windows notification itself opened (if one is
provided).

If an appropriate Firefox is running, the remoting protocol will
forward this command line to the running instance.  If the instance
recognizes the provided `--notification-windowsTag`, the command line
will be ignored.  When the notification server exits, Windows will
fallback to the Windows 8.1 style notification callbacks registered
for this Windows tag and the existing (non notification server)
behaviour will occur.

In fact, the server therefore waits for a Windows tag-specific system
event to be signalled by the invoked Firefox (or a sibling process).
If we were to return `S_OK` from the notification server immediately,
and a running Firefox process would handle the notification via
Windows 8.1-style notification callbacks, then Windows would fall back
to those callbacks.  The invoked callbacks unregister themselves upon
completion, often before the launched Firefox has an opportunity to
process the command line.  By waiting for this system event, we allow
the invoked Firefox to process the command line while its own
notification callbacks are registered and therefore recognize that its
callbacks will handle the notification.

Differential Revision: https://phabricator.services.mozilla.com/D154468
2022-09-03 22:49:02 +00:00
Nick Alexander cf5c239c63 Bug 1781929 - Part 3: Include launchUrl in Windows toast notification. r=nrishel
Differential Revision: https://phabricator.services.mozilla.com/D155909
2022-09-03 22:49:01 +00:00
Marian-Vasile Laza 48f9a164c7 Backed out 5 changesets (bug 1781929, bug 1784367) for causing bc test failures. CLOSED TREE
Backed out changeset 34003f6f7b27 (bug 1781929)
Backed out changeset 8e6fe1c18e8d (bug 1781929)
Backed out changeset e50432e37751 (bug 1781929)
Backed out changeset abf6eff708d8 (bug 1781929)
Backed out changeset 15fec49b7587 (bug 1784367)
2022-09-03 02:26:04 +03:00
Nick Alexander 6249d25e59 Bug 1781929 - Part 4: Pass through or launch Firefox from notification server. r=nrishel
When the notification server callback is executed by the Windows
notification system, it invokes Firefox with additional command line
parameters, most importantly the Windows-specific notification
"Windows tag".

If no appropriate Firefox is running, the command line will be
processed, the provided Windows tag will be inspected (and seen to not
be registered with this running Firefox instance) and a "launch URL"
stored as part of the Windows notification itself opened (if one is
provided).

If an appropriate Firefox is running, the remoting protocol will
forward this command line to the running instance.  If the instance
recognizes the provided `--notification-windowsTag`, the command line
will be ignored.  When the notification server exits, Windows will
fallback to the Windows 8.1 style notification callbacks registered
for this Windows tag and the existing (non notification server)
behaviour will occur.

In fact, the server therefore waits for a Windows tag-specific system
event to be signalled by the invoked Firefox (or a sibling process).
If we were to return `S_OK` from the notification server immediately,
and a running Firefox process would handle the notification via
Windows 8.1-style notification callbacks, then Windows would fall back
to those callbacks.  The invoked callbacks unregister themselves upon
completion, often before the launched Firefox has an opportunity to
process the command line.  By waiting for this system event, we allow
the invoked Firefox to process the command line while its own
notification callbacks are registered and therefore recognize that its
callbacks will handle the notification.

Differential Revision: https://phabricator.services.mozilla.com/D154468
2022-09-02 20:22:51 +00:00
Nick Alexander a6846e3c69 Bug 1781929 - Part 3: Include launchUrl in Windows toast notification. r=nrishel
Differential Revision: https://phabricator.services.mozilla.com/D155909
2022-09-02 20:22:51 +00:00
Nick Alexander 57136875f1 Bug 1787573 - Allow privileged Windows native notification actions to have activationType="system". r=nrishel,smaug
This allows Windows native notification action buttons to access the
built-in "dismiss" and "snooze" support without requiring a Firefox
invocation.

Differential Revision: https://phabricator.services.mozilla.com/D155906
2022-09-01 22:48:21 +00:00
Nicholas Rishel f1906f8871 Bug 1774082 - Add AUMID handling for Windows toast notifications. r=nalexander
For MSIX packages, the package AUMID is used.

For NSIS/MSI installs, AUMID is retrieve from HKCR.

For portable builds, the registry is updated at runtime to populate icons, display name, and the COM server.

The COM server has been registered as will be implemented using DllSurrogate; this allows us to offload managing the eventloop and lifetime of the COM server to dllhost.exe, and minimizes the added code complexity.

The COM server is loaded as a separate executable from the sending process to prevent issues that would occur when multiple instances of the sending process (e.g. profiles running in parallel) try to stand up parallel COM servers. The separated COM executable also allows for multiple applications to share a common COM server.

Bonus: fixes Bug 1500054, Bug 1766095, and Bug 1743424.

Differential Revision: https://phabricator.services.mozilla.com/D151739
2022-08-02 19:40:38 +00:00
Iulian Moraru c4ef492a26 Backed out 6 changesets (bug 1774083, bug 1774082) for causing xpcshell failures. CLOSED TREE
Backed out changeset 4056bc743e25 (bug 1774083)
Backed out changeset ad20680728cc (bug 1774083)
Backed out changeset 173c4519227f (bug 1774083)
Backed out changeset 54beca69e971 (bug 1774083)
Backed out changeset 1d9d80c75d9d (bug 1774082)
Backed out changeset 7b03aa4c49d1 (bug 1774082)
2022-08-02 02:46:47 +03:00
Nicholas Rishel 3754b480ef Bug 1774082 - Add AUMID handling for Windows toast notifications. r=nalexander
For MSIX packages, the package AUMID is used.

For NSIS/MSI installs, AUMID is retrieve from HKCR.

For portable builds, the registry is updated at runtime to populate icons, display name, and the COM server.

The COM server has been registered as will be implemented using DllSurrogate; this allows us to offload managing the eventloop and lifetime of the COM server to dllhost.exe, and minimizes the added code complexity.

The COM server is loaded as a separate executable from the sending process to prevent issues that would occur when multiple instances of the sending process (e.g. profiles running in parallel) try to stand up parallel COM servers. The separated COM executable also allows for multiple applications to share a common COM server.

Bonus: fixes Bug 1500054, Bug 1766095, and Bug 1743424.

Differential Revision: https://phabricator.services.mozilla.com/D151739
2022-08-01 21:38:05 +00:00
Butkovits Atila 6fb2f0d42a Backed out 2 changesets (bug 1774082) for causing failure at test_windows_alert_service.js. CLOSED TREE
Backed out changeset a9553786b2ee (bug 1774082)
Backed out changeset da2ad41a6d10 (bug 1774082)
2022-08-01 01:40:13 +03:00
Nicholas Rishel 908e766378 Bug 1774082 - Add AUMID handling for Windows toast notifications. r=nalexander
For MSIX packages, the package AUMID is used.

For NSIS/MSI installs, AUMID is retrieve from HKCR.

For portable builds, the registry is updated at runtime to populate icons, display name, and the COM server.

The COM server has been registered as will be implemented using DllSurrogate; this allows us to offload managing the eventloop and lifetime of the COM server to dllhost.exe, and minimizes the added code complexity.

The COM server is loaded as a separate executable from the sending process to prevent issues that would occur when multiple instances of the sending process (e.g. profiles running in parallel) try to stand up parallel COM servers. The separated COM executable also allows for multiple applications to share a common COM server.

Bonus: fixes Bug 1500054, Bug 1766095, and Bug 1743424.

Differential Revision: https://phabricator.services.mozilla.com/D151739
2022-07-31 21:59:30 +00:00
Nicholas Rishel c67a357742 Bug 1604883 - Use background thread pool for Windows toast notifications. r=nalexander,KrisWright
Differential Revision: https://phabricator.services.mozilla.com/D142357
2022-07-26 20:29:42 +00:00
Nick Alexander 9f58a0fa08 Bug 1775136 - Part 2: Support requireInteraction and actions in alert service and native Windows notifications. r=mhowell,smaug
1.  `requireInteraction` already existed, but it doesn't do anything.
    This patch makes it mean `scenario="reminder"` in the Windows
    Toast notification schema: see
    https://docs.microsoft.com/en-us/uwp/schemas/tiles/toastschema/element-toast.

2.  `actions` is intended to eventually support the Chrome-only
    extension to the Web Notifications API: see
    https://developer.mozilla.org/en-US/docs/Web/API/Notification/actions.

3.  We run into an `xpconnect` limit on the number of supported
    parameters.  Rather than bump the limit, which has global
    consequence, I added a second `init*` method.  The existing
    abstraction is horrible, but I can't rework it within my
    timelines.  Should we choose to invest, we might migrate to WebIDL
    so that we can sensibly use options objects.

Differential Revision: https://phabricator.services.mozilla.com/D150667
2022-07-12 03:18:42 +00:00
Nick Alexander 71567c2dc2 Bug 1775136 - Part 1: Add nsIWindowsAlertService to enable testing. r=mhowell
This also provides an entry point for Windows-specific styling of
alerts, should specific consumers want one: e.g.,
`nsIWindowsAlertsService.showWindowsAlert(...)` allowing to configure
the toast template, for example.

Differential Revision: https://phabricator.services.mozilla.com/D151187
2022-07-12 03:18:41 +00:00
Butkovits Atila 08f1cc9b2f Backed out 2 changesets (bug 1775136) for causing failures at test_windows_alert_service.js
Backed out changeset bfa523daaf13 (bug 1775136)
Backed out changeset 5e75e93d9ba3 (bug 1775136)
2022-07-12 04:35:51 +03:00
Nick Alexander 89b5acf03e Bug 1775136 - Part 2: Support requireInteraction and actions in alert service and native Windows notifications. r=mhowell,smaug
1.  `requireInteraction` already existed, but it doesn't do anything.
    This patch makes it mean `scenario="reminder"` in the Windows
    Toast notification schema: see
    https://docs.microsoft.com/en-us/uwp/schemas/tiles/toastschema/element-toast.

2.  `actions` is intended to eventually support the Chrome-only
    extension to the Web Notifications API: see
    https://developer.mozilla.org/en-US/docs/Web/API/Notification/actions.

3.  We run into an `xpconnect` limit on the number of supported
    parameters.  Rather than bump the limit, which has global
    consequence, I added a second `init*` method.  The existing
    abstraction is horrible, but I can't rework it within my
    timelines.  Should we choose to invest, we might migrate to WebIDL
    so that we can sensibly use options objects.

Differential Revision: https://phabricator.services.mozilla.com/D150667
2022-07-11 23:23:53 +00:00
Nick Alexander ebecc82fe7 Bug 1775136 - Part 1: Add nsIWindowsAlertService to enable testing. r=mhowell
This also provides an entry point for Windows-specific styling of
alerts, should specific consumers want one: e.g.,
`nsIWindowsAlertsService.showWindowsAlert(...)` allowing to configure
the toast template, for example.

Differential Revision: https://phabricator.services.mozilla.com/D151187
2022-07-11 23:23:53 +00:00
Emilio Cobos Álvarez 863916f01d Bug 1648358 - Implement nsIAlertDoNotDisturb for windows native alerts. r=saschanaz
This happens to be D76407, but I missed it before writing this.

Differential Revision: https://phabricator.services.mozilla.com/D139361
2022-02-23 20:07:39 +00:00
Emilio Cobos Álvarez 36fbddd277 Bug 1648358 - Modernize a bit ToastNotification. r=saschanaz
Nobody is using the weak reference stuff so remove it.

Differential Revision: https://phabricator.services.mozilla.com/D139360
2022-02-23 20:07:38 +00:00
Andi-Bogdan Postelnicu b65cdc23a6 Bug 1519636 - Reformat recent changes to the Google coding style. r=necko-reviewers,geckoview-reviewers,agi
Updated with clang-format version 11.0.1 (taskcluster-GI8pmG3eQ_OSXfjFfr2yFw)

\# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D113294
2021-04-26 15:52:25 +00:00
Agi Sferro f4825f907a Bug 1696145 - Support Notification.silent and .vibrate on Android. r=smaug,droeh,aklotz
Differential Revision: https://phabricator.services.mozilla.com/D111924
2021-04-20 18:35:36 +00:00
Simon Giesecke 95c38cc6b8 Bug 1691913 - Rename nsBaseHashtable::Put to InsertOrUpdate. r=xpcom-reviewers,necko-reviewers,jgilbert,dragana,nika
This makes the naming more consistent with other functions called
Insert and/or Update. Also, it removes the ambiguity whether
Put expects that an entry already exists or not, in particular because
it differed from nsTHashtable::PutEntry in that regard.

Differential Revision: https://phabricator.services.mozilla.com/D105473
2021-02-26 09:11:46 +00:00