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

Side by Side Diff: third_party/WebKit/Source/core/loader/HistoryItem.cpp

Issue 2714943004: Move unique name generation and tracking into //content. (Closed)
Patch Set: Rebase again. Created 3 years, 9 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) 2005, 2006, 2008, 2011 Apple Inc. All rights reserved. 2 * Copyright (C) 2005, 2006, 2008, 2011 Apple 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 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 } 56 }
57 57
58 KURL HistoryItem::url() const { 58 KURL HistoryItem::url() const {
59 return KURL(ParsedURLString, m_urlString); 59 return KURL(ParsedURLString, m_urlString);
60 } 60 }
61 61
62 const Referrer& HistoryItem::referrer() const { 62 const Referrer& HistoryItem::referrer() const {
63 return m_referrer; 63 return m_referrer;
64 } 64 }
65 65
66 const String& HistoryItem::target() const {
67 return m_target;
68 }
69
70 void HistoryItem::setURLString(const String& urlString) { 66 void HistoryItem::setURLString(const String& urlString) {
71 if (m_urlString != urlString) 67 if (m_urlString != urlString)
72 m_urlString = urlString; 68 m_urlString = urlString;
73 } 69 }
74 70
75 void HistoryItem::setURL(const KURL& url) { 71 void HistoryItem::setURL(const KURL& url) {
76 setURLString(url.getString()); 72 setURLString(url.getString());
77 } 73 }
78 74
79 void HistoryItem::setReferrer(const Referrer& referrer) { 75 void HistoryItem::setReferrer(const Referrer& referrer) {
80 // This should be a RELEASE_ASSERT. 76 // This should be a RELEASE_ASSERT.
81 m_referrer = SecurityPolicy::generateReferrer(referrer.referrerPolicy, url(), 77 m_referrer = SecurityPolicy::generateReferrer(referrer.referrerPolicy, url(),
82 referrer.referrer); 78 referrer.referrer);
83 } 79 }
84 80
85 void HistoryItem::setTarget(const String& target) {
86 m_target = target;
87 }
88
89 const ScrollOffset& HistoryItem::visualViewportScrollOffset() const { 81 const ScrollOffset& HistoryItem::visualViewportScrollOffset() const {
90 return m_visualViewportScrollOffset; 82 return m_visualViewportScrollOffset;
91 } 83 }
92 84
93 void HistoryItem::setVisualViewportScrollOffset(const ScrollOffset& offset) { 85 void HistoryItem::setVisualViewportScrollOffset(const ScrollOffset& offset) {
94 m_visualViewportScrollOffset = offset; 86 m_visualViewportScrollOffset = offset;
95 setDidSaveScrollOrScaleState(true); 87 setDidSaveScrollOrScaleState(true);
96 } 88 }
97 89
98 const ScrollOffset& HistoryItem::getScrollOffset() const { 90 const ScrollOffset& HistoryItem::getScrollOffset() const {
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
174 // FIXME: We should find a better way to check if this is the current 166 // FIXME: We should find a better way to check if this is the current
175 // document. 167 // document.
176 return equalIgnoringFragmentIdentifier(url(), doc->url()); 168 return equalIgnoringFragmentIdentifier(url(), doc->url());
177 } 169 }
178 170
179 DEFINE_TRACE(HistoryItem) { 171 DEFINE_TRACE(HistoryItem) {
180 visitor->trace(m_documentState); 172 visitor->trace(m_documentState);
181 } 173 }
182 174
183 } // namespace blink 175 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/loader/HistoryItem.h ('k') | third_party/WebKit/Source/core/page/FrameTree.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698