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

Side by Side Diff: Source/core/dom/custom/CustomElementRegistrationContext.h

Issue 296703009: Oilpan: move custom element objects to the heap. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fix compilation issue pointed out by clang 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) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 7 *
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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 #include "wtf/text/AtomicString.h" 42 #include "wtf/text/AtomicString.h"
43 43
44 namespace WebCore { 44 namespace WebCore {
45 45
46 class CustomElementConstructorBuilder; 46 class CustomElementConstructorBuilder;
47 class CustomElementDefinition; 47 class CustomElementDefinition;
48 class Document; 48 class Document;
49 class Element; 49 class Element;
50 class ExceptionState; 50 class ExceptionState;
51 51
52 class CustomElementRegistrationContext : public RefCounted<CustomElementRegistra tionContext> { 52 class CustomElementRegistrationContext FINAL : public RefCountedWillBeGarbageCol lectedFinalized<CustomElementRegistrationContext> {
53 public: 53 public:
54 static PassRefPtr<CustomElementRegistrationContext> create(); 54 static PassRefPtrWillBeRawPtr<CustomElementRegistrationContext> create()
55 {
56 return adoptRefWillBeNoop(new CustomElementRegistrationContext());
57 }
55 58
56 ~CustomElementRegistrationContext() { } 59 ~CustomElementRegistrationContext() { }
57 60
58 // Definitions 61 // Definitions
59 void registerElement(Document*, CustomElementConstructorBuilder*, const Atom icString& type, CustomElement::NameSet validNames, ExceptionState&); 62 void registerElement(Document*, CustomElementConstructorBuilder*, const Atom icString& type, CustomElement::NameSet validNames, ExceptionState&);
60 63
61 PassRefPtrWillBeRawPtr<Element> createCustomTagElement(Document&, const Qual ifiedName&); 64 PassRefPtrWillBeRawPtr<Element> createCustomTagElement(Document&, const Qual ifiedName&);
62 static void setIsAttributeAndTypeExtension(Element*, const AtomicString& typ e); 65 static void setIsAttributeAndTypeExtension(Element*, const AtomicString& typ e);
63 static void setTypeExtension(Element*, const AtomicString& type); 66 static void setTypeExtension(Element*, const AtomicString& type);
64 67
65 void resolve(Element*, const CustomElementDescriptor&); 68 void resolve(Element*, const CustomElementDescriptor&);
66 69
70 void trace(Visitor*);
71
67 protected: 72 protected:
68 CustomElementRegistrationContext() { } 73 CustomElementRegistrationContext();
69 74
70 // Instance creation 75 // Instance creation
71 void didGiveTypeExtension(Element*, const AtomicString& type); 76 void didGiveTypeExtension(Element*, const AtomicString& type);
72 77
73 private: 78 private:
74 void resolveOrScheduleResolution(Element*, const AtomicString& typeExtension ); 79 void resolveOrScheduleResolution(Element*, const AtomicString& typeExtension );
75 80
76 CustomElementRegistry m_registry; 81 CustomElementRegistry m_registry;
77 82
78 // Element creation 83 // Element creation
79 CustomElementUpgradeCandidateMap m_candidates; 84 OwnPtrWillBeMember<CustomElementUpgradeCandidateMap> m_candidates;
80 }; 85 };
81 86
82 } 87 }
83 88
84 #endif // CustomElementRegistrationContext_h 89 #endif // CustomElementRegistrationContext_h
85 90
OLDNEW
« no previous file with comments | « Source/core/dom/custom/CustomElementObserver.cpp ('k') | Source/core/dom/custom/CustomElementRegistrationContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698