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 are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * 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 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
76 if (!detached.IsEmpty()) | 76 if (!detached.IsEmpty()) |
77 flags |= CustomElementLifecycleCallbacks::DetachedCallback; | 77 flags |= CustomElementLifecycleCallbacks::DetachedCallback; |
78 | 78 |
79 if (!attributeChanged.IsEmpty()) | 79 if (!attributeChanged.IsEmpty()) |
80 flags |= CustomElementLifecycleCallbacks::AttributeChangedCallback; | 80 flags |= CustomElementLifecycleCallbacks::AttributeChangedCallback; |
81 | 81 |
82 return CustomElementLifecycleCallbacks::CallbackType(flags); | 82 return CustomElementLifecycleCallbacks::CallbackType(flags); |
83 } | 83 } |
84 | 84 |
85 template <typename T> | 85 template <typename T> |
86 static void weakCallback(const v8::WeakCallbackData<T, ScopedPersistent<T> >& da
ta) | 86 static void weakCallback(const v8::WeakCallbackData<T, ScopedPersistent<T>>& dat
a) |
87 { | 87 { |
88 data.GetParameter()->clear(); | 88 data.GetParameter()->clear(); |
89 } | 89 } |
90 | 90 |
91 V8CustomElementLifecycleCallbacks::V8CustomElementLifecycleCallbacks(ScriptState
* scriptState, v8::Handle<v8::Object> prototype, v8::Handle<v8::Function> create
d, v8::Handle<v8::Function> attached, v8::Handle<v8::Function> detached, v8::Han
dle<v8::Function> attributeChanged) | 91 V8CustomElementLifecycleCallbacks::V8CustomElementLifecycleCallbacks(ScriptState
* scriptState, v8::Handle<v8::Object> prototype, v8::Handle<v8::Function> create
d, v8::Handle<v8::Function> attached, v8::Handle<v8::Function> detached, v8::Han
dle<v8::Function> attributeChanged) |
92 : CustomElementLifecycleCallbacks(flagSet(attached, detached, attributeChang
ed)) | 92 : CustomElementLifecycleCallbacks(flagSet(attached, detached, attributeChang
ed)) |
93 , ContextLifecycleObserver(scriptState->executionContext()) | 93 , ContextLifecycleObserver(scriptState->executionContext()) |
94 , m_scriptState(scriptState) | 94 , m_scriptState(scriptState) |
95 , m_prototype(scriptState->isolate(), prototype) | 95 , m_prototype(scriptState->isolate(), prototype) |
96 , m_created(scriptState->isolate(), created) | 96 , m_created(scriptState->isolate(), created) |
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
238 ScriptController::callFunction(executionContext(), callback, receiver, 0, 0,
isolate); | 238 ScriptController::callFunction(executionContext(), callback, receiver, 0, 0,
isolate); |
239 } | 239 } |
240 | 240 |
241 void V8CustomElementLifecycleCallbacks::trace(Visitor* visitor) | 241 void V8CustomElementLifecycleCallbacks::trace(Visitor* visitor) |
242 { | 242 { |
243 CustomElementLifecycleCallbacks::trace(visitor); | 243 CustomElementLifecycleCallbacks::trace(visitor); |
244 ContextLifecycleObserver::trace(visitor); | 244 ContextLifecycleObserver::trace(visitor); |
245 } | 245 } |
246 | 246 |
247 } // namespace blink | 247 } // namespace blink |
OLD | NEW |