| Index: content/public/browser/resource_request_info.h
|
| diff --git a/content/public/browser/resource_request_info.h b/content/public/browser/resource_request_info.h
|
| index 7f0d825d7f0060f4d70993db026c32f665f8a792..33830f8e1e2a935a9fe1934006529b4af4759b40 100644
|
| --- a/content/public/browser/resource_request_info.h
|
| +++ b/content/public/browser/resource_request_info.h
|
| @@ -73,6 +73,11 @@ class ResourceRequestInfo {
|
| // non-null.
|
| using WebContentsGetter = base::Callback<WebContents*(void)>;
|
|
|
| + // A callback that returns a frame tree node id . The callback can always
|
| + // be used, but it may return -1 if no id is found. The callback should only
|
| + // run on the UI thread.
|
| + using FrameTreeNodeIdGetter = base::Callback<int(void)>;
|
| +
|
| // Returns a callback that returns a pointer to the WebContents this request
|
| // is associated with, or nullptr if it no longer exists or the request is
|
| // not associated with a WebContents. The callback should only run on the UI
|
| @@ -81,6 +86,13 @@ class ResourceRequestInfo {
|
| // example, requests made by a ServiceWorker.
|
| virtual WebContentsGetter GetWebContentsGetterForRequest() const = 0;
|
|
|
| + // Returns a callback that returns an int with the frame tree node id
|
| + // associated with this request, or -1 if it no longer exists. This
|
| + // callback should only be run on the UI thread.
|
| + // Note: Not all resource requests will be associated with a frame. For
|
| + // example, requests made by a ServiceWorker.
|
| + virtual FrameTreeNodeIdGetter GetFrameTreeNodeIdGetterForRequest() const = 0;
|
| +
|
| // Returns the associated ResourceContext.
|
| virtual ResourceContext* GetContext() const = 0;
|
|
|
| @@ -103,6 +115,7 @@ class ResourceRequestInfo {
|
|
|
| // Returns the FrameTreeNode ID for this frame. This ID is browser-global and
|
| // uniquely identifies a frame that hosts content.
|
| + // Note: Returns -1 for all requests except PlzNavigate requests.
|
| virtual int GetFrameTreeNodeId() const = 0;
|
|
|
| // The IPC route identifier of the RenderFrame.
|
|
|