| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 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 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 64 static EventListener* toNative(Dart_NativeArguments args, int idx, Dart_Hand
le& exception) | 64 static EventListener* toNative(Dart_NativeArguments args, int idx, Dart_Hand
le& exception) |
| 65 { | 65 { |
| 66 Dart_Handle object = Dart_GetNativeArgument(args, idx); | 66 Dart_Handle object = Dart_GetNativeArgument(args, idx); |
| 67 return toNative(object, exception); | 67 return toNative(object, exception); |
| 68 } | 68 } |
| 69 | 69 |
| 70 private: | 70 private: |
| 71 DartEventListener(); | 71 DartEventListener(); |
| 72 | 72 |
| 73 static DartEventListener* createOrFetch(Dart_Handle listener); | 73 static DartEventListener* createOrFetch(Dart_Handle listener); |
| 74 Dart_Handle callListenerFunction(ScriptExecutionContext*, Dart_Handle dartEv
ent, Event*); | 74 Dart_Handle callListenerFunction(ScriptExecutionContext*, Dart_Handle listen
er, Dart_Handle dartEvent); |
| 75 | 75 |
| 76 static void weakCallback(Dart_WeakPersistentHandle, void* peer); | 76 static void weakCallback(Dart_WeakPersistentHandle, void* peer); |
| 77 | 77 |
| 78 Dart_Isolate m_isolate; | 78 Dart_Isolate m_isolate; |
| 79 Dart_WeakPersistentHandle m_listener; | 79 Dart_WeakPersistentHandle m_listener; |
| 80 // FIXME: investigate why m_worldContext is needed in v8, extensions? | 80 // FIXME: investigate why m_worldContext is needed in v8, extensions? |
| 81 }; | 81 }; |
| 82 | 82 |
| 83 } | 83 } |
| 84 | 84 |
| 85 #endif // DartEventListener_h | 85 #endif // DartEventListener_h |
| OLD | NEW |