[mparch] Move remaining page data from RenderViewHostImpl to PageImpl.
Introduce a PageDelegate interface implemented by WebContentsImpl and
plumbed in the same way as all of the other delegate interfaces
exposed by content/browser/renderer_host/ and implemented by
WebContentsImpl.
On the Blink side, this involves plumbing the first visually non-empty
paint signal through blink.mojom.LocalMainFrameHost instead of
blink.mojom.FrameWidgetHost, and checking that the former actually
still exists by the time the renderer is notified that the paint has
occurred.
Bug: 1223658
Change-Id: I8cbaa01ffec0633d2eb7a50932e4ba39cbb205cb
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2983267
Commit-Queue: Jeremy Roman <[email protected]>
Reviewed-by: Kinuko Yasuda <[email protected]>
Reviewed-by: Alexander Timin <[email protected]>
Reviewed-by: Sreeja Kamishetty <[email protected]>
Reviewed-by: Lucas Gadani <[email protected]>
Cr-Commit-Position: refs/heads/master@{#898947}
diff --git a/content/browser/renderer_host/navigation_controller_impl.cc b/content/browser/renderer_host/navigation_controller_impl.cc
index 185b535..6873b11 100644
--- a/content/browser/renderer_host/navigation_controller_impl.cc
+++ b/content/browser/renderer_host/navigation_controller_impl.cc
@@ -839,10 +839,8 @@
}
bool NavigationControllerImpl::CanViewSource() {
- const std::string& mime_type = frame_tree_.root()
- ->current_frame_host()
- ->render_view_host()
- ->contents_mime_type();
+ const std::string& mime_type =
+ frame_tree_.root()->current_frame_host()->GetPage().contents_mime_type();
bool is_viewable_mime_type = blink::IsSupportedNonImageMimeType(mime_type) &&
!media::IsSupportedMediaMimeType(mime_type);
NavigationEntry* visible_entry = GetVisibleEntry();