Closed Bug 948721 Opened 11 years ago Closed 10 years ago

(meta) [B2G][NFC] Review WebNFC changes

Categories

(Firefox OS Graveyard :: NFC, defect)

x86_64
Linux
defect
Not set
normal

Tracking

(tracking-b2g:backlog)

RESOLVED WONTFIX
tracking-b2g backlog

People

(Reporter: dgarnerlee, Assigned: dgarnerlee)

References

Details

There was an observation that the WebNFC APIs has changed since the last super review.

P2P has been added, as well as an API to determine which app controls the NFC hardware.

These APIs are:
   DOMRequest checkP2PRegistration(DOMString manifestUrl);

   attribute EventHandler onpeerready;
   attribute EventHandler onpeerlost;
   [ChromeOnly]
   void eventListenerWasAdded(DOMString aType);
   [ChromeOnly]
   void eventListenerWasRemoved(DOMString aType);

MozNFCPeer and MozNFCTag have been rearranged as well. Snapshot of source file here:
http://git.mozilla.org/?p=releases/gecko.git;a=blob;f=dom/webidl/MozNfc.webidl;h=d903ed588bd89a25eea5fca4204be167576e3663;hb=HEAD
Flags: needinfo?(jonas)
Also you forgot mentioning you added SessionToken.
Blocks: b2g-nfc
(In reply to Yoshi Huang[:allstars.chh][:yoshi] from comment #2)
> Bug 933585 is also landed without sr+.
Garner, can you please add this? Thanks.
It seems be better to have patches for this bug.
Flags: needinfo?(dgarnerlee)
Ken, good point. Patch links:

The Uint8Array updates to MozNdefRecord:
https://bugzilla.mozilla.org/show_bug.cgi?id=933585

MozNFCTag, MozNFCPeer (and MozNfc):
https://bugzilla.mozilla.org/show_bug.cgi?id=WebNFC
(attachment: https://bug674741.bugzilla.mozilla.org/attachment.cgi?id=828121,  Patch 1 (v15) NFC DOM WebIDL r=khuey)

P2P additions (Oili sr+'ed them);
https://bugzilla.mozilla.org/show_bug.cgi?id=933136
(attachment: https://bugzilla.mozilla.org/attachment.cgi?id=8341966,  (v8c) Part 1 : Add DOM event handlers 'onpeerready' 'onpeerlost' r=khuey, sr=smaug)
Flags: needinfo?(dgarnerlee)
Perhaps a new bug is needed, but one thing I think can be improved was the fact navigator.mozNfc has been getting some privilaged state management APIs becuase the Gaia's System app nfc_manager.js needed them to communicate to chrome and then to other apps.

We could refactor them into navigator.mozNfc and navigator.nfcManager to better hide NFC manager only APIs. However, then there will be a NFC Manager in both gecko and gaia. Not quite pretty either. Other suggestions?
This bug is a followup bug for bug 674741.
Summary: [B2G][NFC] Review NFC DOM changes → [B2G][NFC] Review WebNFC changes
(In reply to Garner Lee from comment #4)
> Ken, good point. Patch links:
> 
> The Uint8Array updates to MozNdefRecord:
> https://bugzilla.mozilla.org/show_bug.cgi?id=933585
> 
> MozNFCTag, MozNFCPeer (and MozNfc):
> https://bugzilla.mozilla.org/show_bug.cgi?id=WebNFC
> (attachment:
> https://bug674741.bugzilla.mozilla.org/attachment.cgi?id=828121,  Patch 1
> (v15) NFC DOM WebIDL r=khuey)
> 
> P2P additions (Oili sr+'ed them);
> https://bugzilla.mozilla.org/show_bug.cgi?id=933136
> (attachment: https://bugzilla.mozilla.org/attachment.cgi?id=8341966,  (v8c)
> Part 1 : Add DOM event handlers 'onpeerready' 'onpeerlost' r=khuey, sr=smaug)

Even Bug 674741 is not superreviewed.
Depends on: 964183
Flags: needinfo?(jonas)
Blocks: b2g-NFC-2.0
Assignee: nobody → dgarnerlee
Garner, could you please comments all dependent bugs? Thanks.
Yoshi, per offline discussion, please help to do the first round review. Thanks.
Flags: needinfo?(dgarnerlee)
Summary: [B2G][NFC] Review WebNFC changes → (meta) [B2G][NFC] Review WebNFC changes
Ken, how do you want that done? I can do so on individual bugs (this is a metabug only, as I understand it).
Depends on: 991970
Flags: needinfo?(dgarnerlee)
(In reply to Garner Lee from comment #9)
> Ken, how do you want that done? I can do so on individual bugs (this is a
> metabug only, as I understand it).
Yes, I know. Sorry for no clear. I am talking about the dependent bugs of this meta bug.
blocking-b2g: --- → backlog
This bug doesn't block 2.0.
No longer blocks: b2g-NFC-2.0
Depends on: 959059
Depends on: 998023
We're going to make NFC API privilage in Bug 1042851, so we will review entire NFC API as a whole again, close as WONTFIX for now.
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → WONTFIX
blocking-b2g: backlog → ---
You need to log in before you can comment on or make changes to this bug.