| Index: content/renderer/render_frame_impl.cc
|
| diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc
|
| index aaccc4354fb359f545106b1e21036860f2f98372..f0e1c71d2b8914648af331ff640e116249e8df2b 100644
|
| --- a/content/renderer/render_frame_impl.cc
|
| +++ b/content/renderer/render_frame_impl.cc
|
| @@ -533,6 +533,12 @@ int GetRoutingIdForFrameOrProxy(WebFrame* web_frame) {
|
| return RenderFrameImpl::FromWebFrame(web_frame)->GetRoutingID();
|
| }
|
|
|
| +int GetRoutingIdForFrameOrProxy(const WebFrame* web_frame) {
|
| + // Const-cast is ok, because we only use |web_frame| to get the frame's
|
| + // routing id (and this doesn't modify the |web_frame|).
|
| + return GetRoutingIdForFrameOrProxy(const_cast<WebFrame*>(web_frame));
|
| +}
|
| +
|
| RenderFrameImpl::CreateRenderFrameImplFunction g_create_render_frame_impl =
|
| nullptr;
|
|
|
| @@ -3900,12 +3906,23 @@ void RenderFrameImpl::PlayerGone(WebMediaPlayer* player) {
|
| DidPause(player);
|
| }
|
|
|
| -void RenderFrameImpl::didSerializeDataForFrame(
|
| - const WebURL& frame_url,
|
| - const WebCString& data,
|
| - WebPageSerializerClient::PageSerializationStatus status) {
|
| - Send(new FrameHostMsg_SerializedHtmlWithLocalLinksResponse(
|
| - routing_id_, frame_url, data.data(), static_cast<int32>(status)));
|
| +void RenderFrameImpl::writeHtmlFragment(const WebCString& data) {
|
| + Send(new FrameHostMsg_SerializedHtmlFragment(routing_id_, data));
|
| +}
|
| +
|
| +void RenderFrameImpl::writeLocalPathForSubframe(const WebFrame& subframe) {
|
| + Send(new FrameHostMsg_SerializedLocalPathForChildFrame(
|
| + routing_id_, GetRoutingIdForFrameOrProxy(&subframe)));
|
| +}
|
| +
|
| +void RenderFrameImpl::writeLocalPathForSavableResource(
|
| + const WebURL& savable_resource_url) {
|
| + Send(new FrameHostMsg_SerializedLocalPathForSavableResource(
|
| + routing_id_, savable_resource_url));
|
| +}
|
| +
|
| +void RenderFrameImpl::endOfFrame() {
|
| + Send(new FrameHostMsg_SerializedEndOfFrame(routing_id_));
|
| }
|
|
|
| void RenderFrameImpl::AddObserver(RenderFrameObserver* observer) {
|
| @@ -4480,26 +4497,9 @@ void RenderFrameImpl::OnGetSavableResourceLinks() {
|
| routing_id_, frame_->document().url(), resources_list, referrers_list));
|
| }
|
|
|
| -void RenderFrameImpl::OnGetSerializedHtmlWithLocalLinks(
|
| - std::vector<GURL> original_urls,
|
| - std::vector<base::FilePath> equivalent_local_paths,
|
| - base::FilePath local_directory_path) {
|
| - // Only DCHECK, since the message comes from the trusted browser process.
|
| - DCHECK(original_urls.size() == equivalent_local_paths.size());
|
| -
|
| - // Convert std::vector of GURLs to WebVector<WebURL>
|
| - WebVector<WebURL> weburl_links(original_urls);
|
| -
|
| - // Convert std::vector of base::FilePath to WebVector<WebString>
|
| - WebVector<WebString> webstring_paths(equivalent_local_paths.size());
|
| - for (size_t i = 0; i < equivalent_local_paths.size(); i++)
|
| - webstring_paths[i] = equivalent_local_paths[i].AsUTF16Unsafe();
|
| -
|
| - // Serialize the frame (without recursing into subframes).
|
| +void RenderFrameImpl::OnGetSerializedHtmlWithLocalLinks() {
|
| WebPageSerializer::serialize(GetWebFrame(),
|
| - this, // WebPageSerializerClient.
|
| - weburl_links, webstring_paths,
|
| - local_directory_path.AsUTF16Unsafe());
|
| + this); // WebPageSerializerClient.
|
| }
|
|
|
| void RenderFrameImpl::OpenURL(const GURL& url,
|
|
|