[Paint Preview] OOPIF Capture

Adds support for paint previews to capture OOP subframes. This
essentially mirrors the established path printing uses, but differs in
that is uses Mojo and embedding tokens rather than IPC and routing ids.

Part of landing: crrev.com/c/1786583

Bug: 1011828, 1014955
Change-Id: If1593ec23c66d9fd9e8b49aef6dde063e17ffa55
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1985812
Reviewed-by: David Trainor <[email protected]>
Reviewed-by: Daniel Cheng <[email protected]>
Reviewed-by: Alex Moshchuk <[email protected]>
Reviewed-by: Ian Vollick <[email protected]>
Commit-Queue: Calder Kitagawa <[email protected]>
Cr-Commit-Position: refs/heads/master@{#738568}
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
index 20413cf..9eafc612b 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -4861,6 +4861,16 @@
                                        subframe_host);
 }
 
+void WebContentsImpl::CapturePaintPreviewOfCrossProcessSubframe(
+    const gfx::Rect& rect,
+    const base::UnguessableToken& guid,
+    RenderFrameHost* render_frame_host) {
+  if (!delegate_)
+    return;
+  delegate_->CapturePaintPreviewOfCrossProcessSubframe(this, rect, guid,
+                                                       render_frame_host);
+}
+
 #if defined(OS_ANDROID)
 base::android::ScopedJavaLocalRef<jobject>
 WebContentsImpl::GetJavaRenderFrameHostDelegate() {