Closed Bug 952217 Opened 8 years ago Closed 8 years ago
[B2G][NFC] Have a separate NFC application API and NFC Manager API
The current NFC DOM has the W3C part, and a set of internal APIs for the NFC Manager to use. As per Bug 933093, https://bugzilla.mozilla.org/show_bug.cgi?id=933093#c76 The NFC API should keep them separate applications are never exposed to NFC Manager only APIs.
> The NFC applications should not be exposed to NFC Manager only APIs.
blocking-b2g: --- → 1.4?
Implementation note: A completely separate mozNfcManager and mozNfc DOM object has one downside: NfcContentHelper must be instantiated once for each navigator DOM, or 2 times per clild process.
This turned out to be a simple refactor, if the mozNfc just inherits from the NFC Manager. I did split 2 ChromeOnly functions in mozNfc out into a partial interface since it wasn't in the W3C spec. Comments?
Attachment #8356828 - Flags: feedback?(bugs)
Attachment #8356828 - Flags: feedback?(bugs) → review?(bugs)
Attachment #8356829 - Flags: feedback?(bugs) → review?(bugs)
Comment on attachment 8356829 [details] [diff] [review] Bug 952217. Update NFC UUIDs for NFC Manager API refactor. Part 2. I don't understand why this is needed.
Attachment #8356829 - Flags: review?(bugs)
Comment on attachment 8356829 [details] [diff] [review] Bug 952217. Update NFC UUIDs for NFC Manager API refactor. Part 2. You're right. No api actually changed, marking obsolete.
Attachment #8356829 - Attachment is obsolete: true
Remove Part 1. is sr= needed for this webidl DOM change? try in progress: https://tbpl.mozilla.org/?tree=Try&rev=33d84b25607c
Also remove [Patch] in subject line with -k.
set 1.4+, for sharing feature.
blocking-b2g: 1.4? → 1.4+
Try test case error. I'll check. What's the correct action here? MozNfc from test_interfaces.html was removed earilier because it was hidden behind "nfc" permissions. Now the test case is asking for MozNfc to be declared again due to inheriting from the privilaged MozNfcManager no-interface (permission: "nfc-manager")?
MozNfc inheriting what? I see it inheriting only EventTarget.
Oh, aren't you missing Func="Navigator::HasNfcSupport
Yeah I noticed that immediately after I wrote the comment, I'm adding it back, and trying the patch again.
Merge to head, re-add missing HasNfcSupport declaration.
Try in progress: https://tbpl.mozilla.org/?tree=Try&rev=07b5e356cb4f
^-- Mostly passed, and the NFC related test_interfaces.html DOM test is fixed.
Attachment #8360800 - Flags: superreview?(bugs) → superreview+
Attachment #8360800 - Attachment description: (v2) Bug 952217. Add NFC Manager permission check for NFC Manager APIs. r=smaug → (v2) Bug 952217. Add NFC Manager permission check for NFC Manager APIs. sr, r=smaug
Whiteboard: [FT:RIL] sharing video/audio/image
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → 1.3 C3/1.4 S3(31jan)
You need to log in before you can comment on or make changes to this bug.