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

Side by Side Diff: third_party/WebKit/Source/bindings/core/v8/ScriptCustomElementDefinition.cpp

Issue 1994093002: Introduce CustomElementRegistry#get() method (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 2016-06-01T15:09:57 Created 4 years, 6 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 // Copyright 2016 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "bindings/core/v8/ScriptCustomElementDefinition.h" 5 #include "bindings/core/v8/ScriptCustomElementDefinition.h"
6 6
7 #include "bindings/core/v8/ScriptState.h" 7 #include "bindings/core/v8/ScriptState.h"
8 #include "bindings/core/v8/V8Binding.h" 8 #include "bindings/core/v8/V8Binding.h"
9 #include "bindings/core/v8/V8CustomElementsRegistry.h" 9 #include "bindings/core/v8/V8CustomElementsRegistry.h"
10 #include "bindings/core/v8/V8HiddenValue.h" 10 #include "bindings/core/v8/V8HiddenValue.h"
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 DCHECK(!m_constructor.isEmpty()); 125 DCHECK(!m_constructor.isEmpty());
126 return m_constructor.newLocal(m_scriptState->isolate()); 126 return m_constructor.newLocal(m_scriptState->isolate());
127 } 127 }
128 128
129 v8::Local<v8::Object> ScriptCustomElementDefinition::prototype() const 129 v8::Local<v8::Object> ScriptCustomElementDefinition::prototype() const
130 { 130 {
131 DCHECK(!m_prototype.isEmpty()); 131 DCHECK(!m_prototype.isEmpty());
132 return m_prototype.newLocal(m_scriptState->isolate()); 132 return m_prototype.newLocal(m_scriptState->isolate());
133 } 133 }
134 134
135 // CustomElementDefinition
136 ScriptValue ScriptCustomElementDefinition::getConstructorForScript()
137 {
138 return ScriptValue(m_scriptState.get(), constructor());
139 }
140
135 } // namespace blink 141 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698