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

Unified Diff: Source/core/dom/custom/CustomElementCallbackInvocation.cpp

Issue 117313008: Update Custom Elements API to new names. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Update for forgotten tests. Created 7 years 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
« no previous file with comments | « Source/core/dom/custom/CustomElement.cpp ('k') | Source/core/dom/custom/CustomElementCallbackScheduler.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/custom/CustomElementCallbackInvocation.cpp
diff --git a/Source/core/dom/custom/CustomElementCallbackInvocation.cpp b/Source/core/dom/custom/CustomElementCallbackInvocation.cpp
index 7263ffc011bc45aba57cca4ed98b6e0528c12a70..e4fb331b654ef6d2e5c65b7518ed08c079607cca 100644
--- a/Source/core/dom/custom/CustomElementCallbackInvocation.cpp
+++ b/Source/core/dom/custom/CustomElementCallbackInvocation.cpp
@@ -51,13 +51,13 @@ private:
void CreatedInvocation::dispatch(Element* element)
{
if (element->inDocument() && element->document().domWindow())
- CustomElementCallbackScheduler::scheduleEnteredViewCallback(callbacks(), element);
+ CustomElementCallbackScheduler::scheduleAttachedCallback(callbacks(), element);
callbacks()->created(element);
}
-class EnteredLeftViewInvocation : public CustomElementCallbackInvocation {
+class AttachedDetachedInvocation : public CustomElementCallbackInvocation {
public:
- EnteredLeftViewInvocation(PassRefPtr<CustomElementLifecycleCallbacks>, CustomElementLifecycleCallbacks::CallbackType which);
+ AttachedDetachedInvocation(PassRefPtr<CustomElementLifecycleCallbacks>, CustomElementLifecycleCallbacks::CallbackType which);
private:
virtual void dispatch(Element*) OVERRIDE;
@@ -65,21 +65,21 @@ private:
CustomElementLifecycleCallbacks::CallbackType m_which;
};
-EnteredLeftViewInvocation::EnteredLeftViewInvocation(PassRefPtr<CustomElementLifecycleCallbacks> callbacks, CustomElementLifecycleCallbacks::CallbackType which)
+AttachedDetachedInvocation::AttachedDetachedInvocation(PassRefPtr<CustomElementLifecycleCallbacks> callbacks, CustomElementLifecycleCallbacks::CallbackType which)
: CustomElementCallbackInvocation(callbacks)
, m_which(which)
{
- ASSERT(m_which == CustomElementLifecycleCallbacks::EnteredView || m_which == CustomElementLifecycleCallbacks::LeftView);
+ ASSERT(m_which == CustomElementLifecycleCallbacks::Attached || m_which == CustomElementLifecycleCallbacks::Detached);
}
-void EnteredLeftViewInvocation::dispatch(Element* element)
+void AttachedDetachedInvocation::dispatch(Element* element)
{
switch (m_which) {
- case CustomElementLifecycleCallbacks::EnteredView:
- callbacks()->enteredView(element);
+ case CustomElementLifecycleCallbacks::Attached:
+ callbacks()->attached(element);
break;
- case CustomElementLifecycleCallbacks::LeftView:
- callbacks()->leftView(element);
+ case CustomElementLifecycleCallbacks::Detached:
+ callbacks()->detached(element);
break;
default:
ASSERT_NOT_REACHED();
@@ -117,9 +117,9 @@ PassOwnPtr<CustomElementCallbackInvocation> CustomElementCallbackInvocation::cre
case CustomElementLifecycleCallbacks::Created:
return adoptPtr(new CreatedInvocation(callbacks));
- case CustomElementLifecycleCallbacks::EnteredView:
- case CustomElementLifecycleCallbacks::LeftView:
- return adoptPtr(new EnteredLeftViewInvocation(callbacks, which));
+ case CustomElementLifecycleCallbacks::Attached:
+ case CustomElementLifecycleCallbacks::Detached:
+ return adoptPtr(new AttachedDetachedInvocation(callbacks, which));
default:
ASSERT_NOT_REACHED();
« no previous file with comments | « Source/core/dom/custom/CustomElement.cpp ('k') | Source/core/dom/custom/CustomElementCallbackScheduler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698