DevTools: introduce the devtools_navigation_token and plumb it from the browser into renderer.
For automation, driver-initiated navigations over the devtools protocol,
|devtools_navigation_token| is used to tag the navigation. This navigation
token lands on the DocumentLoader instance in Blink. This way subsequent Blink-level
frame lifecycle events can be associated this navigation.
At this point, navigation token can be generated both, on the browser and on the
renderer side. But it is never sent from the renderer to the browser as a part
of the IPC message or mojo call. Eventually, it might be replaced with the token
reliably generated on the browser side that would be able to cross the renderer-
browser boundary.
Cq-Include-Trybots: master.tryserver.chromium.linux:linux_site_isolation
Change-Id: I30f374a11660d4c5323063a9b2caa07ec64b1ef5
Bug: 783506
Reviewed-on: https://chromium-review.googlesource.com/747805
Commit-Queue: Pavel Feldman <[email protected]>
Reviewed-by: Daniel Cheng <[email protected]>
Reviewed-by: Charlie Reis <[email protected]>
Cr-Commit-Position: refs/heads/master@{#517348}
diff --git a/content/renderer/render_frame_impl.h b/content/renderer/render_frame_impl.h
index 43830b0..0dab20e3 100644
--- a/content/renderer/render_frame_impl.h
+++ b/content/renderer/render_frame_impl.h
@@ -523,7 +523,8 @@
const CommonNavigationParams& common_params,
const RequestNavigationParams& request_params,
mojo::ScopedDataPipeConsumerHandle body_data,
- base::Optional<URLLoaderFactoryBundle> subresource_loaders) override;
+ base::Optional<URLLoaderFactoryBundle> subresource_loaders,
+ const base::UnguessableToken& devtools_navigation_token) override;
// mojom::HostZoom implementation:
void SetHostZoomLevel(const GURL& url, double zoom_level) override;
@@ -1094,7 +1095,8 @@
const StartNavigationParams& start_params,
const RequestNavigationParams& request_params,
std::unique_ptr<StreamOverrideParameters> stream_params,
- base::Optional<URLLoaderFactoryBundle> subresource_loader_factories);
+ base::Optional<URLLoaderFactoryBundle> subresource_loader_factories,
+ const base::UnguessableToken& devtools_navigation_token);
// Returns a URLLoaderFactoryBundle which can be used to request subresources
// for this frame. Only valid to call when the Network Service is enabled.