| 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 15 matching lines...) Expand all Loading... |
| 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 29 */ | 29 */ |
| 30 | 30 |
| 31 #include "config.h" | 31 #include "config.h" |
| 32 #include "public/web/WebHistoryItem.h" | 32 #include "public/web/WebHistoryItem.h" |
| 33 | 33 |
| 34 #include "bindings/core/v8/SerializedScriptValue.h" | 34 #include "bindings/core/v8/SerializedScriptValue.h" |
| 35 #include "core/loader/HistoryItem.h" | 35 #include "core/loader/HistoryItem.h" |
| 36 #include "platform/network/FormData.h" | 36 #include "platform/network/EncodedFormData.h" |
| 37 #include "platform/weborigin/KURL.h" | 37 #include "platform/weborigin/KURL.h" |
| 38 #include "public/platform/WebFloatPoint.h" | 38 #include "public/platform/WebFloatPoint.h" |
| 39 #include "public/platform/WebHTTPBody.h" | 39 #include "public/platform/WebHTTPBody.h" |
| 40 #include "public/platform/WebPoint.h" | 40 #include "public/platform/WebPoint.h" |
| 41 #include "public/platform/WebString.h" | 41 #include "public/platform/WebString.h" |
| 42 #include "public/platform/WebVector.h" | 42 #include "public/platform/WebVector.h" |
| 43 #include "public/web/WebSerializedScriptValue.h" | 43 #include "public/web/WebSerializedScriptValue.h" |
| 44 #include "wtf/text/StringHash.h" | 44 #include "wtf/text/StringHash.h" |
| 45 | 45 |
| 46 namespace blink { | 46 namespace blink { |
| (...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 205 } | 205 } |
| 206 | 206 |
| 207 void WebHistoryItem::setHTTPBody(const WebHTTPBody& httpBody) | 207 void WebHistoryItem::setHTTPBody(const WebHTTPBody& httpBody) |
| 208 { | 208 { |
| 209 m_private->setFormData(httpBody); | 209 m_private->setFormData(httpBody); |
| 210 } | 210 } |
| 211 | 211 |
| 212 WebVector<WebString> WebHistoryItem::getReferencedFilePaths() const | 212 WebVector<WebString> WebHistoryItem::getReferencedFilePaths() const |
| 213 { | 213 { |
| 214 HashSet<String> filePaths; | 214 HashSet<String> filePaths; |
| 215 const FormData* formData = m_private->formData(); | 215 const EncodedFormData* formData = m_private->formData(); |
| 216 if (formData) { | 216 if (formData) { |
| 217 for (size_t i = 0; i < formData->elements().size(); ++i) { | 217 for (size_t i = 0; i < formData->elements().size(); ++i) { |
| 218 const FormDataElement& element = formData->elements()[i]; | 218 const FormDataElement& element = formData->elements()[i]; |
| 219 if (element.m_type == FormDataElement::encodedFile) | 219 if (element.m_type == FormDataElement::encodedFile) |
| 220 filePaths.add(element.m_filename); | 220 filePaths.add(element.m_filename); |
| 221 } | 221 } |
| 222 } | 222 } |
| 223 | 223 |
| 224 const Vector<String>& referencedFilePaths = m_private->getReferencedFilePath
s(); | 224 const Vector<String>& referencedFilePaths = m_private->getReferencedFilePath
s(); |
| 225 for (size_t i = 0; i < referencedFilePaths.size(); ++i) | 225 for (size_t i = 0; i < referencedFilePaths.size(); ++i) |
| (...skipping 14 matching lines...) Expand all Loading... |
| 240 m_private = item; | 240 m_private = item; |
| 241 return *this; | 241 return *this; |
| 242 } | 242 } |
| 243 | 243 |
| 244 WebHistoryItem::operator PassRefPtrWillBeRawPtr<HistoryItem>() const | 244 WebHistoryItem::operator PassRefPtrWillBeRawPtr<HistoryItem>() const |
| 245 { | 245 { |
| 246 return m_private.get(); | 246 return m_private.get(); |
| 247 } | 247 } |
| 248 | 248 |
| 249 } // namespace blink | 249 } // namespace blink |
| OLD | NEW |