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

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

Issue 2720763002: PlzNavigate: preserve SourceLocation when navigating (Closed)
Patch Set: PlzNavigate: preserve SourceLocation when navigating 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 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
152 void WebDataSourceImpl::detachFromFrame() { 152 void WebDataSourceImpl::detachFromFrame() {
153 DocumentLoader::detachFromFrame(); 153 DocumentLoader::detachFromFrame();
154 m_extraData.reset(); 154 m_extraData.reset();
155 } 155 }
156 156
157 void WebDataSourceImpl::setSubresourceFilter( 157 void WebDataSourceImpl::setSubresourceFilter(
158 WebDocumentSubresourceFilter* subresourceFilter) { 158 WebDocumentSubresourceFilter* subresourceFilter) {
159 DocumentLoader::setSubresourceFilter(WTF::wrapUnique(subresourceFilter)); 159 DocumentLoader::setSubresourceFilter(WTF::wrapUnique(subresourceFilter));
160 } 160 }
161 161
162 void WebDataSourceImpl::setSourceLocation(
163 const WebSourceLocation& sourceLocation) {
164 std::unique_ptr<SourceLocation> location =
165 SourceLocation::create(sourceLocation.url, sourceLocation.lineNumber,
166 sourceLocation.columnNumber, nullptr);
167 DocumentLoader::setSourceLocation(std::move(location));
168 }
169
170 void WebDataSourceImpl::resetSourceLocation() {
171 DocumentLoader::setSourceLocation(nullptr);
172 }
173
162 DEFINE_TRACE(WebDataSourceImpl) { 174 DEFINE_TRACE(WebDataSourceImpl) {
163 DocumentLoader::trace(visitor); 175 DocumentLoader::trace(visitor);
164 } 176 }
165 177
166 } // namespace blink 178 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698