| Index: content/browser/frame_host/render_frame_proxy_host.cc
|
| diff --git a/content/browser/frame_host/render_frame_proxy_host.cc b/content/browser/frame_host/render_frame_proxy_host.cc
|
| index e0d773bff7bebc04d3d1a1ca7a88758a0640fae8..eaa865ccc31e593c85c1b1bd6c9784329453e37d 100644
|
| --- a/content/browser/frame_host/render_frame_proxy_host.cc
|
| +++ b/content/browser/frame_host/render_frame_proxy_host.cc
|
| @@ -21,6 +21,9 @@
|
| #include "content/common/frame_messages.h"
|
| #include "content/common/frame_owner_properties.h"
|
| #include "content/public/browser/browser_thread.h"
|
| +#include "content/public/browser/notification_service.h"
|
| +#include "content/public/browser/notification_types.h"
|
| +#include "content/public/browser/print_subframe_details.h"
|
| #include "ipc/ipc_message.h"
|
|
|
| namespace content {
|
| @@ -139,6 +142,7 @@ bool RenderFrameProxyHost::OnMessageReceived(const IPC::Message& msg) {
|
| IPC_MESSAGE_HANDLER(FrameHostMsg_DidChangeOpener, OnDidChangeOpener)
|
| IPC_MESSAGE_HANDLER(FrameHostMsg_AdvanceFocus, OnAdvanceFocus)
|
| IPC_MESSAGE_HANDLER(FrameHostMsg_FrameFocused, OnFrameFocused)
|
| + IPC_MESSAGE_HANDLER(FrameHostMsg_PrintRemoteFrame, OnPrintRemoteFrame)
|
| IPC_MESSAGE_UNHANDLED(handled = false)
|
| IPC_END_MESSAGE_MAP()
|
| return handled;
|
| @@ -372,4 +376,18 @@ void RenderFrameProxyHost::OnFrameFocused() {
|
| frame_tree_node_, GetSiteInstance());
|
| }
|
|
|
| +void RenderFrameProxyHost::OnPrintRemoteFrame(const gfx::Rect& rect,
|
| + int page_num) {
|
| + RenderFrameHostImpl* target_rfh =
|
| + frame_tree_node_->render_manager()->current_frame_host();
|
| +
|
| + PrintSubframeDetails details(page_num, GetRoutingID());
|
| + NotificationService::current()->Notify(
|
| + NOTIFICATION_PRINT_SUBFRAME_BEGIN,
|
| + content::Source<RenderFrameProxyHost>(this),
|
| + content::Details<PrintSubframeDetails>(&details));
|
| + target_rfh->Send(
|
| + new FrameMsg_PrintFrame(target_rfh->GetRoutingID(), rect, page_num));
|
| +}
|
| +
|
| } // namespace content
|
|
|