| 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 18 matching lines...) Expand all Loading... |
| 29 #define SKY_ENGINE_CORE_DOM_DOCUMENTINIT_H_ | 29 #define SKY_ENGINE_CORE_DOM_DOCUMENTINIT_H_ |
| 30 | 30 |
| 31 #include "sky/engine/platform/heap/Handle.h" | 31 #include "sky/engine/platform/heap/Handle.h" |
| 32 #include "sky/engine/platform/weborigin/KURL.h" | 32 #include "sky/engine/platform/weborigin/KURL.h" |
| 33 #include "sky/engine/wtf/PassRefPtr.h" | 33 #include "sky/engine/wtf/PassRefPtr.h" |
| 34 #include "sky/engine/wtf/RefPtr.h" | 34 #include "sky/engine/wtf/RefPtr.h" |
| 35 #include "sky/engine/wtf/WeakPtr.h" | 35 #include "sky/engine/wtf/WeakPtr.h" |
| 36 | 36 |
| 37 namespace blink { | 37 namespace blink { |
| 38 | 38 |
| 39 class CustomElementRegistrationContext; | |
| 40 class Document; | 39 class Document; |
| 40 class HTMLImportsController; |
| 41 class LocalFrame; | 41 class LocalFrame; |
| 42 class HTMLImportsController; | 42 class NewCustomElementRegistry; |
| 43 class Settings; | 43 class Settings; |
| 44 | 44 |
| 45 class DocumentInit final { | 45 class DocumentInit final { |
| 46 STACK_ALLOCATED(); | 46 STACK_ALLOCATED(); |
| 47 public: | 47 public: |
| 48 explicit DocumentInit(const KURL& = KURL(), LocalFrame* = 0, WeakPtr<Documen
t> = nullptr, HTMLImportsController* = 0); | 48 explicit DocumentInit(const KURL& = KURL(), LocalFrame* = 0, WeakPtr<Documen
t> = nullptr, HTMLImportsController* = 0); |
| 49 DocumentInit(const DocumentInit&); | 49 DocumentInit(const DocumentInit&); |
| 50 ~DocumentInit(); | 50 ~DocumentInit(); |
| 51 | 51 |
| 52 const KURL& url() const { return m_url; } | 52 const KURL& url() const { return m_url; } |
| 53 LocalFrame* frame() const { return m_frame; } | 53 LocalFrame* frame() const { return m_frame; } |
| 54 HTMLImportsController* importsController() const { return m_importsControlle
r; } | 54 HTMLImportsController* importsController() const { return m_importsControlle
r; } |
| 55 | 55 |
| 56 bool shouldSetURL() const; | 56 bool shouldSetURL() const; |
| 57 bool isSeamlessAllowedFor(Document* child) const; | 57 bool isSeamlessAllowedFor(Document* child) const; |
| 58 | 58 |
| 59 Document* parent() const { return m_parent.get(); } | 59 Document* parent() const { return m_parent.get(); } |
| 60 Document* owner() const { return m_owner.get(); } | 60 Document* owner() const { return m_owner.get(); } |
| 61 LocalFrame* ownerFrame() const; | 61 LocalFrame* ownerFrame() const; |
| 62 Settings* settings() const; | 62 Settings* settings() const; |
| 63 | 63 |
| 64 DocumentInit& withRegistrationContext(CustomElementRegistrationContext&); | 64 DocumentInit& withElementRegistry(NewCustomElementRegistry&); |
| 65 PassRefPtr<CustomElementRegistrationContext> registrationContext() const; | |
| 66 WeakPtr<Document> contextDocument() const; | 65 WeakPtr<Document> contextDocument() const; |
| 67 | 66 |
| 67 NewCustomElementRegistry* elementRegistry() const { |
| 68 return m_elementRegistry.get(); |
| 69 } |
| 70 |
| 68 static DocumentInit fromContext(WeakPtr<Document> contextDocument, const KUR
L& = KURL()); | 71 static DocumentInit fromContext(WeakPtr<Document> contextDocument, const KUR
L& = KURL()); |
| 69 | 72 |
| 70 private: | 73 private: |
| 71 LocalFrame* frameForSecurityContext() const; | 74 LocalFrame* frameForSecurityContext() const; |
| 72 | 75 |
| 73 KURL m_url; | 76 KURL m_url; |
| 74 LocalFrame* m_frame; | 77 LocalFrame* m_frame; |
| 75 RefPtr<Document> m_parent; | 78 RefPtr<Document> m_parent; |
| 76 RefPtr<Document> m_owner; | 79 RefPtr<Document> m_owner; |
| 77 WeakPtr<Document> m_contextDocument; | 80 WeakPtr<Document> m_contextDocument; |
| 78 RawPtr<HTMLImportsController> m_importsController; | 81 RawPtr<HTMLImportsController> m_importsController; |
| 79 RefPtr<CustomElementRegistrationContext> m_registrationContext; | 82 RefPtr<NewCustomElementRegistry> m_elementRegistry; |
| 80 }; | 83 }; |
| 81 | 84 |
| 82 } // namespace blink | 85 } // namespace blink |
| 83 | 86 |
| 84 #endif // SKY_ENGINE_CORE_DOM_DOCUMENTINIT_H_ | 87 #endif // SKY_ENGINE_CORE_DOM_DOCUMENTINIT_H_ |
| OLD | NEW |