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

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

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.cpp
diff --git a/third_party/WebKit/Source/bindings/core/v8/V8CustomElementPerContextData.cpp b/third_party/WebKit/Source/bindings/core/v8/V8CustomElementPerContextData.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..274332a9af3725772fea1a86751d8a0ca85362a6
--- /dev/null
+++ b/third_party/WebKit/Source/bindings/core/v8/V8CustomElementPerContextData.cpp
@@ -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.
+
+#include "bindings/core/v8/V8CustomElementPerContextData.h"
+
+#include "bindings/core/v8/ScriptCustomElementDefinition.h"
+#include "bindings/core/v8/V0CustomElementBinding.h"
+
+namespace blink {
+
+V8CustomElementPerContextData::V8CustomElementPerContextData()
+{
+}
+
+V8CustomElementPerContextData::~V8CustomElementPerContextData()
+{
+}
+
+DEFINE_TRACE(V8CustomElementPerContextData)
+{
+ visitor->trace(m_definitions);
+}
+
+void V8CustomElementPerContextData::v0AddBinding(
+ PassOwnPtr<V0CustomElementBinding> binding)
+{
+ m_v0Bindings.append(std::move(binding));
+}
+
+uint32_t V8CustomElementPerContextData::addDefinition(
+ ScriptCustomElementDefinition* def)
+{
+ m_definitions.append(def);
+ return m_definitions.size() - 1;
+}
+
+ScriptCustomElementDefinition* V8CustomElementPerContextData::getDefinition(
+ uint32_t index)
+{
+ return m_definitions[index];
+}
+
+} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698