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

Unified Diff: third_party/WebKit/Source/core/dom/custom/V0CustomElementCallbackInvocation.cpp

Issue 1914923002: Rename all existing custom element classes as V0 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: CustomElementV0 -> V0CustomElement Created 4 years, 8 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/V0CustomElementCallbackInvocation.cpp
diff --git a/third_party/WebKit/Source/core/dom/custom/CustomElementCallbackInvocation.cpp b/third_party/WebKit/Source/core/dom/custom/V0CustomElementCallbackInvocation.cpp
similarity index 55%
rename from third_party/WebKit/Source/core/dom/custom/CustomElementCallbackInvocation.cpp
rename to third_party/WebKit/Source/core/dom/custom/V0CustomElementCallbackInvocation.cpp
index 020ed83a2c9dd019e10f654987bf08af3be08c48..e494d750d4d874cde148f766e7703e70203436d5 100644
--- a/third_party/WebKit/Source/core/dom/custom/CustomElementCallbackInvocation.cpp
+++ b/third_party/WebKit/Source/core/dom/custom/V0CustomElementCallbackInvocation.cpp
@@ -28,38 +28,38 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#include "core/dom/custom/CustomElementCallbackInvocation.h"
+#include "core/dom/custom/V0CustomElementCallbackInvocation.h"
#include "core/dom/Document.h"
#include "core/dom/Element.h"
-#include "core/dom/custom/CustomElementScheduler.h"
+#include "core/dom/custom/V0CustomElementScheduler.h"
namespace blink {
-class AttachedDetachedInvocation final : public CustomElementCallbackInvocation {
+class AttachedDetachedInvocation final : public V0CustomElementCallbackInvocation {
public:
- AttachedDetachedInvocation(CustomElementLifecycleCallbacks*, CustomElementLifecycleCallbacks::CallbackType which);
+ AttachedDetachedInvocation(V0CustomElementLifecycleCallbacks*, V0CustomElementLifecycleCallbacks::CallbackType which);
private:
void dispatch(Element*) override;
- CustomElementLifecycleCallbacks::CallbackType m_which;
+ V0CustomElementLifecycleCallbacks::CallbackType m_which;
};
-AttachedDetachedInvocation::AttachedDetachedInvocation(CustomElementLifecycleCallbacks* callbacks, CustomElementLifecycleCallbacks::CallbackType which)
- : CustomElementCallbackInvocation(callbacks)
+AttachedDetachedInvocation::AttachedDetachedInvocation(V0CustomElementLifecycleCallbacks* callbacks, V0CustomElementLifecycleCallbacks::CallbackType which)
+ : V0CustomElementCallbackInvocation(callbacks)
, m_which(which)
{
- DCHECK(m_which == CustomElementLifecycleCallbacks::AttachedCallback || m_which == CustomElementLifecycleCallbacks::DetachedCallback);
+ DCHECK(m_which == V0CustomElementLifecycleCallbacks::AttachedCallback || m_which == V0CustomElementLifecycleCallbacks::DetachedCallback);
}
void AttachedDetachedInvocation::dispatch(Element* element)
{
switch (m_which) {
- case CustomElementLifecycleCallbacks::AttachedCallback:
+ case V0CustomElementLifecycleCallbacks::AttachedCallback:
callbacks()->attached(element);
break;
- case CustomElementLifecycleCallbacks::DetachedCallback:
+ case V0CustomElementLifecycleCallbacks::DetachedCallback:
callbacks()->detached(element);
break;
default:
@@ -67,9 +67,9 @@ void AttachedDetachedInvocation::dispatch(Element* element)
}
}
-class AttributeChangedInvocation final : public CustomElementCallbackInvocation {
+class AttributeChangedInvocation final : public V0CustomElementCallbackInvocation {
public:
- AttributeChangedInvocation(CustomElementLifecycleCallbacks*, const AtomicString& name, const AtomicString& oldValue, const AtomicString& newValue);
+ AttributeChangedInvocation(V0CustomElementLifecycleCallbacks*, const AtomicString& name, const AtomicString& oldValue, const AtomicString& newValue);
private:
void dispatch(Element*) override;
@@ -79,8 +79,8 @@ private:
AtomicString m_newValue;
};
-AttributeChangedInvocation::AttributeChangedInvocation(CustomElementLifecycleCallbacks* callbacks, const AtomicString& name, const AtomicString& oldValue, const AtomicString& newValue)
- : CustomElementCallbackInvocation(callbacks)
+AttributeChangedInvocation::AttributeChangedInvocation(V0CustomElementLifecycleCallbacks* callbacks, const AtomicString& name, const AtomicString& oldValue, const AtomicString& newValue)
+ : V0CustomElementCallbackInvocation(callbacks)
, m_name(name)
, m_oldValue(oldValue)
, m_newValue(newValue)
@@ -92,10 +92,10 @@ void AttributeChangedInvocation::dispatch(Element* element)
callbacks()->attributeChanged(element, m_name, m_oldValue, m_newValue);
}
-class CreatedInvocation final : public CustomElementCallbackInvocation {
+class CreatedInvocation final : public V0CustomElementCallbackInvocation {
public:
- explicit CreatedInvocation(CustomElementLifecycleCallbacks* callbacks)
- : CustomElementCallbackInvocation(callbacks)
+ explicit CreatedInvocation(V0CustomElementLifecycleCallbacks* callbacks)
+ : V0CustomElementCallbackInvocation(callbacks)
{
}
@@ -107,18 +107,18 @@ private:
void CreatedInvocation::dispatch(Element* element)
{
if (element->inShadowIncludingDocument() && element->document().domWindow())
- CustomElementScheduler::scheduleCallback(callbacks(), element, CustomElementLifecycleCallbacks::AttachedCallback);
+ V0CustomElementScheduler::scheduleCallback(callbacks(), element, V0CustomElementLifecycleCallbacks::AttachedCallback);
callbacks()->created(element);
}
-CustomElementCallbackInvocation* CustomElementCallbackInvocation::createInvocation(CustomElementLifecycleCallbacks* callbacks, CustomElementLifecycleCallbacks::CallbackType which)
+V0CustomElementCallbackInvocation* V0CustomElementCallbackInvocation::createInvocation(V0CustomElementLifecycleCallbacks* callbacks, V0CustomElementLifecycleCallbacks::CallbackType which)
{
switch (which) {
- case CustomElementLifecycleCallbacks::CreatedCallback:
+ case V0CustomElementLifecycleCallbacks::CreatedCallback:
return new CreatedInvocation(callbacks);
- case CustomElementLifecycleCallbacks::AttachedCallback:
- case CustomElementLifecycleCallbacks::DetachedCallback:
+ case V0CustomElementLifecycleCallbacks::AttachedCallback:
+ case V0CustomElementLifecycleCallbacks::DetachedCallback:
return new AttachedDetachedInvocation(callbacks, which);
default:
ASSERT_NOT_REACHED();
@@ -126,15 +126,15 @@ CustomElementCallbackInvocation* CustomElementCallbackInvocation::createInvocati
}
}
-CustomElementCallbackInvocation* CustomElementCallbackInvocation::createAttributeChangedInvocation(CustomElementLifecycleCallbacks* callbacks, const AtomicString& name, const AtomicString& oldValue, const AtomicString& newValue)
+V0CustomElementCallbackInvocation* V0CustomElementCallbackInvocation::createAttributeChangedInvocation(V0CustomElementLifecycleCallbacks* callbacks, const AtomicString& name, const AtomicString& oldValue, const AtomicString& newValue)
{
return new AttributeChangedInvocation(callbacks, name, oldValue, newValue);
}
-DEFINE_TRACE(CustomElementCallbackInvocation)
+DEFINE_TRACE(V0CustomElementCallbackInvocation)
{
visitor->trace(m_callbacks);
- CustomElementProcessingStep::trace(visitor);
+ V0CustomElementProcessingStep::trace(visitor);
}
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698