Commit Graph

246 Commits

Author SHA1 Message Date
Thomas Zimmermann
60a59f574c Bug 1164425: Cleanup interfaces of |ListenSocket|, r=kmachulis
This patch removes |ListenSocket::GetSocketAddr|, which is unused
and not thread-safe. The |Listen| methods now return error codes.
2015-05-20 09:54:27 +02:00
Thomas Zimmermann
9c1ff726f4 Bug 1161020: Implement new socket-connector interface for NFC, r=allstars.chh
This patch moves |NfcConnector| into its own file and implements
the new socket-connector interface.
2015-05-19 13:28:46 +02:00
Andrea Marchesini
6ce7c91736 Bug 1163388 - patch 2 - get rid of nsIDOMFile, r=ehsan 2015-05-18 14:52:26 +01:00
Andrew McCreight
aeff7c99ee Bug 1152551, part 2 - Fix mode lines in dom/. r=jst 2015-05-03 15:32:37 -04:00
Thomas Zimmermann
39a0f71307 Bug 1156352: Remove |UnixSocketRawData| from NFC interfaces, r=allstars.chh 2015-04-23 13:48:48 +02:00
Andrea Marchesini
eed309c59a Bug 1156632 - Remove unused forward class declarations - patch 3 - dom/{events,xbl,xslt,xul} and others, r=ehsan 2015-04-22 08:29:18 +02:00
Thomas Zimmermann
d5a07501e6 Bug 1154281: Don't include UnixSocket.h in NFC, r=allstars.chh
NFC only requires |UnixSocketRawData|, which is defined in SocketBase.h.
2015-04-21 10:33:06 +02:00
Yoshi Huang
f0384282bc Bug 1156208 - this.nfc.getErrorMessage is not a function. r=dimi
From 810bdc26b4f20b448212f32458fa43b7a5e573bf Mon Sep 17 00:00:00 2001
---
 dom/nfc/gonk/Nfc.js | 4 ++++
 1 file changed, 4 insertions(+)
2015-04-20 17:47:24 +08:00
Yoshi Huang
63be57309b Bug 1152667 - Remove NfcGonkMessage.h r=dimi
From 391484fa778ea08a5041bece49ef4ee14e13c7a4 Mon Sep 17 00:00:00 2001
---
 dom/nfc/gonk/NfcGonkMessage.h      | 44 --------------------------------------
 dom/nfc/gonk/NfcMessageHandler.cpp |  8 ++++---
 dom/nfc/gonk/NfcService.cpp        |  1 -
 3 files changed, 5 insertions(+), 48 deletions(-)
 delete mode 100644 dom/nfc/gonk/NfcGonkMessage.h
2015-04-09 15:54:02 +08:00
Yoshi Huang
f9e51404c2 Bug 1127735 - Update TechDiscoveredNotication. r=smaug, dimi 2015-03-25 11:16:42 +08:00
Yoshi Huang
f405d96e15 Bug 1146270 - Move HCI Event Origin into NfcOptions.webidl. r=smaug, dimi 2015-03-24 17:19:48 +08:00
Andrea Marchesini
b212600c95 Bug 1148527 - Indentation fix after bug 1145631, r=ehsan 2015-03-27 18:52:19 +00:00
Ehsan Akhgari
33bb32f549 Bug 1145631 - Part 1: Replace MOZ_OVERRIDE and MOZ_FINAL with override and final in the tree; r=froydnj
This patch was automatically generated using the following script:

function convert() {
echo "Converting $1 to $2..."
find . \
       ! -wholename "*/.git*" \
       ! -wholename "obj-ff-dbg*" \
         -type f \
      \( -iname "*.cpp" \
         -o -iname "*.h" \
         -o -iname "*.c" \
         -o -iname "*.cc" \
         -o -iname "*.idl" \
         -o -iname "*.ipdl" \
         -o -iname "*.ipdlh" \
         -o -iname "*.mm" \) | \
    xargs -n 1 sed -i -e "s/\b$1\b/$2/g"
}

convert MOZ_OVERRIDE override
convert MOZ_FINAL final
2015-03-21 12:28:04 -04:00
Boris Zbarsky
54c64f20a9 Bug 1117172 part 3. Change the wrappercached WrapObject methods to allow passing in aGivenProto. r=peterv
The only manual changes here are to BindingUtils.h, BindingUtils.cpp,
Codegen.py, Element.cpp, IDBFileRequest.cpp, IDBObjectStore.cpp,
dom/workers/Navigator.cpp, WorkerPrivate.cpp, DeviceStorageRequestChild.cpp,
Notification.cpp, nsGlobalWindow.cpp, MessagePort.cpp, nsJSEnvironment.cpp,
Sandbox.cpp, XPCConvert.cpp, ExportHelpers.cpp, and DataStoreService.cpp.  The
rest of this diff was generated by running the following commands:

  find . -name "*.h" -o -name "*.cpp" | xargs perl -pi -e 'BEGIN { $/ = undef } s/(WrapObjectInternal\(JSContext *\* *(?:aCx|cx|aContext|aCtx|js))\)/\1, JS::Handle<JSObject*> aGivenProto)/g'

  find . -name "*.h" -o -name "*.cpp" | xargs perl -pi -e 'BEGIN { $/ = undef } s/(WrapObjectInternal\((?:aCx|cx|aContext|aCtx|js))\)/\1, aGivenProto)/g'

  find . -name "*.h" -o -name "*.cpp" | xargs perl -pi -e 'BEGIN { $/ = undef } s/(WrapNode\(JSContext *\* *(?:aCx|cx|aContext|aCtx|js))\)/\1, JS::Handle<JSObject*> aGivenProto)/g'

  find . -name "*.h" -o -name "*.cpp" | xargs perl -pi -e 'BEGIN { $/ = undef } s/(WrapNode\((?:aCx|cx|aContext|aCtx|js))\)/\1, aGivenProto)/g'

  find . -name "*.h" -o -name "*.cpp" | xargs perl -pi -e 'BEGIN { $/ = undef } s/(WrapObject\(JSContext *\* *(?:aCx|cx|aContext|aCtx|js))\)/\1, JS::Handle<JSObject*> aGivenProto)/g'

  find . -name "*.h" -o -name "*.cpp" | xargs perl -pi -e 'BEGIN { $/ = undef } s/(Binding(?:_workers)?::Wrap\((?:aCx|cx|aContext|aCtx|js), [^,)]+)\)/\1, aGivenProto)/g'
2015-03-19 10:13:33 -04:00
Thomas Zimmermann
2b228f8626 Bug 1109592 - Listen for connections from NFC daemon. r=allstars.chh
This patch inverses the connection setup procedure between Gecko
and nfcd. Gecko now installs a listen socket and starts nfcd from
the init scripts. Nfcd establishes the connection by connecting
to Gecko's socket.

As a side effect of this patch, nfcd only runs while NFC is switched
on. This saves ~1.6 MiB os memory with contemporary NFC drivers on
flame-kk.
2015-03-11 03:38:00 -04:00
Thomas Zimmermann
3f04f600c1 Bug 1109592 - Forward socket state from |NfcSocketListener|. r=allstars.chh
This patch allows to handle changes to the socket state at a higher
level than |NfcSocketListener|.
2015-03-09 03:27:00 -04:00
Thomas Zimmermann
4365986c1d Bug 1109592 - Only open connection to nfcd while NFC is switched on. r=allstars.chh
With this patch Gecko only creates a connection to nfcd while NFC is
switched on, and closes the connection after NFC has been switched off.

While the connection is being opened, commands to nfcd are held in a
waiting queue. Gecko flushes the queue after it connected successfully
to nfcd.

As a side effect of this patch, the NFC thread only exists while NFC
is switched on.
2015-03-12 07:43:00 -04:00
Yoshi Huang
e78f29ee9c Bug 1141457 - Part 3: add a CommandMsgTable. r=dimi
From 7650a8e6a0ab634b90c85c0fa85a096e7d0f4ec9 Mon Sep 17 00:00:00 2001
---
 dom/nfc/gonk/Nfc.js | 36 +++++++++++++-----------------------
 1 file changed, 13 insertions(+), 23 deletions(-)
2015-03-10 17:06:56 +08:00
Yoshi Huang
a24e6525de Bug 1141457 - Part 2: add isP2P for writeNDEF. r=dimi
From 35af6fe22fa075ecef92cd84e2ce22357c9c395f Mon Sep 17 00:00:00 2001
---
 dom/nfc/NfcContentHelper.js     | 5 +++--
 dom/nfc/gonk/Nfc.js             | 1 -
 dom/nfc/nsINfcContentHelper.idl | 5 ++++-
 dom/nfc/nsNfc.js                | 4 ++--
 4 files changed, 9 insertions(+), 6 deletions(-)
2015-03-10 16:49:08 +08:00
Yoshi Huang
9a3417e8f9 Bug 1141457 - Part 1: Move SendFile to gMessageManager. r=dimi
From 4bb362a58ce6fb1bf32efd8a5202f28aa909f5f1 Mon Sep 17 00:00:00 2001
---
 dom/nfc/gonk/Nfc.js | 31 +++++++++++++++----------------
 1 file changed, 15 insertions(+), 16 deletions(-)
2015-03-05 17:43:43 +08:00
Thomas Zimmermann
a1c98c3c72 Bug 1140383: Add fast path for NFC:QueryInfo, r=allstars.chh
Messages of type NFC:QueryInfo return local RF state. We don't need
the NFC Service, so we can return early.
2015-03-10 13:51:57 +01:00
Thomas Zimmermann
505e0009d7 Bug 1137151: Marked destructor of |MozNDEFRecord| as protected, r=allstars.chh 2015-03-10 13:44:01 +01:00
Yoshi Huang
7ac3089480 Bug 933665 - Remove encodeNdefRecords func from NfcContentHelper. r=dimi 2015-03-05 18:58:37 +08:00
Yoshi Huang
d9b5b09720 Bug 1139830 - Make type/id/payload nullable in MozNDEFRecordOptions. r=smaug 2015-03-06 16:23:21 +08:00
Yoshi Huang
44ca356ca2 Bug 1138886 - Structured Clone for MozNDEFRecord. r=smaug
From 9b1bdef0b25b41d0448662ec689a961ae4e8fcd2 Mon Sep 17 00:00:00 2001
---
 dom/base/StructuredCloneTags.h     |   2 +
 dom/base/nsJSEnvironment.cpp       |  29 +++++++++
 dom/nfc/MozNDEFRecord.cpp          | 122 ++++++++++++++++++++++++++++++++++---
 dom/nfc/MozNDEFRecord.h            |  20 ++++--
 js/xpconnect/src/ExportHelpers.cpp |  36 ++++++++++-
 5 files changed, 193 insertions(+), 16 deletions(-)
2015-01-30 15:36:42 +08:00
Yoshi Huang
0eff791629 Bug 1121298 - Part 3. add getAsURI. r=smaug, dimi
From 1b93a62187c24dd176d48021b2a765a19beb453a Mon Sep 17 00:00:00 2001
---
 dom/nfc/MozNDEFRecord.cpp       | 29 +++++++++++++++++++++++++++++
 dom/nfc/MozNDEFRecord.h         |  1 +
 dom/webidl/MozNDEFRecord.webidl |  6 ++++++
 3 files changed, 36 insertions(+)
2015-01-21 17:37:45 +08:00
Yoshi Huang
2387d616de Bug 1121298 - Part 2: Add Constructor(uri) for MozNDEFRecord. r=smaug, dimi 2015-01-29 18:16:26 +08:00
Yoshi Huang
e78e3d10a9 Bug 1121298 - Part 1: refactor MozNDEFRecord cstor. r=smaug, dimi
From f5d558e4dc3b3d1e08de09d1881bbf69a68a5791 Mon Sep 17 00:00:00 2001
---
 dom/nfc/MozNDEFRecord.cpp | 102 +++++++++++++++++++++++++++++-----------------
 dom/nfc/MozNDEFRecord.h   |  21 ++++++----
 2 files changed, 76 insertions(+), 47 deletions(-)
2015-01-07 18:08:21 +08:00
Yoshi Huang
3c9cfd2a18 Bug 1137107 - Part 2: Add NfcResponseType and NfcNotificationType. r=smaug, dimi 2015-02-26 17:23:17 +08:00
Yoshi Huang
4cf97dac15 Bug 1137107 - Part 1: Add NfcRequestType. r=smaug, dimi
From 2c1e87a8e1018f2c1d9f8825e36d1478a8a409bc Mon Sep 17 00:00:00 2001
---
 dom/nfc/gonk/Nfc.js                | 22 ++++++---
 dom/nfc/gonk/NfcGonkMessage.h      |  9 ----
 dom/nfc/gonk/NfcMessageHandler.cpp | 91 +++++++++++++++++++-------------------
 dom/nfc/gonk/NfcOptions.h          |  2 +-
 dom/webidl/NfcOptions.webidl       | 16 ++++++-
 5 files changed, 76 insertions(+), 64 deletions(-)
2015-02-26 13:49:28 +08:00
Dimi Lee
37651c229c Bug 1121900 - [flatfish] build break by "error: undefined reference to 'mozilla::dom::MozIsoDepTech::mTechnology'". r=yoshi 2015-03-04 11:21:49 +08:00
Yoshi Huang
dcb1428e8d Bug 1137101 - Refactor Response/Notification sent from nfcd. r=dimi
From 80bbb263c548a86287bec29c5983e0ca3714a841 Mon Sep 17 00:00:00 2001
---
 dom/nfc/gonk/NfcGonkMessage.h      | 12 +++++----
 dom/nfc/gonk/NfcMessageHandler.cpp | 52 +++++++++++++++++++++++++-------------
 dom/nfc/gonk/NfcMessageHandler.h   |  5 ++--
 3 files changed, 44 insertions(+), 25 deletions(-)
2015-02-16 18:47:58 +08:00
Yoshi Huang
8045419885 Bug 1133390 - onfocuschanged(false) will be notified twice. r=dimi
From 1c1b9ad0570901cc2c9ce6bce1bbeda210c1e1ca Mon Sep 17 00:00:00 2001
---
 dom/nfc/gonk/Nfc.js | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
2015-02-16 11:13:18 +08:00
Yoshi Huang
356de21c14 Bug 1131508 - Remove ConnectResponse and CloseResponse from NfcContentHelper. r=dimi 2015-02-10 17:48:16 +08:00
Yoshi Huang
8bc84aba88 Bug 1131454 - Don't add transceive req into RequestQueue in NfcMessageHandler. r=dlee 2015-02-10 14:19:38 +08:00
Yoshi Huang
1c3ee03b32 Bug 1127726 - Cannot receive NDEF from another NFC Peer. r=vchang 2015-01-30 16:10:12 +08:00
Yoshi Huang
1079afc0c7 Bug 1126653 - don't send nfc-manager-tech-lost if the foreground has received ontag/peerfound. r=dimi 2015-01-28 10:48:17 +08:00
Yoshi Huang
a0418fb15a Bug 1120315 - Part 3: notify tag/peerlost when lost focus. r=dimi
From 14b18a83041d65c0cf111d20279668e665dd0d56 Mon Sep 17 00:00:00 2001
---
 dom/nfc/NfcContentHelper.js     |  3 +++
 dom/nfc/gonk/Nfc.js             | 24 ++++++++++++++++++++++--
 dom/nfc/gonk/nfc_consts.js      |  1 +
 dom/nfc/nsINfcContentHelper.idl | 10 +++++++++-
 dom/nfc/nsNfc.js                | 16 ++++++++++++++++
 5 files changed, 51 insertions(+), 3 deletions(-)
2015-01-26 18:58:52 +08:00
Yoshi Huang
c18d34ee83 Bug 1120315 - Part 2: s/change/changed/. r=dimi
From 86ab7fbe1d409c9f8f7082499179e0632101a61b Mon Sep 17 00:00:00 2001
---
 dom/nfc/NfcContentHelper.js     | 4 ++--
 dom/nfc/gonk/Nfc.js             | 6 +++---
 dom/nfc/gonk/nfc_consts.js      | 2 +-
 dom/nfc/nsINfcContentHelper.idl | 4 ++--
 dom/nfc/nsNfc.js                | 2 +-
 5 files changed, 9 insertions(+), 9 deletions(-)
2015-01-26 18:13:36 +08:00
Yoshi Huang
b413034cd7 Bug 1120315 - Part 1: revert Bug 1082445. r=dimi 2015-01-26 17:27:57 +08:00
Yoshi Huang
68eca9fbed Bug 1082443 - B2G NFC: event fallback to System app if the foreground app cannot handle it. r=smaug, dimi 2014-12-11 17:42:35 +08:00
Dimi Lee
5824d37d8b Bug 1082440 - B2G NFC: Dispatch NFC events to foreground app. r=yoshi 2015-01-23 11:35:03 +08:00
Dimi Lee
1b2902b630 Bug 1105666 - [BrowserAPI] Add an API to indicate this iframe could receive NFC event. r=smaug, kanru, yoshi 2015-01-22 17:40:17 +08:00
Yoshi Huang
7b75a9ed87 Bug 1093517 - remove impl for connect and close of MozNFCTag. r=dimi
From 8d41372b81f36efced2f46bfa8428eb12688ffd7 Mon Sep 17 00:00:00 2001
---
 dom/nfc/NfcContentHelper.js        | 27 ++-------------------------
 dom/nfc/gonk/Nfc.js                | 12 +-----------
 dom/nfc/gonk/NfcGonkMessage.h      |  4 +---
 dom/nfc/gonk/NfcMessageHandler.cpp | 35 -----------------------------------
 dom/nfc/gonk/NfcMessageHandler.h   |  2 --
 dom/nfc/nsINfcContentHelper.idl    | 30 +-----------------------------
 6 files changed, 5 insertions(+), 105 deletions(-)
2015-01-15 15:41:43 +08:00
Yoshi Huang
3829546c2a Bug 1121840 - Use Cu.cloneInto for the result of NFCTag.transceive. r=dimi 2015-01-15 14:55:25 +08:00
Yoshi Huang
fb66184555 Bug 1121818 - Reject promise with instance of 'Error'. r=dimi
From da865c1cd62df020eba8515c3e19b962ccddd322 Mon Sep 17 00:00:00 2001
---
 dom/nfc/nsNfc.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
2015-01-15 12:17:46 +08:00
Fabrice Desré
5c6919ff67 Bug 1120862 - permission denied to access property 'then' r=allstars 2015-01-15 10:36:10 +08:00
Yoshi Huang
e0b9b1ffc6 Bug 1120881 - MozNFCTag.canBeMadeReadOnly is incorrect. r=dimi
From 554e0cb358165b90abdf03acaf560ccd489f5c45 Mon Sep 17 00:00:00 2001
---
 dom/nfc/nsNfc.js | 14 ++++++++++++--
 1 file changed, 12 insertions(+), 2 deletions(-)
2015-01-13 18:36:43 +08:00
Dimi Lee
0f2abc9b4f Bug 916428 - [NFC] APIs for ISO 14443-4 tags (IsoDep Support). r=smaug, r=yoshi 2015-01-13 14:50:24 +08:00
Yoshi Huang
58fcb179a1 Backed out changeset c9a4574f58b5 2015-01-13 11:57:49 +08:00