Skip to content

Commit

Permalink
[ MimeHandlerView ] Printing for full page only
Browse files Browse the repository at this point in the history
This CL makes sure that Ctrl+P and other sources of print only work for
a full-page MimeHandlerView. This means MimeHandlerViewGuest will be
considered full page only if it is in a main frame.

Bug: 967950
Change-Id: I0bc359f56adf9475fd450c12359ab4fae7b539b0
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1633631
Reviewed-by: James MacLean <wjmaclean@chromium.org>
Commit-Queue: Ehsan Karamad <ekaramad@chromium.org>
Cr-Commit-Position: refs/heads/master@{#664274}
  • Loading branch information
ehsan-karamad authored and Commit Bot committed May 29, 2019
1 parent 8a7b19b commit 5be9176
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,8 @@ void MimeHandlerViewEmbedder::DidCreateMimeHandlerViewGuest(
// Full page plugin refers to <iframe> or main frame navigations to a
// MimeHandlerView resource. In such cases MHVG does not have a frame
// container.
bool is_full_page = !guest_view->maybe_has_frame_container();
bool is_full_page = !guest_view->maybe_has_frame_container() &&
!guest_view->GetEmbedderFrame()->GetParent();
MimeHandlerViewAttachHelper::Get(embedder_frame_process_id)
->AttachToOuterWebContents(guest_view, embedder_frame_process_id,
outer_contents_rfh, element_instance_id_,
Expand Down

0 comments on commit 5be9176

Please sign in to comment.