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

Side by Side Diff: third_party/WebKit/public/web/WebPageSerializer.h

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, 3 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 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 BLINK_EXPORT static WebCString serializeToMHTML(WebView*); 63 BLINK_EXPORT static WebCString serializeToMHTML(WebView*);
64 64
65 // Similar to serializeToMHTML but uses binary encoding for the MHTML parts. 65 // Similar to serializeToMHTML but uses binary encoding for the MHTML parts.
66 // This results in a smaller MHTML file but it might not be supported by oth er browsers. 66 // This results in a smaller MHTML file but it might not be supported by oth er browsers.
67 BLINK_EXPORT static WebCString serializeToMHTMLUsingBinaryEncoding(WebView*) ; 67 BLINK_EXPORT static WebCString serializeToMHTMLUsingBinaryEncoding(WebView*) ;
68 68
69 // IMPORTANT: 69 // IMPORTANT:
70 // The API below is an older implementation of a pageserialization that 70 // The API below is an older implementation of a pageserialization that
71 // will be removed soon. 71 // will be removed soon.
72 72
73 73 // This function will serialize the specified frame to HTML data.
74 // This function will find out all frames and serialize them to HTML data.
75 // We have a data buffer to temporary saving generated html data. We will 74 // We have a data buffer to temporary saving generated html data. We will
76 // sequentially call WebPageSeriazlierClient once the data buffer is full. 75 // sequentially call WebPageSeriazlierClient once the data buffer is full.
77 // 76 //
78 // Return false means no available frame has been serialized, otherwise 77 // Return false means if no data has been serialized (i.e. because
79 // return true. 78 // the target frame didn't have a valid url).
80 // 79 //
81 // The parameter frame specifies which frame need to be serialized. 80 // The parameter frame specifies which frame need to be serialized.
82 // The parameter recursive specifies whether we need to
83 // serialize all sub frames of the specified frame or not.
84 // The parameter client specifies the pointer of interface 81 // The parameter client specifies the pointer of interface
85 // WebPageSerializerClient providing a sink interface to receive the 82 // WebPageSerializerClient providing a sink interface to receive the
86 // individual chunks of data to be saved. 83 // individual chunks of data to be saved.
87 // The parameter links contain original URLs of all saved links. 84 // The parameter links contain original URLs of all saved links.
88 // The parameter localPaths contain corresponding local file paths of all 85 // The parameter localPaths contain corresponding local file paths of all
89 // saved links, which matched with vector:links one by one. 86 // saved links, which matched with vector:links one by one.
90 // The parameter localDirectoryName is relative path of directory which 87 // The parameter localDirectoryName is relative path of directory which
91 // contain all saved auxiliary files included all sub frames and resources. 88 // contain all saved auxiliary files included all sub frames and resources.
92 BLINK_EXPORT static bool serialize( 89 BLINK_EXPORT static bool serialize(
93 WebLocalFrame*, 90 WebLocalFrame*,
94 bool recursive,
95 WebPageSerializerClient*, 91 WebPageSerializerClient*,
96 const WebVector<WebURL>& links, 92 const WebVector<WebURL>& links,
97 const WebVector<WebString>& localPaths, 93 const WebVector<WebString>& localPaths,
98 const WebString& localDirectoryName); 94 const WebString& localDirectoryName);
99 95
100 // Retrieve all the resource for the passed view, including the main frame 96 // Retrieve all the resource for the passed view, including the main frame
101 // and sub-frames. Returns true if all resources were retrieved 97 // and sub-frames. Returns true if all resources were retrieved
102 // successfully. 98 // successfully.
103 BLINK_EXPORT static bool retrieveAllResources(WebView*, 99 BLINK_EXPORT static bool retrieveAllResources(WebView*,
104 const WebVector<WebCString>& supportedSchemes, 100 const WebVector<WebCString>& supportedSchemes,
105 WebVector<WebURL>* resources, 101 WebVector<WebURL>* resources,
106 WebVector<WebURL>* frames); 102 WebVector<WebURL>* frames);
107 103
108 // FIXME: The following are here for unit testing purposes. Consider 104 // FIXME: The following are here for unit testing purposes. Consider
109 // changing the unit tests instead. 105 // changing the unit tests instead.
110 106
111 // Generate the META for charset declaration. 107 // Generate the META for charset declaration.
112 BLINK_EXPORT static WebString generateMetaCharsetDeclaration(const WebString & charset); 108 BLINK_EXPORT static WebString generateMetaCharsetDeclaration(const WebString & charset);
113 // Generate the MOTW declaration. 109 // Generate the MOTW declaration.
114 BLINK_EXPORT static WebString generateMarkOfTheWebDeclaration(const WebURL&) ; 110 BLINK_EXPORT static WebString generateMarkOfTheWebDeclaration(const WebURL&) ;
115 // Generate the default base tag declaration. 111 // Generate the default base tag declaration.
116 BLINK_EXPORT static WebString generateBaseTagDeclaration(const WebString& ba seTarget); 112 BLINK_EXPORT static WebString generateBaseTagDeclaration(const WebString& ba seTarget);
117 }; 113 };
118 114
119 } // namespace blink 115 } // namespace blink
120 116
121 #endif 117 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698