| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
| 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) | 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) |
| 4 * (C) 2001 Dirk Mueller (mueller@kde.org) | 4 * (C) 2001 Dirk Mueller (mueller@kde.org) |
| 5 * (C) 2006 Alexey Proskuryakov (ap@webkit.org) | 5 * (C) 2006 Alexey Proskuryakov (ap@webkit.org) |
| 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012 Apple Inc. All r
ights reserved. | 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012 Apple Inc. All r
ights reserved. |
| 7 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t
orchmobile.com/) | 7 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t
orchmobile.com/) |
| 8 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) | 8 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) |
| 9 * Copyright (C) 2013 Google Inc. All rights reserved. | 9 * Copyright (C) 2013 Google Inc. All rights reserved. |
| 10 * | 10 * |
| (...skipping 13 matching lines...) Expand all Loading... |
| 24 * Boston, MA 02110-1301, USA. | 24 * Boston, MA 02110-1301, USA. |
| 25 * | 25 * |
| 26 */ | 26 */ |
| 27 | 27 |
| 28 #ifndef DocumentInit_h | 28 #ifndef DocumentInit_h |
| 29 #define DocumentInit_h | 29 #define DocumentInit_h |
| 30 | 30 |
| 31 #include "core/CoreExport.h" | 31 #include "core/CoreExport.h" |
| 32 #include "core/dom/SandboxFlags.h" | 32 #include "core/dom/SandboxFlags.h" |
| 33 #include "core/dom/SecurityContext.h" | 33 #include "core/dom/SecurityContext.h" |
| 34 #include "core/dom/custom/CustomElementRegistrationContext.h" | 34 #include "core/dom/custom/V0CustomElementRegistrationContext.h" |
| 35 #include "platform/heap/Handle.h" | 35 #include "platform/heap/Handle.h" |
| 36 #include "platform/weborigin/KURL.h" | 36 #include "platform/weborigin/KURL.h" |
| 37 #include "wtf/WeakPtr.h" | 37 #include "wtf/WeakPtr.h" |
| 38 | 38 |
| 39 namespace blink { | 39 namespace blink { |
| 40 | 40 |
| 41 class Document; | 41 class Document; |
| 42 class LocalFrame; | 42 class LocalFrame; |
| 43 class HTMLImportsController; | 43 class HTMLImportsController; |
| 44 class Settings; | 44 class Settings; |
| (...skipping 20 matching lines...) Expand all Loading... |
| 65 bool isHostedInReservedIPRange() const; | 65 bool isHostedInReservedIPRange() const; |
| 66 SecurityContext::InsecureRequestsPolicy getInsecureRequestsPolicy() const; | 66 SecurityContext::InsecureRequestsPolicy getInsecureRequestsPolicy() const; |
| 67 SecurityContext::InsecureNavigationsSet* insecureNavigationsToUpgrade() cons
t; | 67 SecurityContext::InsecureNavigationsSet* insecureNavigationsToUpgrade() cons
t; |
| 68 | 68 |
| 69 Document* parent() const { return m_parent.get(); } | 69 Document* parent() const { return m_parent.get(); } |
| 70 Document* owner() const { return m_owner.get(); } | 70 Document* owner() const { return m_owner.get(); } |
| 71 KURL parentBaseURL() const; | 71 KURL parentBaseURL() const; |
| 72 LocalFrame* ownerFrame() const; | 72 LocalFrame* ownerFrame() const; |
| 73 Settings* settings() const; | 73 Settings* settings() const; |
| 74 | 74 |
| 75 DocumentInit& withRegistrationContext(CustomElementRegistrationContext*); | 75 DocumentInit& withRegistrationContext(V0CustomElementRegistrationContext*); |
| 76 DocumentInit& withNewRegistrationContext(); | 76 DocumentInit& withNewRegistrationContext(); |
| 77 CustomElementRegistrationContext* registrationContext(Document*) const; | 77 V0CustomElementRegistrationContext* registrationContext(Document*) const; |
| 78 Document* contextDocument() const; | 78 Document* contextDocument() const; |
| 79 | 79 |
| 80 static DocumentInit fromContext(Document* contextDocument, const KURL& = KUR
L()); | 80 static DocumentInit fromContext(Document* contextDocument, const KURL& = KUR
L()); |
| 81 | 81 |
| 82 private: | 82 private: |
| 83 LocalFrame* frameForSecurityContext() const; | 83 LocalFrame* frameForSecurityContext() const; |
| 84 | 84 |
| 85 KURL m_url; | 85 KURL m_url; |
| 86 Member<LocalFrame> m_frame; | 86 Member<LocalFrame> m_frame; |
| 87 Member<Document> m_parent; | 87 Member<Document> m_parent; |
| 88 Member<Document> m_owner; | 88 Member<Document> m_owner; |
| 89 Member<Document> m_contextDocument; | 89 Member<Document> m_contextDocument; |
| 90 Member<HTMLImportsController> m_importsController; | 90 Member<HTMLImportsController> m_importsController; |
| 91 Member<CustomElementRegistrationContext> m_registrationContext; | 91 Member<V0CustomElementRegistrationContext> m_registrationContext; |
| 92 bool m_createNewRegistrationContext; | 92 bool m_createNewRegistrationContext; |
| 93 | 93 |
| 94 // In some rare cases, we'll re-use a LocalDOMWindow for a new Document. For
example, | 94 // In some rare cases, we'll re-use a LocalDOMWindow for a new Document. For
example, |
| 95 // when a script calls window.open("..."), the browser gives JavaScript a wi
ndow | 95 // when a script calls window.open("..."), the browser gives JavaScript a wi
ndow |
| 96 // synchronously but kicks off the load in the window asynchronously. Web si
tes | 96 // synchronously but kicks off the load in the window asynchronously. Web si
tes |
| 97 // expect that modifications that they make to the window object synchronous
ly | 97 // expect that modifications that they make to the window object synchronous
ly |
| 98 // won't be blown away when the network load commits. To make that happen, w
e | 98 // won't be blown away when the network load commits. To make that happen, w
e |
| 99 // "securely transition" the existing LocalDOMWindow to the Document that re
sults from | 99 // "securely transition" the existing LocalDOMWindow to the Document that re
sults from |
| 100 // the network load. See also SecurityContext::isSecureTransitionTo. | 100 // the network load. See also SecurityContext::isSecureTransitionTo. |
| 101 // FIXME: This is for DocumentWriter creation, not for one of Document. | 101 // FIXME: This is for DocumentWriter creation, not for one of Document. |
| 102 bool m_shouldReuseDefaultView; | 102 bool m_shouldReuseDefaultView; |
| 103 }; | 103 }; |
| 104 | 104 |
| 105 } // namespace blink | 105 } // namespace blink |
| 106 | 106 |
| 107 #endif // DocumentInit_h | 107 #endif // DocumentInit_h |
| OLD | NEW |