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

Side by Side Diff: Source/bindings/v8/V8CustomElementCallback.h

Issue 17707002: Implement Custom Elements inserted and removed callbacks. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 6 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 26 matching lines...) Expand all
37 #include "core/dom/CustomElementCallback.h" 37 #include "core/dom/CustomElementCallback.h"
38 #include <v8.h> 38 #include <v8.h>
39 39
40 namespace WebCore { 40 namespace WebCore {
41 41
42 class Element; 42 class Element;
43 class ScriptExecutionContext; 43 class ScriptExecutionContext;
44 44
45 class V8CustomElementCallback : public CustomElementCallback, ActiveDOMCallback { 45 class V8CustomElementCallback : public CustomElementCallback, ActiveDOMCallback {
46 public: 46 public:
47 static PassRefPtr<V8CustomElementCallback> create(ScriptExecutionContext*, v 8::Handle<v8::Object> owner, v8::Handle<v8::Function> ready); 47 static PassRefPtr<V8CustomElementCallback> create(ScriptExecutionContext*, v 8::Handle<v8::Object> owner, v8::Handle<v8::Function> ready, v8::Handle<v8::Func tion> inserted, v8::Handle<v8::Function> removed);
48 48
49 virtual ~V8CustomElementCallback() { } 49 virtual ~V8CustomElementCallback() { }
50 50
51 private: 51 private:
52 V8CustomElementCallback(ScriptExecutionContext*, v8::Handle<v8::Function> re ady); 52 V8CustomElementCallback(ScriptExecutionContext*, v8::Handle<v8::Function> re ady, v8::Handle<v8::Function> inserted, v8::Handle<v8::Function> removed);
53 53
54 virtual void ready(Element*) OVERRIDE; 54 virtual void ready(Element*) OVERRIDE;
55 virtual void inserted(Element*) OVERRIDE;
56 virtual void removed(Element*) OVERRIDE;
57 void invoke(const ScopedPersistent<v8::Function>& callback, Element*);
55 58
56 RefPtr<DOMWrapperWorld> m_world; 59 RefPtr<DOMWrapperWorld> m_world;
57 ScopedPersistent<v8::Function> m_ready; 60 ScopedPersistent<v8::Function> m_ready;
61 ScopedPersistent<v8::Function> m_inserted;
62 ScopedPersistent<v8::Function> m_removed;
58 }; 63 };
59 64
60 } 65 }
61 66
62 #endif // CustomElementCallback_h 67 #endif // CustomElementCallback_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698