canmove, Confirmed users
1,220
edits
Ptheriault (talk | contribs) |
Ptheriault (talk | contribs) (→NFC.js) |
||
| Line 44: | Line 44: | ||
NFC worker runs only in the parent b2g process, and connects to the '/dev/socket/nfcd' socket to send and receive messages from NFCd. Messages from NFCd are then posted to the the main thread (nfc.js) via DOM messages. | NFC worker runs only in the parent b2g process, and connects to the '/dev/socket/nfcd' socket to send and receive messages from NFCd. Messages from NFCd are then posted to the the main thread (nfc.js) via DOM messages. | ||
==== | ====nfc.js==== | ||
This component in the main process converts messages into NFC:* messages to be sent to the NfcContentHelper.js. When receiving messages it doesn't do any more than just check the type, and then create the appropriate message. In the reverse direction (when the web page is using the navigator.mozNfc API) some security checks are performed here to make sure the connecting child has the appropriate permission. | |||
====MozNfc API==== | ====MozNfc API==== | ||