| OLD | NEW |
| 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 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 74 // 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 |
| 75 // sequentially call WebPageSeriazlierClient once the data buffer is full. | 75 // sequentially call WebPageSeriazlierClient once the data buffer is full. |
| 76 // | 76 // |
| 77 // Return false means if no data has been serialized (i.e. because | 77 // Return false means if no data has been serialized (i.e. because |
| 78 // the target frame didn't have a valid url). | 78 // the target frame didn't have a valid url). |
| 79 // | 79 // |
| 80 // The parameter frame specifies which frame need to be serialized. | 80 // The parameter frame specifies which frame need to be serialized. |
| 81 // The parameter client specifies the pointer of interface | 81 // The parameter client specifies the pointer of interface |
| 82 // WebPageSerializerClient providing a sink interface to receive the | 82 // WebPageSerializerClient providing a sink interface to receive the |
| 83 // individual chunks of data to be saved. | 83 // individual chunks of data to be saved. |
| 84 // The parameter links contain original URLs of all saved links. | |
| 85 // The parameter localPaths contain corresponding local file paths of all | |
| 86 // saved links, which matched with vector:links one by one. | |
| 87 // The parameter localDirectoryName is relative path of directory which | |
| 88 // contain all saved auxiliary files included all sub frames and resources. | |
| 89 BLINK_EXPORT static bool serialize( | 84 BLINK_EXPORT static bool serialize( |
| 90 WebLocalFrame*, | 85 WebLocalFrame*, |
| 91 WebPageSerializerClient*, | 86 WebPageSerializerClient*); |
| 92 const WebVector<WebURL>& links, | |
| 93 const WebVector<WebString>& localPaths, | |
| 94 const WebString& localDirectoryName); | |
| 95 | 87 |
| 96 // Retrieve all the resource for the passed view, including the main frame | 88 // Retrieve all the resource for the passed view, including the main frame |
| 97 // and sub-frames. Returns true if all resources were retrieved | 89 // and sub-frames. Returns true if all resources were retrieved |
| 98 // successfully. | 90 // successfully. |
| 99 BLINK_EXPORT static bool retrieveAllResources(WebView*, | 91 BLINK_EXPORT static bool retrieveAllResources(WebView*, |
| 100 const WebVector<WebCString>&
supportedSchemes, | 92 const WebVector<WebCString>&
supportedSchemes, |
| 101 WebVector<WebURL>* resources, | 93 WebVector<WebURL>* resources, |
| 102 WebVector<WebURL>* frames); | 94 WebVector<WebURL>* frames); |
| 103 | 95 |
| 104 // FIXME: The following are here for unit testing purposes. Consider | 96 // FIXME: The following are here for unit testing purposes. Consider |
| 105 // changing the unit tests instead. | 97 // changing the unit tests instead. |
| 106 | 98 |
| 107 // Generate the META for charset declaration. | 99 // Generate the META for charset declaration. |
| 108 BLINK_EXPORT static WebString generateMetaCharsetDeclaration(const WebString
& charset); | 100 BLINK_EXPORT static WebString generateMetaCharsetDeclaration(const WebString
& charset); |
| 109 // Generate the MOTW declaration. | 101 // Generate the MOTW declaration. |
| 110 BLINK_EXPORT static WebString generateMarkOfTheWebDeclaration(const WebURL&)
; | 102 BLINK_EXPORT static WebString generateMarkOfTheWebDeclaration(const WebURL&)
; |
| 111 // Generate the default base tag declaration. | 103 // Generate the default base tag declaration. |
| 112 BLINK_EXPORT static WebString generateBaseTagDeclaration(const WebString& ba
seTarget); | 104 BLINK_EXPORT static WebString generateBaseTagDeclaration(const WebString& ba
seTarget); |
| 113 }; | 105 }; |
| 114 | 106 |
| 115 } // namespace blink | 107 } // namespace blink |
| 116 | 108 |
| 117 #endif | 109 #endif |
| OLD | NEW |