summaryrefslogtreecommitdiffstats
path: root/chromium/third_party/WebKit/Source/core/loader/DocumentLoader.h
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2018-01-29 16:35:13 +0100
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2018-02-01 15:33:35 +0000
commitc8c2d1901aec01e934adf561a9fdf0cc776cdef8 (patch)
tree9157c3d9815e5870799e070b113813bec53e0535 /chromium/third_party/WebKit/Source/core/loader/DocumentLoader.h
parentabefd5095b41dac94ca451d784ab6e27372e981a (diff)
BASELINE: Update Chromium to 64.0.3282.139
Change-Id: I1cae68fe9c94ff7608b26b8382fc19862cdb293a Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'chromium/third_party/WebKit/Source/core/loader/DocumentLoader.h')
-rw-r--r--chromium/third_party/WebKit/Source/core/loader/DocumentLoader.h40
1 files changed, 30 insertions, 10 deletions
diff --git a/chromium/third_party/WebKit/Source/core/loader/DocumentLoader.h b/chromium/third_party/WebKit/Source/core/loader/DocumentLoader.h
index f2ea7be579c..dd012182657 100644
--- a/chromium/third_party/WebKit/Source/core/loader/DocumentLoader.h
+++ b/chromium/third_party/WebKit/Source/core/loader/DocumentLoader.h
@@ -31,6 +31,8 @@
#define DocumentLoader_h
#include <memory>
+#include "base/memory/scoped_refptr.h"
+#include "base/unguessable_token.h"
#include "bindings/core/v8/SourceLocation.h"
#include "core/CoreExport.h"
#include "core/dom/ViewportDescription.h"
@@ -50,7 +52,6 @@
#include "platform/loader/fetch/ResourceResponse.h"
#include "platform/loader/fetch/SubstituteData.h"
#include "platform/wtf/HashSet.h"
-#include "platform/wtf/RefPtr.h"
#include "public/platform/WebLoadingBehaviorFlag.h"
#include <memory>
@@ -78,13 +79,16 @@ class CORE_EXPORT DocumentLoader
USING_GARBAGE_COLLECTED_MIXIN(DocumentLoader);
public:
- static DocumentLoader* Create(LocalFrame* frame,
- const ResourceRequest& request,
- const SubstituteData& data,
- ClientRedirectPolicy client_redirect_policy) {
+ static DocumentLoader* Create(
+ LocalFrame* frame,
+ const ResourceRequest& request,
+ const SubstituteData& data,
+ ClientRedirectPolicy client_redirect_policy,
+ const base::UnguessableToken& devtools_navigation_token) {
DCHECK(frame);
- return new DocumentLoader(frame, request, data, client_redirect_policy);
+ return new DocumentLoader(frame, request, data, client_redirect_policy,
+ devtools_navigation_token);
}
~DocumentLoader() override;
@@ -125,7 +129,7 @@ class CORE_EXPORT DocumentLoader
void DidObserveLoadingBehavior(WebLoadingBehaviorFlag);
void UpdateForSameDocumentNavigation(const KURL&,
SameDocumentNavigationSource,
- RefPtr<SerializedScriptValue>,
+ scoped_refptr<SerializedScriptValue>,
HistoryScrollRestorationType,
FrameLoadType,
Document*);
@@ -215,13 +219,28 @@ class CORE_EXPORT DocumentLoader
void LoadFailed(const ResourceError&);
- DECLARE_VIRTUAL_TRACE();
+ void Trace(blink::Visitor*) override;
+
+ // For automation driver-initiated navigations over the devtools protocol,
+ // |devtools_navigation_token_| is used to tag the navigation. This navigation
+ // token is then sent into the renderer and lands on the DocumentLoader. That
+ // way subsequent Blink-level frame lifecycle events can be associated with
+ // the concrete navigation.
+ // - The value should not be sent back to the browser.
+ // - The value on DocumentLoader may be generated in the renderer in some
+ // cases, and thus shouldn't be trusted.
+ // TODO(crbug.com/783506): Replace devtools navigation token with the generic
+ // navigation token that can be passed from renderer to the browser.
+ const base::UnguessableToken& GetDevToolsNavigationToken() {
+ return devtools_navigation_token_;
+ }
protected:
DocumentLoader(LocalFrame*,
const ResourceRequest&,
const SubstituteData&,
- ClientRedirectPolicy);
+ ClientRedirectPolicy,
+ const base::UnguessableToken& devtools_navigation_token);
static bool ShouldClearWindowName(const LocalFrame&,
SecurityOrigin* previous_security_origin,
@@ -358,7 +377,8 @@ class CORE_EXPORT DocumentLoader
// Used to protect against reentrancy into dataReceived().
bool in_data_received_;
- RefPtr<SharedBuffer> data_buffer_;
+ scoped_refptr<SharedBuffer> data_buffer_;
+ base::UnguessableToken devtools_navigation_token_;
};
DECLARE_WEAK_IDENTIFIER_MAP(DocumentLoader);