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

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

Issue 1985623002: [WIP] Custom element upgrades (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add a C++-only test.' 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 6f864dc9615d1831e7b82113e761f5cd9fdd7a3f..ea1a00d2ffc7494b79031dbf039fde07784daca4 100644
--- a/third_party/WebKit/Source/bindings/core/v8/ScriptCustomElementDefinition.h
+++ b/third_party/WebKit/Source/bindings/core/v8/ScriptCustomElementDefinition.h
@@ -6,16 +6,17 @@
#define ScriptCustomElementDefinition_h
#include "bindings/core/v8/ScopedPersistent.h"
+#include "bindings/core/v8/ScriptState.h"
#include "core/CoreExport.h"
#include "core/dom/custom/CustomElementDefinition.h"
#include "v8.h"
#include "wtf/Noncopyable.h"
+#include "wtf/RefPtr.h"
namespace blink {
class CustomElementDescriptor;
class CustomElementsRegistry;
-class ScriptState;
class CORE_EXPORT ScriptCustomElementDefinition final :
public CustomElementDefinition {
@@ -33,6 +34,12 @@ public:
const v8::Local<v8::Object>& constructor,
const v8::Local<v8::Object>& prototype);
+ virtual ~ScriptCustomElementDefinition() = default;
+
+ // TODO(dominicc): Move this to a command object suitable for a
+ // reaction queue.
+ bool upgrade(Element*) override;
+
v8::Local<v8::Object> constructor(ScriptState*) const;
v8::Local<v8::Object> prototype(ScriptState*) const;
@@ -43,6 +50,7 @@ private:
const v8::Local<v8::Object>& constructor,
const v8::Local<v8::Object>& prototype);
+ RefPtr<ScriptState> m_scriptState;
ScopedPersistent<v8::Object> m_constructor;
ScopedPersistent<v8::Object> m_prototype;
};

Powered by Google App Engine
This is Rietveld 408576698