Chromium Code Reviews
Description[NFC] Only connect to NFC impl if ExecutionContext supports it
NFC has the spec property that it can only be accessed from the main
frame. Currently, NFC.cpp unconditionally connects to the NFC impl in
its constructor and then implements this spec by disallowing requests
made in the context of nested frames in the implementations of the IDL
invocations (e.g., push).
An upcoming refactor of NFC for servicification would be eased by the
simplifying property that the browser receives NFC requests only from
the main frame. This CL adds this property by having NFC.cpp connect
to the NFC implementation only if its ExecutionContext supports it.
This change will have no user-visible effect (all of the IDL invocations
will fail in the same way as they did before, as the CL does not change
the checks that they are making), but makes the servicification task
significantly easier.
BUG=680924
Review-Url: https://codereview.chromium.org/2875283002
Cr-Commit-Position: refs/heads/master@{#471707}
Committed: https://chromium.googlesource.com/chromium/src/+/b167a1b1183710ff042fd72c8ca53aae3bb81bd3
Patch Set 1 #
Total comments: 2
Patch Set 2 : Response to review #Patch Set 3 : Rebase #
Dependent Patchsets: Messages
Total messages: 17 (10 generated)
|
||||||||||||||||||||||||||||