summaryrefslogtreecommitdiffstats
path: root/content/renderer/web_frame_utils.h
diff options
context:
space:
mode:
authorlukasza <lukasza@chromium.org>2015-12-14 12:24:13 -0800
committerCommit bot <commit-bot@chromium.org>2015-12-14 20:25:14 +0000
commit70b79c8c617e3e73e4df9e7e548ff675a9886a6b (patch)
tree435a2b856086cd46b09d39dca2f524e9c76e553d /content/renderer/web_frame_utils.h
parent47e71df82119e855e8c94d2d05e3890a7df3e0e1 (diff)
downloadchromium_src-70b79c8c617e3e73e4df9e7e548ff675a9886a6b.zip
chromium_src-70b79c8c617e3e73e4df9e7e548ff675a9886a6b.tar.gz
chromium_src-70b79c8c617e3e73e4df9e7e548ff675a9886a6b.tar.bz2
OOPIFs: Transitioning MHTML generation from view-oriented to frame-oriented.
IPC Messages ============ This CL replaces the following view-oriented IPC messages: IPC_MESSAGE_ROUTED2(ViewMsg_SavePageAsMHTML, int /* job_id */, IPC::PlatformFileForTransit /* file handle */) IPC_MESSAGE_CONTROL2(ViewHostMsg_SavedPageAsMHTML, int /* job_id */, int64 /* size of the MHTML file, -1 if error */) with the following frame-oriented IPC messages: IPC_MESSAGE_ROUTED5(FrameMsg_SerializeAsMHTML, int /* job_id (used to match responses to requests) */, IPC::PlatformFileForTransit /* destination file */, std::string /* mhtml boundary marker */, FrameRoutingIdToContentIdMap, bool /* is last frame */) IPC_MESSAGE_ROUTED3(FrameHostMsg_SerializeAsMHTMLResponse, int /* job_id (used to match responses to requests) */, bool /* true if success, false if error */, std::string /* mhtml boundary marker that was used */) This allows MHTML generation to work, even when some frames are in separate processes. Supporting changes ================== This CL builds on top of recent CLs below: crrev.com/1436683002 - Making PageSerializer operate on single frames only. crrev.com/1441553002 - Generating CIDs in Blink during MHTML serialization. crrev.com/1415463007 - Exposing more granular methods from MHTMLArchive. crrev.com/1380963006 - MHTMLGenerator preparation for per-frame serialization. Handling of renderer IPC messages was moved from MHTMLGenerator into RenderFrameImpl. Handling of browser IPC responses was moved from RenderProcessHostImpl into RenderFrameHostImpl. MHTMLGenerationManager now handles walking over all the frames and asking the renderer process to serialize them into MHTML (sequentially - one frame at a time). MHTMLGenerationManager also handles generating ContentIDs for all frames. BUG=538766 Review URL: https://codereview.chromium.org/1386873003 Cr-Commit-Position: refs/heads/master@{#365082}
Diffstat (limited to 'content/renderer/web_frame_utils.h')
-rw-r--r--content/renderer/web_frame_utils.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/content/renderer/web_frame_utils.h b/content/renderer/web_frame_utils.h
index 73d188a..798fb03a 100644
--- a/content/renderer/web_frame_utils.h
+++ b/content/renderer/web_frame_utils.h
@@ -15,6 +15,10 @@ namespace content {
// associated with |web_frame|.
int GetRoutingIdForFrameOrProxy(blink::WebFrame* web_frame);
+// Returns either a WebLocalFrame or WebRemoteFrame based on |routing_id|.
+// Returns nullptr if |routing_id| doesn't properly map to a frame.
+blink::WebFrame* GetWebFrameFromRoutingIdForFrameOrProxy(int routing_id);
+
} // namespace content
#endif // CONTENT_RENDERER_WEB_FRAME_UTILS_H_