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 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
58 virtual v8::Local<v8::Object> getListenerObject() | 58 virtual v8::Local<v8::Object> getListenerObject() |
59 { | 59 { |
60 return v8::Local<v8::Object>::New(m_listener); | 60 return v8::Local<v8::Object>::New(m_listener); |
61 } | 61 } |
62 | 62 |
63 // Dispose listener object and clear the handle. | 63 // Dispose listener object and clear the handle. |
64 void disposeListenerObject(); | 64 void disposeListenerObject(); |
65 | 65 |
66 virtual bool disconnected() const { return !m_frame; } | 66 virtual bool disconnected() const { return !m_frame; } |
67 | 67 |
| 68 virtual bool isObjectListener() const { return false; } |
| 69 |
68 protected: | 70 protected: |
69 v8::Persistent<v8::Object> m_listener; | 71 v8::Persistent<v8::Object> m_listener; |
70 | 72 |
71 // Indicates if this is an HTML type listener. | 73 // Indicates if this is an HTML type listener. |
72 bool m_isAttribute; | 74 bool m_isAttribute; |
73 | 75 |
74 private: | 76 private: |
75 V8AbstractEventListener(Frame*, bool isInline); | 77 V8AbstractEventListener(Frame*, bool isInline); |
76 | 78 |
77 virtual v8::Local<v8::Value> callListenerFunction(v8::Handle<v8::Value>
jsevent, Event*, bool isWindowEvent) = 0; | 79 virtual v8::Local<v8::Value> callListenerFunction(v8::Handle<v8::Value>
jsevent, Event*, bool isWindowEvent) = 0; |
(...skipping 11 matching lines...) Expand all Loading... |
89 int m_columnNumber; | 91 int m_columnNumber; |
90 | 92 |
91 friend class V8EventListener; | 93 friend class V8EventListener; |
92 friend class V8ObjectEventListener; | 94 friend class V8ObjectEventListener; |
93 friend class V8LazyEventListener; | 95 friend class V8LazyEventListener; |
94 }; | 96 }; |
95 | 97 |
96 } // namespace WebCore | 98 } // namespace WebCore |
97 | 99 |
98 #endif // V8AbstractEventListener_h | 100 #endif // V8AbstractEventListener_h |
OLD | NEW |