OLD | NEW |
(Empty) | |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include "bindings/core/v8/V8CustomElementPerContextData.h" |
| 6 |
| 7 #include "bindings/core/v8/ScriptCustomElementDefinition.h" |
| 8 #include "bindings/core/v8/V0CustomElementBinding.h" |
| 9 |
| 10 namespace blink { |
| 11 |
| 12 V8CustomElementPerContextData::V8CustomElementPerContextData() |
| 13 { |
| 14 } |
| 15 |
| 16 V8CustomElementPerContextData::~V8CustomElementPerContextData() |
| 17 { |
| 18 } |
| 19 |
| 20 DEFINE_TRACE(V8CustomElementPerContextData) |
| 21 { |
| 22 visitor->trace(m_definitions); |
| 23 } |
| 24 |
| 25 void V8CustomElementPerContextData::v0AddBinding( |
| 26 PassOwnPtr<V0CustomElementBinding> binding) |
| 27 { |
| 28 m_v0Bindings.append(std::move(binding)); |
| 29 } |
| 30 |
| 31 uint32_t V8CustomElementPerContextData::addDefinition( |
| 32 ScriptCustomElementDefinition* def) |
| 33 { |
| 34 m_definitions.append(def); |
| 35 return m_definitions.size() - 1; |
| 36 } |
| 37 |
| 38 ScriptCustomElementDefinition* V8CustomElementPerContextData::getDefinition( |
| 39 uint32_t index) |
| 40 { |
| 41 return m_definitions[index]; |
| 42 } |
| 43 |
| 44 } // namespace blink |
OLD | NEW |