| OLD | NEW |
| 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 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 147 // Decides whether this context is privileged, as described in | 147 // Decides whether this context is privileged, as described in |
| 148 // https://w3c.github.io/webappsec/specs/powerfulfeatures/#settings-privileg
ed. | 148 // https://w3c.github.io/webappsec/specs/powerfulfeatures/#settings-privileg
ed. |
| 149 virtual bool isSecureContext(String& errorMessage, const SecureContextCheck
= StandardSecureContextCheck) const = 0; | 149 virtual bool isSecureContext(String& errorMessage, const SecureContextCheck
= StandardSecureContextCheck) const = 0; |
| 150 virtual bool isSecureContext(const SecureContextCheck = StandardSecureContex
tCheck) const; | 150 virtual bool isSecureContext(const SecureContextCheck = StandardSecureContex
tCheck) const; |
| 151 | 151 |
| 152 virtual String outgoingReferrer() const; | 152 virtual String outgoingReferrer() const; |
| 153 // Parses a comma-separated list of referrer policy tokens, and sets | 153 // Parses a comma-separated list of referrer policy tokens, and sets |
| 154 // the context's referrer policy to the last one that is a valid | 154 // the context's referrer policy to the last one that is a valid |
| 155 // policy. Logs a message to the console if none of the policy | 155 // policy. Logs a message to the console if none of the policy |
| 156 // tokens are valid policies. | 156 // tokens are valid policies. |
| 157 void parseAndSetReferrerPolicy(const String& policies); | 157 // |
| 158 // If |supportLegacyKeywords| is true, then the legacy keywords |
| 159 // "never", "default", "always", and "origin-when-crossorigin" are |
| 160 // parsed as valid policies. |
| 161 void parseAndSetReferrerPolicy(const String& policies, bool supportLegacyKey
words = false); |
| 158 void setReferrerPolicy(ReferrerPolicy); | 162 void setReferrerPolicy(ReferrerPolicy); |
| 159 ReferrerPolicy getReferrerPolicy() const { return m_referrerPolicy; } | 163 ReferrerPolicy getReferrerPolicy() const { return m_referrerPolicy; } |
| 160 | 164 |
| 161 protected: | 165 protected: |
| 162 ExecutionContext(); | 166 ExecutionContext(); |
| 163 virtual ~ExecutionContext(); | 167 virtual ~ExecutionContext(); |
| 164 | 168 |
| 165 virtual const KURL& virtualURL() const = 0; | 169 virtual const KURL& virtualURL() const = 0; |
| 166 virtual KURL virtualCompleteURL(const String&) const = 0; | 170 virtual KURL virtualCompleteURL(const String&) const = 0; |
| 167 | 171 |
| (...skipping 19 matching lines...) Expand all Loading... |
| 187 | 191 |
| 188 Deque<std::unique_ptr<SuspendableTask>> m_suspendedTasks; | 192 Deque<std::unique_ptr<SuspendableTask>> m_suspendedTasks; |
| 189 bool m_isRunSuspendableTasksScheduled; | 193 bool m_isRunSuspendableTasksScheduled; |
| 190 | 194 |
| 191 ReferrerPolicy m_referrerPolicy; | 195 ReferrerPolicy m_referrerPolicy; |
| 192 }; | 196 }; |
| 193 | 197 |
| 194 } // namespace blink | 198 } // namespace blink |
| 195 | 199 |
| 196 #endif // ExecutionContext_h | 200 #endif // ExecutionContext_h |
| OLD | NEW |