Add a WebContents getter callback in ResourceRequestInfo

This CL adds a method to ResourceRequestInfo that returns a callback that can
be used on the UI thread to get the WebContents associated with the request.It
is used in the SSLErrorHandler code, instead of using a RenderProcessHost ID
and a RenderFrameHost ID directly .This allows SSL error interstitials to work
with PlzNavigate enabled.

BUG = 504347

Review URL: https://codereview.chromium.org/1459473003

Cr-Commit-Position: refs/heads/master@{#361314}
diff --git a/content/browser/loader/resource_loader.cc b/content/browser/loader/resource_loader.cc
index 5a9bbff..be19ccd 100644
--- a/content/browser/loader/resource_loader.cc
+++ b/content/browser/loader/resource_loader.cc
@@ -312,19 +312,9 @@
                                            bool fatal) {
   ResourceRequestInfoImpl* info = GetRequestInfo();
 
-  int render_process_id;
-  int render_frame_id;
-  if (!info->GetAssociatedRenderFrame(&render_process_id, &render_frame_id))
-    NOTREACHED();
-
   SSLManager::OnSSLCertificateError(
-      weak_ptr_factory_.GetWeakPtr(),
-      info->GetResourceType(),
-      request_->url(),
-      render_process_id,
-      render_frame_id,
-      ssl_info,
-      fatal);
+      weak_ptr_factory_.GetWeakPtr(), info->GetResourceType(), request_->url(),
+      info->GetWebContentsForRequest(), ssl_info, fatal);
 }
 
 void ResourceLoader::OnBeforeNetworkStart(net::URLRequest* unused,