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 219 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
230 { | 230 { |
231 ensureMutable(); | 231 ensureMutable(); |
232 m_private->setFormData(httpBody); | 232 m_private->setFormData(httpBody); |
233 } | 233 } |
234 | 234 |
235 WebVector<WebHistoryItem> WebHistoryItem::children() const | 235 WebVector<WebHistoryItem> WebHistoryItem::children() const |
236 { | 236 { |
237 return m_private->children(); | 237 return m_private->children(); |
238 } | 238 } |
239 | 239 |
| 240 void WebHistoryItem::setChildren(const WebVector<WebHistoryItem>& items) |
| 241 { |
| 242 ensureMutable(); |
| 243 m_private->clearChildren(); |
| 244 for (size_t i = 0; i < items.size(); ++i) |
| 245 m_private->addChildItem(items[i]); |
| 246 } |
| 247 |
240 void WebHistoryItem::appendToChildren(const WebHistoryItem& item) | 248 void WebHistoryItem::appendToChildren(const WebHistoryItem& item) |
241 { | 249 { |
242 ensureMutable(); | 250 ensureMutable(); |
243 m_private->addChildItem(item); | 251 m_private->addChildItem(item); |
244 } | 252 } |
245 | 253 |
246 WebVector<WebString> WebHistoryItem::getReferencedFilePaths() const | 254 WebVector<WebString> WebHistoryItem::getReferencedFilePaths() const |
247 { | 255 { |
248 HashSet<String> filePaths; | 256 HashSet<String> filePaths; |
249 addReferencedFilePaths(m_private.get(), filePaths); | 257 addReferencedFilePaths(m_private.get(), filePaths); |
(...skipping 19 matching lines...) Expand all Loading... |
269 return m_private.get(); | 277 return m_private.get(); |
270 } | 278 } |
271 | 279 |
272 void WebHistoryItem::ensureMutable() | 280 void WebHistoryItem::ensureMutable() |
273 { | 281 { |
274 if (!m_private->hasOneRef()) | 282 if (!m_private->hasOneRef()) |
275 m_private = m_private->copy(); | 283 m_private = m_private->copy(); |
276 } | 284 } |
277 | 285 |
278 } // namespace blink | 286 } // namespace blink |
OLD | NEW |