| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2009 Google Inc. All rights reserved. |
| 3 * Copyright (C) 2012 Ericsson AB. All rights reserved. | 3 * Copyright (C) 2012 Ericsson AB. All rights reserved. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions are | 6 * modification, are permitted provided that the following conditions are |
| 7 * met: | 7 * met: |
| 8 * | 8 * |
| 9 * * Redistributions of source code must retain the above copyright | 9 * * Redistributions of source code must retain the above copyright |
| 10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 56 class EventListener; | 56 class EventListener; |
| 57 class EventTarget; | 57 class EventTarget; |
| 58 class ExceptionState; | 58 class ExceptionState; |
| 59 class ExecutionContext; | 59 class ExecutionContext; |
| 60 class FlexibleArrayBufferView; | 60 class FlexibleArrayBufferView; |
| 61 class Frame; | 61 class Frame; |
| 62 class LocalDOMWindow; | 62 class LocalDOMWindow; |
| 63 class LocalFrame; | 63 class LocalFrame; |
| 64 class NodeFilter; | 64 class NodeFilter; |
| 65 class WorkerGlobalScope; | 65 class WorkerGlobalScope; |
| 66 class WorkletGlobalScope; |
| 66 class XPathNSResolver; | 67 class XPathNSResolver; |
| 67 | 68 |
| 68 template <typename T> | 69 template <typename T> |
| 69 struct V8TypeOf { | 70 struct V8TypeOf { |
| 70 STATIC_ONLY(V8TypeOf); | 71 STATIC_ONLY(V8TypeOf); |
| 71 // |Type| provides C++ -> V8 type conversion for DOM wrappers. | 72 // |Type| provides C++ -> V8 type conversion for DOM wrappers. |
| 72 // The Blink binding code generator will generate specialized version of | 73 // The Blink binding code generator will generate specialized version of |
| 73 // V8TypeOf for each wrapper class. | 74 // V8TypeOf for each wrapper class. |
| 74 typedef void Type; | 75 typedef void Type; |
| 75 }; | 76 }; |
| (...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 238 { | 239 { |
| 239 v8SetReturnValue(callbackInfo, toV8(impl, callbackInfo.Holder(), callbackInf
o.GetIsolate())); | 240 v8SetReturnValue(callbackInfo, toV8(impl, callbackInfo.Holder(), callbackInf
o.GetIsolate())); |
| 240 } | 241 } |
| 241 | 242 |
| 242 template<typename CallbackInfo> | 243 template<typename CallbackInfo> |
| 243 inline void v8SetReturnValue(const CallbackInfo& callbackInfo, WorkerGlobalScope
* impl) | 244 inline void v8SetReturnValue(const CallbackInfo& callbackInfo, WorkerGlobalScope
* impl) |
| 244 { | 245 { |
| 245 v8SetReturnValue(callbackInfo, toV8(impl, callbackInfo.Holder(), callbackInf
o.GetIsolate())); | 246 v8SetReturnValue(callbackInfo, toV8(impl, callbackInfo.Holder(), callbackInf
o.GetIsolate())); |
| 246 } | 247 } |
| 247 | 248 |
| 249 template<typename CallbackInfo> |
| 250 inline void v8SetReturnValue(const CallbackInfo& callbackInfo, WorkletGlobalScop
e* impl) |
| 251 { |
| 252 v8SetReturnValue(callbackInfo, toV8(impl, callbackInfo.Holder(), callbackInf
o.GetIsolate())); |
| 253 } |
| 254 |
| 248 template<typename CallbackInfo, typename T> | 255 template<typename CallbackInfo, typename T> |
| 249 inline void v8SetReturnValue(const CallbackInfo& callbackInfo, PassRefPtr<T> imp
l) | 256 inline void v8SetReturnValue(const CallbackInfo& callbackInfo, PassRefPtr<T> imp
l) |
| 250 { | 257 { |
| 251 v8SetReturnValue(callbackInfo, impl.get()); | 258 v8SetReturnValue(callbackInfo, impl.get()); |
| 252 } | 259 } |
| 253 | 260 |
| 254 template<typename CallbackInfo, typename T> | 261 template<typename CallbackInfo, typename T> |
| 255 inline void v8SetReturnValue(const CallbackInfo& callbackInfo, RawPtr<T> impl) | 262 inline void v8SetReturnValue(const CallbackInfo& callbackInfo, RawPtr<T> impl) |
| 256 { | 263 { |
| 257 v8SetReturnValue(callbackInfo, impl.get()); | 264 v8SetReturnValue(callbackInfo, impl.get()); |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 308 { | 315 { |
| 309 v8SetReturnValue(callbackInfo, toV8(impl, callbackInfo.Holder(), callbackInf
o.GetIsolate())); | 316 v8SetReturnValue(callbackInfo, toV8(impl, callbackInfo.Holder(), callbackInf
o.GetIsolate())); |
| 310 } | 317 } |
| 311 | 318 |
| 312 template<typename CallbackInfo> | 319 template<typename CallbackInfo> |
| 313 inline void v8SetReturnValueForMainWorld(const CallbackInfo& callbackInfo, Worke
rGlobalScope* impl) | 320 inline void v8SetReturnValueForMainWorld(const CallbackInfo& callbackInfo, Worke
rGlobalScope* impl) |
| 314 { | 321 { |
| 315 v8SetReturnValue(callbackInfo, toV8(impl, callbackInfo.Holder(), callbackInf
o.GetIsolate())); | 322 v8SetReturnValue(callbackInfo, toV8(impl, callbackInfo.Holder(), callbackInf
o.GetIsolate())); |
| 316 } | 323 } |
| 317 | 324 |
| 325 template<typename CallbackInfo> |
| 326 inline void v8SetReturnValueForMainWorld(const CallbackInfo& callbackInfo, Workl
etGlobalScope* impl) |
| 327 { |
| 328 v8SetReturnValue(callbackInfo, toV8(impl, callbackInfo.Holder(), callbackInf
o.GetIsolate())); |
| 329 } |
| 330 |
| 318 template<typename CallbackInfo, typename T> | 331 template<typename CallbackInfo, typename T> |
| 319 inline void v8SetReturnValueForMainWorld(const CallbackInfo& callbackInfo, PassR
efPtr<T> impl) | 332 inline void v8SetReturnValueForMainWorld(const CallbackInfo& callbackInfo, PassR
efPtr<T> impl) |
| 320 { | 333 { |
| 321 v8SetReturnValueForMainWorld(callbackInfo, impl.get()); | 334 v8SetReturnValueForMainWorld(callbackInfo, impl.get()); |
| 322 } | 335 } |
| 323 | 336 |
| 324 template<typename CallbackInfo, typename T> | 337 template<typename CallbackInfo, typename T> |
| 325 inline void v8SetReturnValueForMainWorld(const CallbackInfo& callbackInfo, RawPt
r<T> impl) | 338 inline void v8SetReturnValueForMainWorld(const CallbackInfo& callbackInfo, RawPt
r<T> impl) |
| 326 { | 339 { |
| 327 v8SetReturnValueForMainWorld(callbackInfo, impl.get()); | 340 v8SetReturnValueForMainWorld(callbackInfo, impl.get()); |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 366 { | 379 { |
| 367 v8SetReturnValue(callbackInfo, toV8(impl, callbackInfo.Holder(), callbackInf
o.GetIsolate())); | 380 v8SetReturnValue(callbackInfo, toV8(impl, callbackInfo.Holder(), callbackInf
o.GetIsolate())); |
| 368 } | 381 } |
| 369 | 382 |
| 370 template<typename CallbackInfo> | 383 template<typename CallbackInfo> |
| 371 inline void v8SetReturnValueFast(const CallbackInfo& callbackInfo, WorkerGlobalS
cope* impl, const ScriptWrappable*) | 384 inline void v8SetReturnValueFast(const CallbackInfo& callbackInfo, WorkerGlobalS
cope* impl, const ScriptWrappable*) |
| 372 { | 385 { |
| 373 v8SetReturnValue(callbackInfo, toV8(impl, callbackInfo.Holder(), callbackInf
o.GetIsolate())); | 386 v8SetReturnValue(callbackInfo, toV8(impl, callbackInfo.Holder(), callbackInf
o.GetIsolate())); |
| 374 } | 387 } |
| 375 | 388 |
| 389 template<typename CallbackInfo> |
| 390 inline void v8SetReturnValueFast(const CallbackInfo& callbackInfo, WorkletGlobal
Scope* impl, const ScriptWrappable*) |
| 391 { |
| 392 v8SetReturnValue(callbackInfo, toV8(impl, callbackInfo.Holder(), callbackInf
o.GetIsolate())); |
| 393 } |
| 394 |
| 376 template<typename CallbackInfo, typename T, typename Wrappable> | 395 template<typename CallbackInfo, typename T, typename Wrappable> |
| 377 inline void v8SetReturnValueFast(const CallbackInfo& callbackInfo, PassRefPtr<T>
impl, const Wrappable* wrappable) | 396 inline void v8SetReturnValueFast(const CallbackInfo& callbackInfo, PassRefPtr<T>
impl, const Wrappable* wrappable) |
| 378 { | 397 { |
| 379 v8SetReturnValueFast(callbackInfo, impl.get(), wrappable); | 398 v8SetReturnValueFast(callbackInfo, impl.get(), wrappable); |
| 380 } | 399 } |
| 381 | 400 |
| 382 template<typename CallbackInfo, typename T, typename Wrappable> | 401 template<typename CallbackInfo, typename T, typename Wrappable> |
| 383 inline void v8SetReturnValueFast(const CallbackInfo& callbackInfo, RawPtr<T> imp
l, const Wrappable* wrappable) | 402 inline void v8SetReturnValueFast(const CallbackInfo& callbackInfo, RawPtr<T> imp
l, const Wrappable* wrappable) |
| 384 { | 403 { |
| 385 v8SetReturnValueFast(callbackInfo, impl.get(), wrappable); | 404 v8SetReturnValueFast(callbackInfo, impl.get(), wrappable); |
| (...skipping 698 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1084 PassRefPtr<TraceEvent::ConvertableToTraceFormat> devToolsTraceEventData(v8::Isol
ate*, ExecutionContext*, v8::Local<v8::Function>); | 1103 PassRefPtr<TraceEvent::ConvertableToTraceFormat> devToolsTraceEventData(v8::Isol
ate*, ExecutionContext*, v8::Local<v8::Function>); |
| 1085 | 1104 |
| 1086 // Callback functions used by generated code. | 1105 // Callback functions used by generated code. |
| 1087 CORE_EXPORT void v8ConstructorAttributeGetter(v8::Local<v8::Name> propertyName,
const v8::PropertyCallbackInfo<v8::Value>&); | 1106 CORE_EXPORT void v8ConstructorAttributeGetter(v8::Local<v8::Name> propertyName,
const v8::PropertyCallbackInfo<v8::Value>&); |
| 1088 | 1107 |
| 1089 typedef void (*InstallTemplateFunction)(v8::Local<v8::FunctionTemplate>, v8::Iso
late*); | 1108 typedef void (*InstallTemplateFunction)(v8::Local<v8::FunctionTemplate>, v8::Iso
late*); |
| 1090 | 1109 |
| 1091 } // namespace blink | 1110 } // namespace blink |
| 1092 | 1111 |
| 1093 #endif // V8Binding_h | 1112 #endif // V8Binding_h |
| OLD | NEW |