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

Side by Side Diff: third_party/WebKit/Source/web/WebPageSerializer.cpp

Issue 1371533002: Remove "recursive" parameter from WebPageSerializer::serialize. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@page-serialization-complete-serialization
Patch Set: Created 5 years, 2 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2009 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after
206 } 206 }
207 207
208 WebCString WebPageSerializer::serializeToMHTMLUsingBinaryEncoding(WebView* view) 208 WebCString WebPageSerializer::serializeToMHTMLUsingBinaryEncoding(WebView* view)
209 { 209 {
210 RefPtr<SharedBuffer> mhtml = serializePageToMHTML(toWebViewImpl(view)->page( ), MHTMLArchive::UseBinaryEncoding); 210 RefPtr<SharedBuffer> mhtml = serializePageToMHTML(toWebViewImpl(view)->page( ), MHTMLArchive::UseBinaryEncoding);
211 // FIXME: we are copying all the data here. Idealy we would have a WebShared Data(). 211 // FIXME: we are copying all the data here. Idealy we would have a WebShared Data().
212 return WebCString(mhtml->data(), mhtml->size()); 212 return WebCString(mhtml->data(), mhtml->size());
213 } 213 }
214 214
215 bool WebPageSerializer::serialize(WebLocalFrame* frame, 215 bool WebPageSerializer::serialize(WebLocalFrame* frame,
216 bool recursive,
217 WebPageSerializerClient* client, 216 WebPageSerializerClient* client,
218 const WebVector<WebURL>& links, 217 const WebVector<WebURL>& links,
219 const WebVector<WebString>& localPaths, 218 const WebVector<WebString>& localPaths,
220 const WebString& localDirectoryName) 219 const WebString& localDirectoryName)
221 { 220 {
222 WebPageSerializerImpl serializerImpl( 221 WebPageSerializerImpl serializerImpl(
223 frame, recursive, client, links, localPaths, localDirectoryName); 222 frame, client, links, localPaths, localDirectoryName);
224 return serializerImpl.serialize(); 223 return serializerImpl.serialize();
225 } 224 }
226 225
227 bool WebPageSerializer::retrieveAllResources(WebView* view, 226 bool WebPageSerializer::retrieveAllResources(WebView* view,
228 const WebVector<WebCString>& suppor tedSchemes, 227 const WebVector<WebCString>& suppor tedSchemes,
229 WebVector<WebURL>* resourceURLs, 228 WebVector<WebURL>* resourceURLs,
230 WebVector<WebURL>* frameURLs) { 229 WebVector<WebURL>* frameURLs) {
231 WebLocalFrameImpl* mainFrame = toWebLocalFrameImpl(view->mainFrame()); 230 WebLocalFrameImpl* mainFrame = toWebLocalFrameImpl(view->mainFrame());
232 if (!mainFrame) 231 if (!mainFrame)
233 return false; 232 return false;
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
281 280
282 WebString WebPageSerializer::generateBaseTagDeclaration(const WebString& baseTar get) 281 WebString WebPageSerializer::generateBaseTagDeclaration(const WebString& baseTar get)
283 { 282 {
284 if (baseTarget.isEmpty()) 283 if (baseTarget.isEmpty())
285 return String("<base href=\".\">"); 284 return String("<base href=\".\">");
286 String baseString = "<base href=\".\" target=\"" + static_cast<const String& >(baseTarget) + "\">"; 285 String baseString = "<base href=\".\" target=\"" + static_cast<const String& >(baseTarget) + "\">";
287 return baseString; 286 return baseString;
288 } 287 }
289 288
290 } // namespace blink 289 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698