OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2006, 2007, 2008, 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2006, 2007, 2008, 2009 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 23 matching lines...) Expand all Loading... |
34 #include "bindings/core/v8/V8AbstractEventListener.h" | 34 #include "bindings/core/v8/V8AbstractEventListener.h" |
35 #include "wtf/PassRefPtr.h" | 35 #include "wtf/PassRefPtr.h" |
36 #include "wtf/text/TextPosition.h" | 36 #include "wtf/text/TextPosition.h" |
37 #include <v8.h> | 37 #include <v8.h> |
38 | 38 |
39 namespace blink { | 39 namespace blink { |
40 | 40 |
41 class Event; | 41 class Event; |
42 class Node; | 42 class Node; |
43 | 43 |
44 // V8LazyEventListener is a wrapper for a JavaScript code string that is compile
d and evaluated when an event is fired. | 44 // V8LazyEventListener is a wrapper for a JavaScript code string that is |
45 // A V8LazyEventListener is either a HTML or SVG event handler. | 45 // compiled and evaluated when an event is fired. A V8LazyEventListener is |
| 46 // either a HTML or SVG event handler. |
46 class V8LazyEventListener final : public V8AbstractEventListener { | 47 class V8LazyEventListener final : public V8AbstractEventListener { |
47 public: | 48 public: |
48 static V8LazyEventListener* create(const AtomicString& functionName, | 49 static V8LazyEventListener* create(const AtomicString& functionName, |
49 const AtomicString& eventParameterName, | 50 const AtomicString& eventParameterName, |
50 const String& code, | 51 const String& code, |
51 const String& sourceURL, | 52 const String& sourceURL, |
52 const TextPosition& position, | 53 const TextPosition& position, |
53 Node* node, | 54 Node* node, |
54 v8::Isolate* isolate) { | 55 v8::Isolate* isolate) { |
55 return new V8LazyEventListener(isolate, functionName, eventParameterName, | 56 return new V8LazyEventListener(isolate, functionName, eventParameterName, |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
90 AtomicString m_eventParameterName; | 91 AtomicString m_eventParameterName; |
91 String m_code; | 92 String m_code; |
92 String m_sourceURL; | 93 String m_sourceURL; |
93 Member<Node> m_node; | 94 Member<Node> m_node; |
94 TextPosition m_position; | 95 TextPosition m_position; |
95 }; | 96 }; |
96 | 97 |
97 } // namespace blink | 98 } // namespace blink |
98 | 99 |
99 #endif // V8LazyEventListener_h | 100 #endif // V8LazyEventListener_h |
OLD | NEW |