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

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

Issue 2024073002: Add callbacks to ScriptCustomElementDefinition (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix when no callbacks, cleanup, and reset-result 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/ScriptCustomElementDefinition.h
diff --git a/third_party/WebKit/Source/bindings/core/v8/ScriptCustomElementDefinition.h b/third_party/WebKit/Source/bindings/core/v8/ScriptCustomElementDefinition.h
index 96f76ddb79f1c827f9ad3a1c40ead2f8e21aaffc..60ca239e673cf7aded3776e5b29622427a7591c9 100644
--- a/third_party/WebKit/Source/bindings/core/v8/ScriptCustomElementDefinition.h
+++ b/third_party/WebKit/Source/bindings/core/v8/ScriptCustomElementDefinition.h
@@ -9,7 +9,10 @@
#include "core/CoreExport.h"
#include "core/dom/custom/CustomElementDefinition.h"
#include "v8.h"
+#include "wtf/HashSet.h"
#include "wtf/Noncopyable.h"
+#include "wtf/text/AtomicString.h"
+#include "wtf/text/AtomicStringHash.h"
namespace blink {
@@ -31,7 +34,11 @@ public:
CustomElementsRegistry*,
const CustomElementDescriptor&,
const v8::Local<v8::Object>& constructor,
yosin_UTC9 2016/06/01 06:33:33 Can we have struct ScriptCustomElementDefinitionIn
kojii 2016/06/01 07:19:27 I think it's too much complex, when we have Script
kojii 2016/06/01 13:49:10 I made ScriptCustomElementDefinitionBuilder friend
- const v8::Local<v8::Object>& prototype);
+ const v8::Local<v8::Object>& prototype,
+ const v8::Local<v8::Object>& connectedCallback,
+ const v8::Local<v8::Object>& disconnectedCallback,
+ const v8::Local<v8::Object>& attributeChangedCallback,
+ const Vector<AtomicString>& observedAttributes);
virtual ~ScriptCustomElementDefinition() = default;
@@ -43,10 +50,18 @@ private:
ScriptState*,
const CustomElementDescriptor&,
const v8::Local<v8::Object>& constructor,
- const v8::Local<v8::Object>& prototype);
+ const v8::Local<v8::Object>& prototype,
+ const v8::Local<v8::Object>& connectedCallback,
yosin_UTC9 2016/06/01 06:33:33 FYI, since v8::Local<T> is just T*, pass by value
kojii 2016/06/01 07:19:27 I can do that, but Set and many v8 functions recei
+ const v8::Local<v8::Object>& disconnectedCallback,
+ const v8::Local<v8::Object>& attributeChangedCallback,
+ const Vector<AtomicString>& observedAttributes);
ScopedPersistent<v8::Object> m_constructor;
ScopedPersistent<v8::Object> m_prototype;
+ ScopedPersistent<v8::Object> m_connectedCallback;
+ ScopedPersistent<v8::Object> m_disconnectedCallback;
+ ScopedPersistent<v8::Object> m_attributeChangedCallback;
+ HashSet<AtomicString> m_observedAttributes;
};
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698