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

Side by Side Diff: Source/core/dom/DocumentInit.h

Issue 296703009: Oilpan: move custom element objects to the heap. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 7 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) 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 12 matching lines...) Expand all
23 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 23 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
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/dom/SandboxFlags.h" 31 #include "core/dom/SandboxFlags.h"
32 #include "core/dom/SecurityContext.h" 32 #include "core/dom/SecurityContext.h"
33 #include "platform/heap/Handle.h"
33 #include "platform/weborigin/KURL.h" 34 #include "platform/weborigin/KURL.h"
34 #include "wtf/PassRefPtr.h" 35 #include "wtf/PassRefPtr.h"
35 #include "wtf/RefPtr.h" 36 #include "wtf/RefPtr.h"
36 #include "wtf/WeakPtr.h" 37 #include "wtf/WeakPtr.h"
37 38
38 namespace WebCore { 39 namespace WebCore {
39 40
40 class CustomElementRegistrationContext; 41 class CustomElementRegistrationContext;
41 class Document; 42 class Document;
42 class LocalFrame; 43 class LocalFrame;
43 class HTMLImportsController; 44 class HTMLImportsController;
44 class Settings; 45 class Settings;
45 46
46 class DocumentInit { 47 class DocumentInit FINAL {
48 STACK_ALLOCATED();
47 public: 49 public:
48 explicit DocumentInit(const KURL& = KURL(), LocalFrame* = 0, WeakPtr<Documen t> = WeakPtr<Document>(), HTMLImportsController* = 0); 50 explicit DocumentInit(const KURL& = KURL(), LocalFrame* = 0, WeakPtr<Documen t> = WeakPtr<Document>(), HTMLImportsController* = 0);
49 DocumentInit(const DocumentInit&); 51 DocumentInit(const DocumentInit&);
50 ~DocumentInit(); 52 ~DocumentInit();
51 53
52 const KURL& url() const { return m_url; } 54 const KURL& url() const { return m_url; }
53 LocalFrame* frame() const { return m_frame; } 55 LocalFrame* frame() const { return m_frame; }
54 HTMLImportsController* importsController() const { return m_importsControlle r; } 56 HTMLImportsController* importsController() const { return m_importsControlle r; }
55 57
56 bool hasSecurityContext() const { return frameForSecurityContext(); } 58 bool hasSecurityContext() const { return frameForSecurityContext(); }
57 bool shouldTreatURLAsSrcdocDocument() const; 59 bool shouldTreatURLAsSrcdocDocument() const;
58 bool shouldSetURL() const; 60 bool shouldSetURL() const;
59 bool isSeamlessAllowedFor(Document* child) const; 61 bool isSeamlessAllowedFor(Document* child) const;
60 SandboxFlags sandboxFlags() const; 62 SandboxFlags sandboxFlags() const;
61 63
62 Document* parent() const { return m_parent.get(); } 64 Document* parent() const { return m_parent.get(); }
63 Document* owner() const { return m_owner.get(); } 65 Document* owner() const { return m_owner.get(); }
64 KURL parentBaseURL() const; 66 KURL parentBaseURL() const;
65 LocalFrame* ownerFrame() const; 67 LocalFrame* ownerFrame() const;
66 Settings* settings() const; 68 Settings* settings() const;
67 69
68 DocumentInit& withRegistrationContext(CustomElementRegistrationContext*); 70 DocumentInit& withRegistrationContext(CustomElementRegistrationContext*);
69 DocumentInit& withNewRegistrationContext(); 71 DocumentInit& withNewRegistrationContext();
70 PassRefPtr<CustomElementRegistrationContext> registrationContext(Document*) const; 72 PassRefPtrWillBeRawPtr<CustomElementRegistrationContext> registrationContext (Document*) const;
71 WeakPtr<Document> contextDocument() const; 73 WeakPtr<Document> contextDocument() const;
72 74
73 static DocumentInit fromContext(WeakPtr<Document> contextDocument, const KUR L& = KURL()); 75 static DocumentInit fromContext(WeakPtr<Document> contextDocument, const KUR L& = KURL());
74 76
75 private: 77 private:
76 LocalFrame* frameForSecurityContext() const; 78 LocalFrame* frameForSecurityContext() const;
77 79
78 KURL m_url; 80 KURL m_url;
79 LocalFrame* m_frame; 81 LocalFrame* m_frame;
80 RefPtr<Document> m_parent; 82 RefPtr<Document> m_parent;
81 RefPtr<Document> m_owner; 83 RefPtr<Document> m_owner;
82 WeakPtr<Document> m_contextDocument; 84 WeakPtr<Document> m_contextDocument;
haraken 2014/05/22 08:24:10 Not related to your CL, but this looks strange to
sof 2014/05/26 15:46:18 Will follow up on this separately (along with the
83 HTMLImportsController* m_importsController; 85 RawPtrWillBeMember<HTMLImportsController> m_importsController;
84 RefPtr<CustomElementRegistrationContext> m_registrationContext; 86 RefPtrWillBeMember<CustomElementRegistrationContext> m_registrationContext;
85 bool m_createNewRegistrationContext; 87 bool m_createNewRegistrationContext;
86 }; 88 };
87 89
88 } // namespace WebCore 90 } // namespace WebCore
89 91
90 #endif // DocumentInit_h 92 #endif // DocumentInit_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698