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

Unified Diff: third_party/WebKit/Source/core/dom/custom/CustomElementsRegistry.h

Issue 1994093002: Introduce CustomElementRegistry#get() method (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 2016-05-19T17:33:00 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/core/dom/custom/CustomElementsRegistry.h
diff --git a/third_party/WebKit/Source/core/dom/custom/CustomElementsRegistry.h b/third_party/WebKit/Source/core/dom/custom/CustomElementsRegistry.h
index de7d2aaa98ccb722181a7683df4dfefd92421b95..7058cc1dd0acfc36acd71443fa017494ee8dcec8 100644
--- a/third_party/WebKit/Source/core/dom/custom/CustomElementsRegistry.h
+++ b/third_party/WebKit/Source/core/dom/custom/CustomElementsRegistry.h
@@ -43,6 +43,9 @@ public:
CustomElementDefinition* definitionForConstructor(
ScriptState*,
v8::Local<v8::Value> constructor);
+
+ ScriptValue get(ScriptState*, const AtomicString& name) const;
+
v8::Local<v8::Object> prototype(
ScriptState*,
const CustomElementDefinition&);
@@ -59,7 +62,7 @@ private:
// of the definition; or given an id, contains the prototype.
// Returns true if the map was retrieved; false if the map was
// not initialized yet.
- v8::Local<v8::Map> idMap(ScriptState*);
+ v8::Local<v8::Map> idMap(ScriptState*) const;
bool idForConstructor(
ScriptState*,
@@ -70,7 +73,7 @@ private:
Member<const V0CustomElementRegistrationContext> m_v0;
HeapVector<Member<CustomElementDefinition>> m_definitions;
- HashSet<AtomicString> m_names;
+ HashMap<AtomicString, Id> m_names;
};
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698