Currently, requesting a resource in blink and registering the caller as a client to listen to callbacks for that resource looks like:
SetResource(FooResource::Fetch(params, fetcher));
...where SetResource() is implemented by ResourceClient, sets ResourceClient::resource_ to the given resource, and if it is non-null, calls AddClient(this) on the resource.
After this, fetching should be:
FooResource::Fetch(params, fetcher, this);
...where Fetch handles all of the work of starting the network request, as well as adding the requestor as a client on the subsequent Resource and initializing the client's resource_ pointer.
Comment 1 by bugdroid1@chromium.org
, Dec 8 2017