OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * | 7 * |
8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
95 | 95 |
96 class CreatedInvocation : public CustomElementCallbackInvocation { | 96 class CreatedInvocation : public CustomElementCallbackInvocation { |
97 public: | 97 public: |
98 CreatedInvocation(PassRefPtr<CustomElementLifecycleCallbacks> callbacks) | 98 CreatedInvocation(PassRefPtr<CustomElementLifecycleCallbacks> callbacks) |
99 : CustomElementCallbackInvocation(callbacks) | 99 : CustomElementCallbackInvocation(callbacks) |
100 { | 100 { |
101 } | 101 } |
102 | 102 |
103 private: | 103 private: |
104 virtual void dispatch(Element*) OVERRIDE; | 104 virtual void dispatch(Element*) OVERRIDE; |
105 virtual bool isCreated() const OVERRIDE { return true; } | 105 virtual bool isCreatedCallback() const OVERRIDE { return true; } |
106 }; | 106 }; |
107 | 107 |
108 void CreatedInvocation::dispatch(Element* element) | 108 void CreatedInvocation::dispatch(Element* element) |
109 { | 109 { |
110 if (element->inDocument() && element->document().domWindow()) | 110 if (element->inDocument() && element->document().domWindow()) |
111 CustomElementScheduler::scheduleCallback(callbacks(), element, CustomEle
mentLifecycleCallbacks::AttachedCallback); | 111 CustomElementScheduler::scheduleCallback(callbacks(), element, CustomEle
mentLifecycleCallbacks::AttachedCallback); |
112 callbacks()->created(element); | 112 callbacks()->created(element); |
113 } | 113 } |
114 | 114 |
115 PassOwnPtr<CustomElementCallbackInvocation> CustomElementCallbackInvocation::cre
ateInvocation(PassRefPtr<CustomElementLifecycleCallbacks> callbacks, CustomEleme
ntLifecycleCallbacks::CallbackType which) | 115 PassOwnPtr<CustomElementCallbackInvocation> CustomElementCallbackInvocation::cre
ateInvocation(PassRefPtr<CustomElementLifecycleCallbacks> callbacks, CustomEleme
ntLifecycleCallbacks::CallbackType which) |
(...skipping 10 matching lines...) Expand all Loading... |
126 return PassOwnPtr<CustomElementCallbackInvocation>(); | 126 return PassOwnPtr<CustomElementCallbackInvocation>(); |
127 } | 127 } |
128 } | 128 } |
129 | 129 |
130 PassOwnPtr<CustomElementCallbackInvocation> CustomElementCallbackInvocation::cre
ateAttributeChangedInvocation(PassRefPtr<CustomElementLifecycleCallbacks> callba
cks, const AtomicString& name, const AtomicString& oldValue, const AtomicString&
newValue) | 130 PassOwnPtr<CustomElementCallbackInvocation> CustomElementCallbackInvocation::cre
ateAttributeChangedInvocation(PassRefPtr<CustomElementLifecycleCallbacks> callba
cks, const AtomicString& name, const AtomicString& oldValue, const AtomicString&
newValue) |
131 { | 131 { |
132 return adoptPtr(new AttributeChangedInvocation(callbacks, name, oldValue, ne
wValue)); | 132 return adoptPtr(new AttributeChangedInvocation(callbacks, name, oldValue, ne
wValue)); |
133 } | 133 } |
134 | 134 |
135 } // namespace blink | 135 } // namespace blink |
OLD | NEW |