OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef V8_EVENTS_H__ | 5 #ifndef V8_EVENTS_H__ |
6 #define V8_EVENTS_H__ | 6 #define V8_EVENTS_H__ |
7 | 7 |
8 #include "config.h" | 8 #include "config.h" |
9 #include <v8.h> | 9 #include <v8.h> |
10 #include "Frame.h" | 10 #include "Frame.h" |
(...skipping 24 matching lines...) Expand all Loading... |
35 virtual ~V8AbstractEventListener() { } | 35 virtual ~V8AbstractEventListener() { } |
36 | 36 |
37 // Returns the owner frame of the listener. | 37 // Returns the owner frame of the listener. |
38 Frame* frame() { return m_frame; } | 38 Frame* frame() { return m_frame; } |
39 | 39 |
40 // Handle event. | 40 // Handle event. |
41 virtual void handleEvent(Event*, bool isWindowEvent); | 41 virtual void handleEvent(Event*, bool isWindowEvent); |
42 | 42 |
43 void HandleEventHelper(v8::Handle<v8::Context> context, | 43 void HandleEventHelper(v8::Handle<v8::Context> context, |
44 Event* event, | 44 Event* event, |
| 45 v8::Handle<v8::Value> jsevent, |
45 bool isWindowEvent); | 46 bool isWindowEvent); |
46 | 47 |
47 // Returns the listener object, either a function or an object. | 48 // Returns the listener object, either a function or an object. |
48 virtual v8::Local<v8::Object> GetListenerObject() { | 49 virtual v8::Local<v8::Object> GetListenerObject() { |
49 return v8::Local<v8::Object>::New(m_listener); | 50 return v8::Local<v8::Object>::New(m_listener); |
50 } | 51 } |
51 | 52 |
52 // Dispose listener object and clear the handle | 53 // Dispose listener object and clear the handle |
53 void DisposeListenerObject(); | 54 void DisposeListenerObject(); |
54 | 55 |
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
198 v8::Local<v8::Object> GetReceiverObject(Event* event, | 199 v8::Local<v8::Object> GetReceiverObject(Event* event, |
199 bool isWindowEvent); | 200 bool isWindowEvent); |
200 WorkerContextExecutionProxy* m_proxy; | 201 WorkerContextExecutionProxy* m_proxy; |
201 }; | 202 }; |
202 #endif // WORKERS | 203 #endif // WORKERS |
203 | 204 |
204 } // namespace WebCore | 205 } // namespace WebCore |
205 | 206 |
206 #endif // V8_EVENTS_H__ | 207 #endif // V8_EVENTS_H__ |
207 | 208 |
OLD | NEW |