This is done by calling `AddonManagerPrivate.callInstallListeners` when we handle
`SitePermsAddonInstall`'s specific listeners.
We take this as an opportunity to remove support for the `onDownloadEnded` event
as it didn't do anything and isn't something we want to record for SitePermsAddon.
We also set `SitePermsAddonInstall#installId` which is used in `AMTelemetry`.
Assertions on registered telemetry events are added in browser_midi_permission_gated.js,
and a test case is added to ensure cancelling the event from the second popup works
as expected, since it wasn't checked before.
Differential Revision: https://phabricator.services.mozilla.com/D162412
This patch adds a specific path for getting the localized text for the addon
install prompt for SitePermissionsAddon.
As the message that we want isn't very generic, each gated permission will have
its own localized addon prompt message.
Differential Revision: https://phabricator.services.mozilla.com/D160452
This patch adds a specific path for getting the localized text for the addon
install prompt for SitePermissionsAddon.
As the message that we want isn't very generic, each gated permission will have
its own localized addon prompt message.
Differential Revision: https://phabricator.services.mozilla.com/D160452
Existing tests are updated so they pass with this change, and a specific
test case is added to make sure that adding midi-sysex permission does
not automatically add permission to midi.
Differential Revision: https://phabricator.services.mozilla.com/D160370
With the new synthetic add-on provider, we do not return an error when calling `navigator.requestMIDIAccess()` without an add-on installed because there is *always* an add-on.
Differential Revision: https://phabricator.services.mozilla.com/D159464
This error message provides extra information to developers so they know why the access was denied
(e.g. for public etld, remote subframes, ...).
Differential Revision: https://phabricator.services.mozilla.com/D159246
This is done by adding Navigator::HasMidiSupport that we reference in
the Navigator.webidl `Func` extented attribute for `requestMIDIAccess`.
A test case is added to browser_midi_permission_gated.js to ensure this
works as expected.
Differential Revision: https://phabricator.services.mozilla.com/D157321
When the pref is true, we want to go through the new SitePermissionAddon install flow.
We adjust the rejection message so it doesn't mention the previous implementation.
A test is added to ensure that calling `navigator.requestMIDIAccess` does follow the SitePermissionAddon
install flow, and the the promise gets resolved/rejected when the user accept/deny installing the addon.
Differential Revision: https://phabricator.services.mozilla.com/D156192
This will be used in SitePermsAddonInstallRequestPrototype to discriminate permission
requests coming from localhost, where we want to fallback to regular permission prompt.
Depends on D151477
Differential Revision: https://phabricator.services.mozilla.com/D157658
This change matches Chrome's behavior of not throwing in cases when the
data field is null. However contrary to Chrome we populate the object
with an empty array instead of a null reference.
Differential Revision: https://phabricator.services.mozilla.com/D146672
This change matches Chrome's behavior of not throwing in cases when the
data field is null. However contrary to Chrome we populate the object
with an empty array instead of a null reference.
Differential Revision: https://phabricator.services.mozilla.com/D146672
This change matches Chrome's behavior of not throwing in cases when the
data field is null. However contrary to Chrome we populate the object
with an empty array instead of a null reference.
Differential Revision: https://phabricator.services.mozilla.com/D146672
This patch removes the redundant nsICryptoHMAC interface and implementation,
updates front-end code to use WebCrypto, and changes back-end code to use the
helper class HMAC introduced by this patch.
This also removes the last uses of nsIKeyObject and nsIKeyObjectFactory, and
thus those interfaces and implementations as well.
Differential Revision: https://phabricator.services.mozilla.com/D145656
dom/midi/MIDIUtils.cpp:110:12: error: variable 'bytesRead' set but not used [-Werror,-Wunused-but-set-variable]
uint32_t bytesRead = 0;
^
Differential Revision: https://phabricator.services.mozilla.com/D144140