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

Issue 1912363002: [webnfc] Add default implementation for nfc mojo service. (Closed)

Created:
4 years, 8 months ago by shalamov
Modified:
4 years ago
CC:
chromium-reviews, creis+watch_chromium.org, darin-cc_chromium.org, jam, nasko+codewatch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

[webnfc] Add default implementation for nfc mojo service. This patch adds default nfc mojo service implementation. It is used by platforms that do not support NFC functionality or whenever nfc service implementation is not yet available. BUG=520391 CQ_INCLUDE_TRYBOTS=tryserver.chromium.linux:linux_site_isolation

Patch Set 1 : #

Patch Set 2 : Remove android specific changes after splitting patch. #

Patch Set 3 : Fix for component gn build. #

Total comments: 8

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

Total comments: 4
Unified diffs Side-by-side diffs Delta from patch set Stats (+167 lines, -0 lines) Patch
M content/browser/BUILD.gn View 1 chunk +1 line, -0 lines 0 comments Download
M content/browser/DEPS View 1 chunk +1 line, -0 lines 0 comments Download
M content/browser/frame_host/render_frame_host_impl.cc View 1 2 3 2 chunks +3 lines, -0 lines 2 comments Download
M content/content_browser.gypi View 1 2 3 1 chunk +2 lines, -0 lines 0 comments Download
M content/renderer/BUILD.gn View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M device/nfc/BUILD.gn View 1 2 3 1 chunk +17 lines, -0 lines 0 comments Download
M device/nfc/nfc.gyp View 1 2 3 1 chunk +18 lines, -0 lines 0 comments Download
A device/nfc/nfc_export.h View 1 chunk +29 lines, -0 lines 0 comments Download
A device/nfc/nfc_impl.h View 1 chunk +20 lines, -0 lines 2 comments Download
A device/nfc/nfc_impl_default.cc View 1 2 3 1 chunk +75 lines, -0 lines 0 comments Download

Dependent Patchsets:

Messages

Total messages: 17 (8 generated)
shalamov
PTAL. Following patches depend on default implementation: https://crrev.com/1708543002/ - nfc.push / nfc.cancelPush impl. https://crrev.com/1759373003/ - ...
4 years, 7 months ago (2016-04-24 19:58:22 UTC) #7
kenneth.christiansen
lgtm, but I am no expert on the mojo parts
4 years, 7 months ago (2016-04-25 08:16:55 UTC) #8
shalamov
Added device/ owners to review. Could you please take a look?
4 years, 7 months ago (2016-04-25 14:28:37 UTC) #10
Reilly Grant (use Gerrit)
https://codereview.chromium.org/1912363002/diff/120001/content/browser/frame_host/render_frame_host_impl.cc File content/browser/frame_host/render_frame_host_impl.cc (right): https://codereview.chromium.org/1912363002/diff/120001/content/browser/frame_host/render_frame_host_impl.cc#newcode1938 content/browser/frame_host/render_frame_host_impl.cc:1938: GetServiceRegistry()->AddService<device::NFC>( The template parameter shouldn't be necessary here. https://codereview.chromium.org/1912363002/diff/120001/device/nfc/BUILD.gn ...
4 years, 7 months ago (2016-04-25 21:48:35 UTC) #11
shalamov
https://codereview.chromium.org/1912363002/diff/120001/content/browser/frame_host/render_frame_host_impl.cc File content/browser/frame_host/render_frame_host_impl.cc (right): https://codereview.chromium.org/1912363002/diff/120001/content/browser/frame_host/render_frame_host_impl.cc#newcode1938 content/browser/frame_host/render_frame_host_impl.cc:1938: GetServiceRegistry()->AddService<device::NFC>( On 2016/04/25 21:48:35, Reilly Grant wrote: > The ...
4 years, 7 months ago (2016-04-26 10:17:32 UTC) #12
ncarter (slow)
https://codereview.chromium.org/1912363002/diff/140001/content/browser/frame_host/render_frame_host_impl.cc File content/browser/frame_host/render_frame_host_impl.cc (right): https://codereview.chromium.org/1912363002/diff/140001/content/browser/frame_host/render_frame_host_impl.cc#newcode1940 content/browser/frame_host/render_frame_host_impl.cc:1940: GetServiceRegistry()->AddService(base::Bind(&device::NFCImpl::Create)); Do we plan to implement a c++, non-stub ...
4 years, 7 months ago (2016-04-26 22:28:26 UTC) #13
Reilly Grant (use Gerrit)
https://codereview.chromium.org/1912363002/diff/140001/content/browser/frame_host/render_frame_host_impl.cc File content/browser/frame_host/render_frame_host_impl.cc (right): https://codereview.chromium.org/1912363002/diff/140001/content/browser/frame_host/render_frame_host_impl.cc#newcode1940 content/browser/frame_host/render_frame_host_impl.cc:1940: GetServiceRegistry()->AddService(base::Bind(&device::NFCImpl::Create)); On 2016/04/26 at 22:28:26, ncarter wrote: > Do ...
4 years, 7 months ago (2016-04-26 22:35:33 UTC) #14
shalamov
On 2016/04/26 22:35:33, Reilly Grant wrote: > https://codereview.chromium.org/1912363002/diff/140001/content/browser/frame_host/render_frame_host_impl.cc > File content/browser/frame_host/render_frame_host_impl.cc (right): > > https://codereview.chromium.org/1912363002/diff/140001/content/browser/frame_host/render_frame_host_impl.cc#newcode1940 ...
4 years, 7 months ago (2016-04-27 10:01:59 UTC) #15
Reilly Grant (use Gerrit)
4 years, 7 months ago (2016-04-27 23:45:08 UTC) #16
On 2016/04/27 at 10:01:59, alexander.shalamov wrote:
> On 2016/04/26 22:35:33, Reilly Grant wrote:
> >
https://codereview.chromium.org/1912363002/diff/140001/content/browser/frame_...
> > File content/browser/frame_host/render_frame_host_impl.cc (right):
> > 
> >
https://codereview.chromium.org/1912363002/diff/140001/content/browser/frame_...
> > content/browser/frame_host/render_frame_host_impl.cc:1940:
> > GetServiceRegistry()->AddService(base::Bind(&device::NFCImpl::Create));
> > On 2016/04/26 at 22:28:26, ncarter wrote:
> > > Do we plan to implement a c++, non-stub version of NFC on some platform?
> > > 
> > > If so, then this is fine.
> > > 
> > > If not, I'd prefer that it be clearer here that the purpose of this line
is to
> > installs a stub implementation (either via comment, or by explicitly
> > instantiating a stub-looking object like NfcImplDefault()).
> > 
> > Actually, now that I think about it again I'd rather we not have a stub
> > implementation at all. If an implementation is not available the Mojo
service
> > binding should simply fail (return from the service factory callback without
> > binding the interface request).
> 
> I have prototype implementation for Chrome OS, which is also easy to adopt for
linux platform. I could introduce default implementation when I would start
upstreaming ChromeOS / Linux / Win implementations.
> 
> Reilly, I just tried removing dependency to this CL from
https://crrev.com/1708543002 and noticed that js bindings (used by LayoutTests)
are not generated anymore, since blink part only depends on _wtf variant. Do you
have any suggestions how I could force js bindings generation?

There's a better solution in the works but in the mean time you can add a
dependency on the non-_wtf variant to content/content_tests.gypi.

Powered by Google App Engine
This is Rietveld 408576698