Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(101)

Issue 1708543002: [webnfc] Implement push() method in blink nfc module. (Closed)

Created:
4 years, 10 months ago by shalamov
Modified:
4 years, 6 months ago
CC:
blink-reviews, chromium-reviews
Base URL:
https://chromium.googlesource.com/chromium/src.git@onionsoup_webnfc
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

[webnfc] Implement push() method in blink nfc module. This patch implements nfc.push() and nfc.cancelPush() methods in nfc module. https://w3c.github.io/web-nfc/#dom-nfc-push https://w3c.github.io/web-nfc/#dom-nfc-cancelpush Mock mojo service and simple layout test is added to validate input parameters as well as conversion between WebNFC and corresponding mojo data structures. BUG=520391 Committed: https://crrev.com/5058e32db5582978f60a28bc0ccbeed0a7421283 Committed: https://crrev.com/5c52ef129e520de01aa36728a4b0529b31e8467b Cr-Original-Commit-Position: refs/heads/master@{#398538} Cr-Commit-Position: refs/heads/master@{#399139}

Patch Set 1 : Implement push / cancelPush #

Patch Set 2 : Rebased to master. Added back finalization to NFC class. #

Total comments: 14

Patch Set 3 : Fixes for Kenneth's comments. #

Patch Set 4 : Set charset for text records. #

Patch Set 5 : Use nfc_test() helper for all tests and reset mojo proxy on error. #

Patch Set 6 : Make NFCCallback non-copyable and make constructor explicit. #

Patch Set 7 : Simplify data conversion by always pushing strings in 'UTF-8'. #

Patch Set 8 : Rebased. #

Patch Set 9 : Rebase, add dependency to https://codereview.chromium.org/1912363002 #

Patch Set 10 : GN build generates wtf mojo bindings automatically, remove custom target after rebase. #

Total comments: 2

Patch Set 11 : Use new createBaseCallback helper instead of custom callback class. #

Total comments: 15

Patch Set 12 : Fixes for Reilly's comments. #

Total comments: 4

Patch Set 13 : Use WeakPersistentThisPointer only for callbacks. #

Patch Set 14 : Rebased, added client interface back. #

Patch Set 15 : Rebased. #

Total comments: 18

Patch Set 16 : Rebased, fixes for Reilly's comments. #

Total comments: 5

Patch Set 17 : Minor fixes for Reilly's comments. #

Total comments: 1

Patch Set 18 : Move dependency from content_browsertests to layouttest_support_content #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1139 lines, -305 lines) Patch
M content/content_tests.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +1 line, -0 lines 0 comments Download
M content/test/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +1 line, -0 lines 0 comments Download
M device/nfc/nfc.gyp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +13 lines, -0 lines 0 comments Download
M device/nfc/nfc.mojom View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +24 lines, -3 lines 0 comments Download
A third_party/WebKit/LayoutTests/nfc/mock-nfc.html View 1 chunk +15 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/nfc/push.html View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +170 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/nfc/resources/nfc-helpers.js View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +286 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/modules/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/modules/modules.gyp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/modules/modules.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +2 lines, -0 lines 0 comments Download
A third_party/WebKit/Source/modules/nfc/DEPS View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +4 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/modules/nfc/NFC.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 3 chunks +27 lines, -7 lines 0 comments Download
M third_party/WebKit/Source/modules/nfc/NFC.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 3 chunks +528 lines, -14 lines 0 comments Download
A third_party/WebKit/Source/modules/nfc/NFCError.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +27 lines, -0 lines 0 comments Download
A third_party/WebKit/Source/modules/nfc/NFCError.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +39 lines, -0 lines 0 comments Download
M third_party/WebKit/public/blink_headers.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +0 lines, -7 lines 0 comments Download
D third_party/WebKit/public/platform/modules/nfc/OWNERS View 1 chunk +0 lines, -3 lines 0 comments Download
D third_party/WebKit/public/platform/modules/nfc/WebNFCClient.h View 1 chunk +0 lines, -62 lines 0 comments Download
D third_party/WebKit/public/platform/modules/nfc/WebNFCError.h View 1 chunk +0 lines, -35 lines 0 comments Download
D third_party/WebKit/public/platform/modules/nfc/WebNFCMessage.h View 1 chunk +0 lines, -46 lines 0 comments Download
D third_party/WebKit/public/platform/modules/nfc/WebNFCObserver.h View 1 chunk +0 lines, -27 lines 0 comments Download
D third_party/WebKit/public/platform/modules/nfc/WebNFCPushOptions.h View 1 chunk +0 lines, -26 lines 0 comments Download
D third_party/WebKit/public/platform/modules/nfc/WebNFCPushTarget.h View 1 chunk +0 lines, -20 lines 0 comments Download
D third_party/WebKit/public/platform/modules/nfc/WebNFCWatchOptions.h View 1 chunk +0 lines, -55 lines 0 comments Download

Messages

Total messages: 66 (26 generated)
kenneth.christiansen
https://codereview.chromium.org/1708543002/diff/60001/third_party/WebKit/LayoutTests/nfc/push.html File third_party/WebKit/LayoutTests/nfc/push.html (right): https://codereview.chromium.org/1708543002/diff/60001/third_party/WebKit/LayoutTests/nfc/push.html#newcode11 third_party/WebKit/LayoutTests/nfc/push.html:11: var invalid_messages = Guess we could use const/let here ...
4 years, 8 months ago (2016-04-14 14:29:27 UTC) #7
shalamov
https://codereview.chromium.org/1708543002/diff/60001/third_party/WebKit/LayoutTests/nfc/push.html File third_party/WebKit/LayoutTests/nfc/push.html (right): https://codereview.chromium.org/1708543002/diff/60001/third_party/WebKit/LayoutTests/nfc/push.html#newcode11 third_party/WebKit/LayoutTests/nfc/push.html:11: var invalid_messages = On 2016/04/14 14:29:27, kenneth.christiansen wrote: > ...
4 years, 8 months ago (2016-04-15 07:56:40 UTC) #8
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1708543002/80001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1708543002/80001
4 years, 8 months ago (2016-04-15 11:20:49 UTC) #10
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: mac_chromium_rel_ng on tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_rel_ng/builds/211844)
4 years, 8 months ago (2016-04-15 12:46:57 UTC) #12
shalamov
Please take a look. Android nfc mojo service implementation for nfc.push / nfc.cancelPush: https://crrev.com/1486043002/
4 years, 8 months ago (2016-04-18 04:55:25 UTC) #14
Tom Sepez
lgtm
4 years, 8 months ago (2016-04-20 17:25:15 UTC) #15
shalamov
Added device/ and modules/ owners to review. Could you please take a look?
4 years, 7 months ago (2016-04-25 14:31:06 UTC) #17
mlamouri (slow - plz ping)
What do you want me to review? Everything in modules/ or just some specific files?
4 years, 7 months ago (2016-04-25 15:55:30 UTC) #18
Reilly Grant (use Gerrit)
https://codereview.chromium.org/1708543002/diff/220001/third_party/WebKit/Source/modules/nfc/NFC.cpp File third_party/WebKit/Source/modules/nfc/NFC.cpp (right): https://codereview.chromium.org/1708543002/diff/220001/third_party/WebKit/Source/modules/nfc/NFC.cpp#newcode436 third_party/WebKit/Source/modules/nfc/NFC.cpp:436: class NFCCallback final : public NFCMojoCallback::Runnable { I've added ...
4 years, 7 months ago (2016-04-25 20:12:55 UTC) #19
shalamov
On 2016/04/25 15:55:30, Mounir Lamouri wrote: > What do you want me to review? Everything ...
4 years, 7 months ago (2016-04-26 07:54:00 UTC) #20
shalamov
https://codereview.chromium.org/1708543002/diff/220001/third_party/WebKit/Source/modules/nfc/NFC.cpp File third_party/WebKit/Source/modules/nfc/NFC.cpp (right): https://codereview.chromium.org/1708543002/diff/220001/third_party/WebKit/Source/modules/nfc/NFC.cpp#newcode436 third_party/WebKit/Source/modules/nfc/NFC.cpp:436: class NFCCallback final : public NFCMojoCallback::Runnable { On 2016/04/25 ...
4 years, 7 months ago (2016-04-26 13:17:50 UTC) #21
mlamouri (slow - plz ping)
modules/*.{gn,gyp,gypi} lgtm
4 years, 7 months ago (2016-04-26 14:05:40 UTC) #22
Reilly Grant (use Gerrit)
https://codereview.chromium.org/1708543002/diff/240001/third_party/WebKit/Source/modules/nfc/NFC.cpp File third_party/WebKit/Source/modules/nfc/NFC.cpp (right): https://codereview.chromium.org/1708543002/diff/240001/third_party/WebKit/Source/modules/nfc/NFC.cpp#newcode112 third_party/WebKit/Source/modules/nfc/NFC.cpp:112: return array; We try to avoid calling memcpy. Instead ...
4 years, 7 months ago (2016-04-27 23:32:54 UTC) #23
shalamov
https://codereview.chromium.org/1708543002/diff/240001/third_party/WebKit/Source/modules/nfc/NFC.cpp File third_party/WebKit/Source/modules/nfc/NFC.cpp (right): https://codereview.chromium.org/1708543002/diff/240001/third_party/WebKit/Source/modules/nfc/NFC.cpp#newcode112 third_party/WebKit/Source/modules/nfc/NFC.cpp:112: return array; On 2016/04/27 23:32:53, Reilly Grant wrote: > ...
4 years, 7 months ago (2016-04-28 14:16:14 UTC) #24
Reilly Grant (use Gerrit)
https://codereview.chromium.org/1708543002/diff/240001/third_party/WebKit/Source/modules/nfc/NFC.h File third_party/WebKit/Source/modules/nfc/NFC.h (right): https://codereview.chromium.org/1708543002/diff/240001/third_party/WebKit/Source/modules/nfc/NFC.h#newcode69 third_party/WebKit/Source/modules/nfc/NFC.h:69: mojo::Binding<device::wtf::NFCClient> m_client; On 2016/04/28 at 14:16:14, shalamov wrote: > ...
4 years, 7 months ago (2016-04-28 18:05:02 UTC) #25
Reilly Grant (use Gerrit)
https://codereview.chromium.org/1708543002/diff/260001/third_party/WebKit/Source/modules/nfc/NFC.cpp File third_party/WebKit/Source/modules/nfc/NFC.cpp (right): https://codereview.chromium.org/1708543002/diff/260001/third_party/WebKit/Source/modules/nfc/NFC.cpp#newcode477 third_party/WebKit/Source/modules/nfc/NFC.cpp:477: auto callback = createBaseCallback(bind<device::wtf::NFCErrorPtr>(&NFC::OnRequestCompleted, WeakPersistentThisPointer<NFC>(this), resolver)); You do not ...
4 years, 7 months ago (2016-04-28 18:09:26 UTC) #26
shalamov
https://codereview.chromium.org/1708543002/diff/260001/third_party/WebKit/Source/modules/nfc/NFC.cpp File third_party/WebKit/Source/modules/nfc/NFC.cpp (right): https://codereview.chromium.org/1708543002/diff/260001/third_party/WebKit/Source/modules/nfc/NFC.cpp#newcode477 third_party/WebKit/Source/modules/nfc/NFC.cpp:477: auto callback = createBaseCallback(bind<device::wtf::NFCErrorPtr>(&NFC::OnRequestCompleted, WeakPersistentThisPointer<NFC>(this), resolver)); On 2016/04/28 18:09:26, ...
4 years, 7 months ago (2016-04-29 10:00:21 UTC) #27
shalamov
Reilly, could you please take a look? I think I fixed the issues you've found. ...
4 years, 7 months ago (2016-05-20 14:50:58 UTC) #29
Reilly Grant (use Gerrit)
https://codereview.chromium.org/1708543002/diff/340001/third_party/WebKit/LayoutTests/nfc/resources/nfc-helpers.js File third_party/WebKit/LayoutTests/nfc/resources/nfc-helpers.js (right): https://codereview.chromium.org/1708543002/diff/340001/third_party/WebKit/LayoutTests/nfc/resources/nfc-helpers.js#newcode216 third_party/WebKit/LayoutTests/nfc/resources/nfc-helpers.js:216: this.router_.setIncomingReceiver(this); Check usb-helpers.js for the new way to bind ...
4 years, 7 months ago (2016-05-20 18:31:22 UTC) #30
shalamov
https://codereview.chromium.org/1708543002/diff/340001/third_party/WebKit/LayoutTests/nfc/resources/nfc-helpers.js File third_party/WebKit/LayoutTests/nfc/resources/nfc-helpers.js (right): https://codereview.chromium.org/1708543002/diff/340001/third_party/WebKit/LayoutTests/nfc/resources/nfc-helpers.js#newcode216 third_party/WebKit/LayoutTests/nfc/resources/nfc-helpers.js:216: this.router_.setIncomingReceiver(this); On 2016/05/20 18:31:21, Reilly Grant wrote: > Check ...
4 years, 6 months ago (2016-05-24 16:09:08 UTC) #31
Reilly Grant (use Gerrit)
lgtm with minor corrections https://codereview.chromium.org/1708543002/diff/340001/third_party/WebKit/Source/modules/nfc/NFC.cpp File third_party/WebKit/Source/modules/nfc/NFC.cpp (right): https://codereview.chromium.org/1708543002/diff/340001/third_party/WebKit/Source/modules/nfc/NFC.cpp#newcode324 third_party/WebKit/Source/modules/nfc/NFC.cpp:324: if (!value->IsString() && !(value->IsNumber() && ...
4 years, 6 months ago (2016-05-24 19:25:39 UTC) #32
shalamov
nick@chromium.org: PTAL Nick, would you have a time to check content/test/BUILD.gn ? We agreed with ...
4 years, 6 months ago (2016-05-26 14:09:07 UTC) #34
ncarter (slow)
lgtm
4 years, 6 months ago (2016-05-26 16:31:31 UTC) #35
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1708543002/380001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1708543002/380001
4 years, 6 months ago (2016-06-03 14:20:16 UTC) #38
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/194694)
4 years, 6 months ago (2016-06-03 14:26:54 UTC) #40
riju_
third_party/WebKit/public/platform/modules/nfc/* LGTM
4 years, 6 months ago (2016-06-03 15:20:02 UTC) #41
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1708543002/380001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1708543002/380001
4 years, 6 months ago (2016-06-03 15:22:09 UTC) #43
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/194733)
4 years, 6 months ago (2016-06-03 15:29:10 UTC) #45
shalamov
@jochen, could you please take a look? Looks like all files are 'approved', but presubmit ...
4 years, 6 months ago (2016-06-07 12:09:51 UTC) #47
jochen (gone - plz use gerrit)
lgtm
4 years, 6 months ago (2016-06-07 18:57:28 UTC) #48
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1708543002/380001
4 years, 6 months ago (2016-06-08 12:26:02 UTC) #50
commit-bot: I haz the power
Committed patchset #17 (id:380001)
4 years, 6 months ago (2016-06-08 13:44:44 UTC) #52
commit-bot: I haz the power
Patchset 17 (id:??) landed as https://crrev.com/5058e32db5582978f60a28bc0ccbeed0a7421283 Cr-Commit-Position: refs/heads/master@{#398538}
4 years, 6 months ago (2016-06-08 13:46:30 UTC) #54
xidachen
A revert of this CL (patchset #17 id:380001) has been created in https://codereview.chromium.org/2052473002/ by xidachen@chromium.org. ...
4 years, 6 months ago (2016-06-08 14:38:53 UTC) #55
shalamov_
On 2016/06/08 14:38:53, xidachen wrote: > A revert of this CL (patchset #17 id:380001) has ...
4 years, 6 months ago (2016-06-08 16:26:59 UTC) #56
Reilly Grant (use Gerrit)
On 2016/06/08 at 16:26:59, alexander.shalamov wrote: > On 2016/06/08 14:38:53, xidachen wrote: > > A ...
4 years, 6 months ago (2016-06-08 18:29:01 UTC) #57
Reilly Grant (use Gerrit)
https://codereview.chromium.org/1708543002/diff/380001/content/content_tests.gypi File content/content_tests.gypi (right): https://codereview.chromium.org/1708543002/diff/380001/content/content_tests.gypi#newcode1387 content/content_tests.gypi:1387: '../device/nfc/nfc.gyp:device_nfc_mojo_bindings', This dependency should be up in layouttest_support_content (and ...
4 years, 6 months ago (2016-06-08 19:33:35 UTC) #58
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1708543002/400001
4 years, 6 months ago (2016-06-10 07:56:37 UTC) #62
commit-bot: I haz the power
Committed patchset #18 (id:400001)
4 years, 6 months ago (2016-06-10 09:03:10 UTC) #64
commit-bot: I haz the power
4 years, 6 months ago (2016-06-10 09:05:13 UTC) #66
Message was sent while issue was closed.
Patchset 18 (id:??) landed as
https://crrev.com/5c52ef129e520de01aa36728a4b0529b31e8467b
Cr-Commit-Position: refs/heads/master@{#399139}

Powered by Google App Engine
This is Rietveld 408576698