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