Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(119)

Unified Diff: content/browser/frame_host/render_frame_proxy_host.cc

Issue 2653963002: [Experimental] Supporting OOPIF printing
Patch Set: Rename service, fix for webview, and connect to DiscardableMemoryManager Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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
« no previous file with comments | « content/browser/frame_host/render_frame_proxy_host.h ('k') | content/browser/service_manager/service_manager_context.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698