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

Side by Side Diff: Source/web/WebHistoryItem.cpp

Issue 28983004: Split the frame tree logic out of HistoryItem (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 1 month 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 | Annotate | Revision Log
« no previous file with comments | « Source/web/WebFrameImpl.cpp ('k') | Source/web/WebViewImpl.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 219 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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
OLDNEW
« no previous file with comments | « Source/web/WebFrameImpl.cpp ('k') | Source/web/WebViewImpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698