New issue
Advanced search Search tips

Issue 689498 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner: ----
Closed: May 2017
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Bug

Blocked on:
issue 689402

Blocking:
issue 689499


Show other hotlists

Hotlists containing this issue:
NFC


Sign in to add a comment

Change NFC Mojo implementation to get Activity from delegate rather than WebContents

Project Member Reported by blundell@chromium.org, Feb 7 2017

Issue description

To allow decoupling the NFC Mojo implementation from WebContents, it will have to use the client library described in  crbug.com/689402  in order to obtain the Activity that is currently associated with the renderer client making a request. This can be broken down into the following steps:

- Change ContextAwareNfcImpl to receive WebContents ID in its constructor and obtain Activity via accessing that client ID

- Merge ContextAwareNfcImpl into NfcImpl
  
- Change NfcImpl to gets its WebContents ID from the connecting renderer
process rather than from the browser, and eliminate NfcFactory taking in WebContents altogether

- Change NfcImpl to be part of ContentContextInterfaceRegistrar rather than ContentWebContentsInterfaceRegistrar
 
Blocking: 689499
Summary: Change NFC Mojo implementation to get Activity from delegate rather than WebContents (was: Change NFC Mojo implementation to get Activity from "context sharing' client library rather than WebContents)
Update: As described on this doc: https://docs.google.com/document/d/1DlvoBWGVrSSdPsPKx55g9GaSDTVl3m3G74rQmQN1OxQ/edit, we've decided on a different approach to handling this dependency. We're going to go with per-feature delegate interfaces that are used only on the platforms on which they're required and are passed into the Device Service in its constructor on those platforms. NFCDelegate.java will have the following interface:
Activity trackActivityForServiceInstance(Identity instanceIdentity, Callback onActivityChanged)

The embedder will be responsible for implementing this interface. One interesting aspect will be passing this delegate into the DeviceService's constructor in C++.

Note that this does not change the plan described above; it simply means that the NFC impl will use the delegate rather than the client library to obtain the Activity from the connecting service ID.
Components: Blink>NFC
Components: Internals>Services>Device

Sign in to add a comment