No screenshot on back same-doc navigation

Calculate in the browser whether a screenshot will be necessary for the
navigation and pass this to the renderer. The renderer still does its
own checks too, because some navigations don't go through the browser
until later.

This change is the same-document counterpart of
https://crrev.com/c/6165524

Bug: 384026829
Change-Id: I4176e8a3dd6dc6686f0ad0107ecd9417d142f8ad
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6180277
Reviewed-by: Khushal Sagar <[email protected]>
Reviewed-by: Charlie Reis <[email protected]>
Reviewed-by: Dave Tapuska <[email protected]>
Commit-Queue: Aldo Culquicondor <[email protected]>
Reviewed-by: Ken Buchanan <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1413116}
diff --git a/content/browser/renderer_host/navigation_controller_impl.cc b/content/browser/renderer_host/navigation_controller_impl.cc
index ccb5c76..e2c8559 100644
--- a/content/browser/renderer_host/navigation_controller_impl.cc
+++ b/content/browser/renderer_host/navigation_controller_impl.cc
@@ -4111,7 +4111,8 @@
           /*cookie_deprecation_label=*/std::nullopt,
           /*visited_link_salt=*/std::nullopt,
           /*local_surface_id=*/std::nullopt,
-          node->current_frame_host()->GetCachedPermissionStatuses());
+          node->current_frame_host()->GetCachedPermissionStatuses(),
+          /*should_skip_screentshot=*/false);
 #if BUILDFLAG(IS_ANDROID)
   if (ValidateDataURLAsString(params.data_url_as_string)) {
     commit_params->data_url_as_string = params.data_url_as_string->as_string();