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

Unified Diff: third_party/WebKit/Source/bindings/core/v8/V8CustomElementPerContextData.h

Issue 2003033004: Split custom element script use and move it into bindings (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add missing CORE_EXPORT header. Created 4 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/bindings/core/v8/V8CustomElementPerContextData.h
diff --git a/third_party/WebKit/Source/bindings/core/v8/V8CustomElementPerContextData.h b/third_party/WebKit/Source/bindings/core/v8/V8CustomElementPerContextData.h
new file mode 100644
index 0000000000000000000000000000000000000000..bdb4ca6ef22efeb7e11cd396a7e680d93f49e461
--- /dev/null
+++ b/third_party/WebKit/Source/bindings/core/v8/V8CustomElementPerContextData.h
@@ -0,0 +1,44 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef V8CustomElementPerContextData_h
+#define V8CustomElementPerContextData_h
+
+#include "core/CoreExport.h"
+#include "platform/heap/Handle.h"
+#include "wtf/Noncopyable.h"
+#include "wtf/OwnPtr.h"
+#include "wtf/PassOwnPtr.h"
+#include "wtf/Vector.h"
+
+namespace blink {
+
+class ScriptCustomElementDefinition;
+class V0CustomElementBinding;
+
+class CORE_EXPORT V8CustomElementPerContextData final
+ : public GarbageCollectedFinalized<V8CustomElementPerContextData> {
+ WTF_MAKE_NONCOPYABLE(V8CustomElementPerContextData);
+public:
+ V8CustomElementPerContextData();
+ ~V8CustomElementPerContextData();
+
+ DECLARE_TRACE();
+
+ void v0AddBinding(PassOwnPtr<V0CustomElementBinding>);
+
+ uint32_t addDefinition(ScriptCustomElementDefinition*);
+ ScriptCustomElementDefinition* getDefinition(uint32_t index);
+
+private:
+ typedef Vector<OwnPtr<V0CustomElementBinding>> V0CustomElementBindingList;
+ V0CustomElementBindingList m_v0Bindings;
+
+ using CustomElementDefinitionVector = HeapVector<Member<ScriptCustomElementDefinition>>;
+ CustomElementDefinitionVector m_definitions;
+};
+
+} // namespace blink
+
+#endif // V8CustomElementPerContextData_h

Powered by Google App Engine
This is Rietveld 408576698