OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "config.h" | 5 #include "config.h" |
6 #include "core/frame/DOMWindow.h" | 6 #include "core/frame/DOMWindow.h" |
7 | 7 |
8 #include "bindings/core/v8/ScriptCallStackFactory.h" | 8 #include "bindings/core/v8/ScriptCallStackFactory.h" |
9 #include "core/dom/Document.h" | 9 #include "core/dom/Document.h" |
10 #include "core/dom/ExceptionCode.h" | 10 #include "core/dom/ExceptionCode.h" |
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
156 m_location->reset(); | 156 m_location->reset(); |
157 m_location = nullptr; | 157 m_location = nullptr; |
158 } | 158 } |
159 } | 159 } |
160 | 160 |
161 bool DOMWindow::isSecureContext() const | 161 bool DOMWindow::isSecureContext() const |
162 { | 162 { |
163 if (!frame()) | 163 if (!frame()) |
164 return false; | 164 return false; |
165 | 165 |
166 String unusedErrorMessage; | 166 return document()->isSecureContext(ExecutionContext::StandardSecureContextCh
eck); |
167 return document()->isSecureContext(unusedErrorMessage, ExecutionContext::Sta
ndardSecureContextCheck); | |
168 } | 167 } |
169 | 168 |
170 void DOMWindow::postMessage(PassRefPtr<SerializedScriptValue> message, const Mes
sagePortArray* ports, const String& targetOrigin, LocalDOMWindow* source, Except
ionState& exceptionState) | 169 void DOMWindow::postMessage(PassRefPtr<SerializedScriptValue> message, const Mes
sagePortArray* ports, const String& targetOrigin, LocalDOMWindow* source, Except
ionState& exceptionState) |
171 { | 170 { |
172 if (!isCurrentlyDisplayedInFrame()) | 171 if (!isCurrentlyDisplayedInFrame()) |
173 return; | 172 return; |
174 | 173 |
175 Document* sourceDocument = source->document(); | 174 Document* sourceDocument = source->document(); |
176 | 175 |
177 // Compute the target origin. We need to do this synchronously in order | 176 // Compute the target origin. We need to do this synchronously in order |
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
341 m_windowIsClosing = true; | 340 m_windowIsClosing = true; |
342 } | 341 } |
343 | 342 |
344 DEFINE_TRACE(DOMWindow) | 343 DEFINE_TRACE(DOMWindow) |
345 { | 344 { |
346 visitor->trace(m_location); | 345 visitor->trace(m_location); |
347 EventTargetWithInlineData::trace(visitor); | 346 EventTargetWithInlineData::trace(visitor); |
348 } | 347 } |
349 | 348 |
350 } // namespace blink | 349 } // namespace blink |
OLD | NEW |