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

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

Issue 2714943004: Move unique name generation and tracking into //content. (Closed)
Patch Set: Revert back to original check in didUpdateName 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) 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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 #include "wtf/text/StringHash.h" 43 #include "wtf/text/StringHash.h"
44 44
45 namespace blink { 45 namespace blink {
46 46
47 void WebHistoryItem::initialize() { 47 void WebHistoryItem::initialize() {
48 m_private = HistoryItem::create(); 48 m_private = HistoryItem::create();
49 } 49 }
50 50
51 void WebHistoryItem::reset() { 51 void WebHistoryItem::reset() {
52 m_private.reset(); 52 m_private.reset();
53 m_target.reset();
53 } 54 }
54 55
55 void WebHistoryItem::assign(const WebHistoryItem& other) { 56 void WebHistoryItem::assign(const WebHistoryItem& other) {
56 m_private = other.m_private; 57 m_private = other.m_private;
58 m_target = other.m_target;
57 } 59 }
58 60
59 WebString WebHistoryItem::urlString() const { 61 WebString WebHistoryItem::urlString() const {
60 return m_private->urlString(); 62 return m_private->urlString();
61 } 63 }
62 64
63 void WebHistoryItem::setURLString(const WebString& url) { 65 void WebHistoryItem::setURLString(const WebString& url) {
64 m_private->setURLString(KURL(ParsedURLString, url).getString()); 66 m_private->setURLString(KURL(ParsedURLString, url).getString());
65 } 67 }
66 68
67 WebString WebHistoryItem::referrer() const { 69 WebString WebHistoryItem::referrer() const {
68 return m_private->referrer().referrer; 70 return m_private->referrer().referrer;
69 } 71 }
70 72
71 WebReferrerPolicy WebHistoryItem::getReferrerPolicy() const { 73 WebReferrerPolicy WebHistoryItem::getReferrerPolicy() const {
72 return static_cast<WebReferrerPolicy>(m_private->referrer().referrerPolicy); 74 return static_cast<WebReferrerPolicy>(m_private->referrer().referrerPolicy);
73 } 75 }
74 76
75 void WebHistoryItem::setReferrer(const WebString& referrer, 77 void WebHistoryItem::setReferrer(const WebString& referrer,
76 WebReferrerPolicy referrerPolicy) { 78 WebReferrerPolicy referrerPolicy) {
77 m_private->setReferrer( 79 m_private->setReferrer(
78 Referrer(referrer, static_cast<ReferrerPolicy>(referrerPolicy))); 80 Referrer(referrer, static_cast<ReferrerPolicy>(referrerPolicy)));
79 } 81 }
80 82
81 WebString WebHistoryItem::target() const { 83 const WebString& WebHistoryItem::target() const {
82 return m_private->target(); 84 return m_target;
83 } 85 }
84 86
85 void WebHistoryItem::setTarget(const WebString& target) { 87 void WebHistoryItem::setTarget(const WebString& target) {
86 m_private->setTarget(target); 88 m_target = target;
87 } 89 }
88 90
89 WebFloatPoint WebHistoryItem::visualViewportScrollOffset() const { 91 WebFloatPoint WebHistoryItem::visualViewportScrollOffset() const {
90 ScrollOffset offset = m_private->visualViewportScrollOffset(); 92 ScrollOffset offset = m_private->visualViewportScrollOffset();
91 return WebFloatPoint(offset.width(), offset.height()); 93 return WebFloatPoint(offset.width(), offset.height());
92 } 94 }
93 95
94 void WebHistoryItem::setVisualViewportScrollOffset( 96 void WebHistoryItem::setVisualViewportScrollOffset(
95 const WebFloatPoint& scrollOffset) { 97 const WebFloatPoint& scrollOffset) {
96 m_private->setVisualViewportScrollOffset(toScrollOffset(scrollOffset)); 98 m_private->setVisualViewportScrollOffset(toScrollOffset(scrollOffset));
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
212 WebHistoryItem& WebHistoryItem::operator=(HistoryItem* item) { 214 WebHistoryItem& WebHistoryItem::operator=(HistoryItem* item) {
213 m_private = item; 215 m_private = item;
214 return *this; 216 return *this;
215 } 217 }
216 218
217 WebHistoryItem::operator HistoryItem*() const { 219 WebHistoryItem::operator HistoryItem*() const {
218 return m_private.get(); 220 return m_private.get();
219 } 221 }
220 222
221 } // namespace blink 223 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698