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

Unified Diff: third_party/WebKit/Source/core/loader/DocumentLoader.h

Issue 2720763002: PlzNavigate: preserve SourceLocation when navigating (Closed)
Patch Set: Addressed nate's comments Created 3 years, 10 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/loader/DocumentLoader.h
diff --git a/third_party/WebKit/Source/core/loader/DocumentLoader.h b/third_party/WebKit/Source/core/loader/DocumentLoader.h
index bc1e5d3ff5c8991b26873dad183d20a34f2c1f0b..337cd0729142aeab734668476fc8bb24d6ddd51f 100644
--- a/third_party/WebKit/Source/core/loader/DocumentLoader.h
+++ b/third_party/WebKit/Source/core/loader/DocumentLoader.h
@@ -30,6 +30,8 @@
#ifndef DocumentLoader_h
#define DocumentLoader_h
+#include <memory>
+#include "bindings/core/v8/SourceLocation.h"
#include "core/CoreExport.h"
#include "core/dom/ViewportDescription.h"
#include "core/dom/WeakIdentifierMap.h"
@@ -183,6 +185,9 @@ class CORE_EXPORT DocumentLoader
Resource* startPreload(Resource::Type, FetchRequest&);
+ std::unique_ptr<SourceLocation> copySourceLocation() const;
+ void setSourceLocation(std::unique_ptr<SourceLocation>);
+
DECLARE_VIRTUAL_TRACE();
protected:
@@ -283,6 +288,11 @@ class CORE_EXPORT DocumentLoader
bool m_wasBlockedAfterCSP;
+ // PlzNavigate: set when committing a navigation. The data has originally been
+ // captured when the navigation was sent to the browser process, and it is
+ // sent back at commit time.
+ std::unique_ptr<SourceLocation> m_sourceLocation;
+
enum State {
NotStarted,
Provisional,

Powered by Google App Engine
This is Rietveld 408576698