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

Side by Side Diff: third_party/WebKit/Source/core/dom/ExecutionContext.h

Issue 2075053003: Add basic Referrer-Policy support for Documents (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: update test expectation for tweaked console message Created 4 years, 5 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) 2008 Apple Inc. All Rights Reserved. 2 * Copyright (C) 2008 Apple Inc. All Rights Reserved.
3 * Copyright (C) 2012 Google Inc. All Rights Reserved. 3 * Copyright (C) 2012 Google Inc. All Rights Reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 void allowWindowInteraction(); 142 void allowWindowInteraction();
143 void consumeWindowInteraction(); 143 void consumeWindowInteraction();
144 bool isWindowInteractionAllowed() const; 144 bool isWindowInteractionAllowed() const;
145 145
146 // Decides whether this context is privileged, as described in 146 // Decides whether this context is privileged, as described in
147 // https://w3c.github.io/webappsec/specs/powerfulfeatures/#settings-privileg ed. 147 // https://w3c.github.io/webappsec/specs/powerfulfeatures/#settings-privileg ed.
148 virtual bool isSecureContext(String& errorMessage, const SecureContextCheck = StandardSecureContextCheck) const = 0; 148 virtual bool isSecureContext(String& errorMessage, const SecureContextCheck = StandardSecureContextCheck) const = 0;
149 virtual bool isSecureContext(const SecureContextCheck = StandardSecureContex tCheck) const; 149 virtual bool isSecureContext(const SecureContextCheck = StandardSecureContex tCheck) const;
150 150
151 virtual String outgoingReferrer() const; 151 virtual String outgoingReferrer() const;
152 // Parses a comma-separated list of referrer policy tokens, and sets
153 // the context's referrer policy to the last one that is a valid
154 // policy. Logs a message to the console if none of the policy
155 // tokens are valid policies.
156 void parseAndSetReferrerPolicy(const String& policies);
152 void setReferrerPolicy(ReferrerPolicy); 157 void setReferrerPolicy(ReferrerPolicy);
153 ReferrerPolicy getReferrerPolicy() const { return m_referrerPolicy; } 158 ReferrerPolicy getReferrerPolicy() const { return m_referrerPolicy; }
154 159
155 protected: 160 protected:
156 ExecutionContext(); 161 ExecutionContext();
157 virtual ~ExecutionContext(); 162 virtual ~ExecutionContext();
158 163
159 virtual const KURL& virtualURL() const = 0; 164 virtual const KURL& virtualURL() const = 0;
160 virtual KURL virtualCompleteURL(const String&) const = 0; 165 virtual KURL virtualCompleteURL(const String&) const = 0;
161 166
(...skipping 20 matching lines...) Expand all
182 187
183 Deque<std::unique_ptr<SuspendableTask>> m_suspendedTasks; 188 Deque<std::unique_ptr<SuspendableTask>> m_suspendedTasks;
184 bool m_isRunSuspendableTasksScheduled; 189 bool m_isRunSuspendableTasksScheduled;
185 190
186 ReferrerPolicy m_referrerPolicy; 191 ReferrerPolicy m_referrerPolicy;
187 }; 192 };
188 193
189 } // namespace blink 194 } // namespace blink
190 195
191 #endif // ExecutionContext_h 196 #endif // ExecutionContext_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/dom/DocumentTest.cpp ('k') | third_party/WebKit/Source/core/dom/ExecutionContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698