| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 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 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 66 static inline TestInterfacePythonImplementation* fromInternalPointer(void* o
bject) | 66 static inline TestInterfacePythonImplementation* fromInternalPointer(void* o
bject) |
| 67 { | 67 { |
| 68 return static_cast<TestInterfacePythonImplementation*>(V8TestInterfaceEm
pty::fromInternalPointer(object)); | 68 return static_cast<TestInterfacePythonImplementation*>(V8TestInterfaceEm
pty::fromInternalPointer(object)); |
| 69 } | 69 } |
| 70 static void installPerContextEnabledProperties(v8::Handle<v8::Object>, TestI
nterfacePythonImplementation*, v8::Isolate*); | 70 static void installPerContextEnabledProperties(v8::Handle<v8::Object>, TestI
nterfacePythonImplementation*, v8::Isolate*); |
| 71 static void installPerContextEnabledMethods(v8::Handle<v8::Object>, v8::Isol
ate*) { } | 71 static void installPerContextEnabledMethods(v8::Handle<v8::Object>, v8::Isol
ate*) { } |
| 72 | 72 |
| 73 private: | 73 private: |
| 74 }; | 74 }; |
| 75 | 75 |
| 76 template<> | |
| 77 class WrapperTypeTraits<TestInterfacePythonImplementation > { | |
| 78 public: | |
| 79 static const WrapperTypeInfo* wrapperTypeInfo() { return &V8TestInterfacePyt
hon::wrapperTypeInfo; } | |
| 80 }; | |
| 81 | |
| 82 class TestInterfacePythonImplementation; | 76 class TestInterfacePythonImplementation; |
| 83 v8::Handle<v8::Value> toV8(TestInterfacePythonImplementation*, v8::Handle<v8::Ob
ject> creationContext, v8::Isolate*); | 77 v8::Handle<v8::Value> toV8(TestInterfacePythonImplementation*, v8::Handle<v8::Ob
ject> creationContext, v8::Isolate*); |
| 84 | 78 |
| 85 template<class CallbackInfo> | 79 template<class CallbackInfo> |
| 86 inline void v8SetReturnValue(const CallbackInfo& callbackInfo, TestInterfacePyth
onImplementation* impl) | 80 inline void v8SetReturnValue(const CallbackInfo& callbackInfo, TestInterfacePyth
onImplementation* impl) |
| 87 { | 81 { |
| 88 v8SetReturnValue(callbackInfo, toV8(impl, callbackInfo.Holder(), callbackInf
o.GetIsolate())); | 82 v8SetReturnValue(callbackInfo, toV8(impl, callbackInfo.Holder(), callbackInf
o.GetIsolate())); |
| 89 } | 83 } |
| 90 | 84 |
| 91 template<class CallbackInfo> | 85 template<class CallbackInfo> |
| (...skipping 27 matching lines...) Expand all Loading... |
| 119 | 113 |
| 120 template<class CallbackInfo, class Wrappable> | 114 template<class CallbackInfo, class Wrappable> |
| 121 inline void v8SetReturnValueFast(const CallbackInfo& callbackInfo, PassRefPtr<Te
stInterfacePythonImplementation> impl, Wrappable* wrappable) | 115 inline void v8SetReturnValueFast(const CallbackInfo& callbackInfo, PassRefPtr<Te
stInterfacePythonImplementation> impl, Wrappable* wrappable) |
| 122 { | 116 { |
| 123 v8SetReturnValueFast(callbackInfo, impl.get(), wrappable); | 117 v8SetReturnValueFast(callbackInfo, impl.get(), wrappable); |
| 124 } | 118 } |
| 125 | 119 |
| 126 } | 120 } |
| 127 #endif // ENABLE(CONDITION) | 121 #endif // ENABLE(CONDITION) |
| 128 #endif // V8TestInterfacePython_h | 122 #endif // V8TestInterfacePython_h |
| OLD | NEW |