Skip to content

Commit

Permalink
Implement PrintCrossProcessSubframe for AlloyBrowserHostImpl (fixes #…
Browse files Browse the repository at this point in the history
  • Loading branch information
mbragg12 authored and magreenblatt committed Oct 22, 2024
1 parent 323cbdc commit 02fec23
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
11 changes: 11 additions & 0 deletions libcef/browser/alloy/alloy_browser_host_impl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
#include "chrome/browser/picture_in_picture/picture_in_picture_window_manager.h"
#include "chrome/common/webui_url_constants.h"
#include "components/input/native_web_keyboard_event.h"
#include "components/printing/browser/print_composite_client.h"
#include "components/zoom/page_zoom.h"
#include "content/browser/gpu/compositor_util.h"
#include "content/public/browser/desktop_media_id.h"
Expand Down Expand Up @@ -922,6 +923,16 @@ bool AlloyBrowserHostImpl::IsAudioMuted() {
// content::WebContentsDelegate methods.
// -----------------------------------------------------------------------------

void AlloyBrowserHostImpl::PrintCrossProcessSubframe(
content::WebContents* web_contents,
const gfx::Rect& rect,
int document_cookie,
content::RenderFrameHost* subframe_host) const {
auto* client = printing::PrintCompositeClient::FromWebContents(web_contents);
if (client)
client->PrintCrossProcessSubframe(rect, document_cookie, subframe_host);
}

content::WebContents* AlloyBrowserHostImpl::OpenURLFromTab(
content::WebContents* source,
const content::OpenURLParams& params,
Expand Down
4 changes: 4 additions & 0 deletions libcef/browser/alloy/alloy_browser_host_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,10 @@ class AlloyBrowserHostImpl : public CefBrowserHostBase,
DestructionState destruction_state() const { return destruction_state_; }

// content::WebContentsDelegate methods.
void PrintCrossProcessSubframe(content::WebContents* web_contents,
const gfx::Rect& rect,
int document_cookie,
content::RenderFrameHost* subframe_host) const override;
content::WebContents* OpenURLFromTab(
content::WebContents* source,
const content::OpenURLParams& params,
Expand Down

0 comments on commit 02fec23

Please sign in to comment.