Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(269)

Side by Side Diff: Source/bindings/tests/results/V8TestObjectPython.h

Issue 172033002: Remove WrapperTypeTraits (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/bindings/tests/results/V8TestObject.h ('k') | Source/bindings/tests/results/V8TestSVG.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 return static_cast<TestObjectPython*>(object); 81 return static_cast<TestObjectPython*>(object);
82 } 82 }
83 static void installPerContextEnabledProperties(v8::Handle<v8::Object>, TestO bjectPython*, v8::Isolate*); 83 static void installPerContextEnabledProperties(v8::Handle<v8::Object>, TestO bjectPython*, v8::Isolate*);
84 static void installPerContextEnabledMethods(v8::Handle<v8::Object>, v8::Isol ate*); 84 static void installPerContextEnabledMethods(v8::Handle<v8::Object>, v8::Isol ate*);
85 85
86 private: 86 private:
87 friend v8::Handle<v8::Object> wrap(TestObjectPython*, v8::Handle<v8::Object> creationContext, v8::Isolate*); 87 friend v8::Handle<v8::Object> wrap(TestObjectPython*, v8::Handle<v8::Object> creationContext, v8::Isolate*);
88 static v8::Handle<v8::Object> createWrapper(PassRefPtr<TestObjectPython>, v8 ::Handle<v8::Object> creationContext, v8::Isolate*); 88 static v8::Handle<v8::Object> createWrapper(PassRefPtr<TestObjectPython>, v8 ::Handle<v8::Object> creationContext, v8::Isolate*);
89 }; 89 };
90 90
91 template<>
92 class WrapperTypeTraits<TestObjectPython > {
93 public:
94 static const WrapperTypeInfo* wrapperTypeInfo() { return &V8TestObjectPython ::wrapperTypeInfo; }
95 };
96
97 inline v8::Handle<v8::Object> wrap(TestObjectPython* impl, v8::Handle<v8::Object > creationContext, v8::Isolate* isolate) 91 inline v8::Handle<v8::Object> wrap(TestObjectPython* impl, v8::Handle<v8::Object > creationContext, v8::Isolate* isolate)
98 { 92 {
99 ASSERT(impl); 93 ASSERT(impl);
100 ASSERT(!DOMDataStore::containsWrapper<V8TestObjectPython>(impl, isolate)); 94 ASSERT(!DOMDataStore::containsWrapper<V8TestObjectPython>(impl, isolate));
101 return V8TestObjectPython::createWrapper(impl, creationContext, isolate); 95 return V8TestObjectPython::createWrapper(impl, creationContext, isolate);
102 } 96 }
103 97
104 inline v8::Handle<v8::Value> toV8(TestObjectPython* impl, v8::Handle<v8::Object> creationContext, v8::Isolate* isolate) 98 inline v8::Handle<v8::Value> toV8(TestObjectPython* impl, v8::Handle<v8::Object> creationContext, v8::Isolate* isolate)
105 { 99 {
106 if (UNLIKELY(!impl)) 100 if (UNLIKELY(!impl))
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
169 } 163 }
170 164
171 template<class CallbackInfo, class Wrappable> 165 template<class CallbackInfo, class Wrappable>
172 inline void v8SetReturnValueFast(const CallbackInfo& callbackInfo, PassRefPtr<Te stObjectPython> impl, Wrappable* wrappable) 166 inline void v8SetReturnValueFast(const CallbackInfo& callbackInfo, PassRefPtr<Te stObjectPython> impl, Wrappable* wrappable)
173 { 167 {
174 v8SetReturnValueFast(callbackInfo, impl.get(), wrappable); 168 v8SetReturnValueFast(callbackInfo, impl.get(), wrappable);
175 } 169 }
176 170
177 } 171 }
178 #endif // V8TestObjectPython_h 172 #endif // V8TestObjectPython_h
OLDNEW
« no previous file with comments | « Source/bindings/tests/results/V8TestObject.h ('k') | Source/bindings/tests/results/V8TestSVG.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698