| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2009 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 18 matching lines...) Expand all Loading... |
| 29 */ | 29 */ |
| 30 | 30 |
| 31 #include "config.h" | 31 #include "config.h" |
| 32 #include "public/web/WebBindings.h" | 32 #include "public/web/WebBindings.h" |
| 33 | 33 |
| 34 #include "V8Element.h" | 34 #include "V8Element.h" |
| 35 #include "V8Range.h" | 35 #include "V8Range.h" |
| 36 #include "bindings/v8/NPV8Object.h" // for PrivateIdentifier | 36 #include "bindings/v8/NPV8Object.h" // for PrivateIdentifier |
| 37 #include "bindings/v8/ScriptController.h" | 37 #include "bindings/v8/ScriptController.h" |
| 38 #include "bindings/v8/V8DOMWrapper.h" | 38 #include "bindings/v8/V8DOMWrapper.h" |
| 39 #include "bindings/v8/V8NPObject.h" |
| 39 #include "bindings/v8/V8NPUtils.h" | 40 #include "bindings/v8/V8NPUtils.h" |
| 40 #include "bindings/v8/custom/V8ArrayBufferCustom.h" | 41 #include "bindings/v8/custom/V8ArrayBufferCustom.h" |
| 41 #include "bindings/v8/custom/V8ArrayBufferViewCustom.h" | 42 #include "bindings/v8/custom/V8ArrayBufferViewCustom.h" |
| 42 #include "bindings/v8/npruntime_impl.h" | 43 #include "bindings/v8/npruntime_impl.h" |
| 43 #include "bindings/v8/npruntime_priv.h" | 44 #include "bindings/v8/npruntime_priv.h" |
| 44 #include "core/dom/Range.h" | 45 #include "core/dom/Range.h" |
| 45 #include "core/frame/DOMWindow.h" | 46 #include "core/frame/DOMWindow.h" |
| 46 #include "core/frame/LocalFrame.h" | 47 #include "core/frame/LocalFrame.h" |
| 47 #include "public/platform/WebArrayBuffer.h" | 48 #include "public/platform/WebArrayBuffer.h" |
| 48 #include "public/web/WebArrayBufferView.h" | 49 #include "public/web/WebArrayBufferView.h" |
| (...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 175 NPP WebBindings::getObjectOwner(NPObject*) | 176 NPP WebBindings::getObjectOwner(NPObject*) |
| 176 { | 177 { |
| 177 return 0; | 178 return 0; |
| 178 } | 179 } |
| 179 | 180 |
| 180 void WebBindings::unregisterObject(NPObject* object) | 181 void WebBindings::unregisterObject(NPObject* object) |
| 181 { | 182 { |
| 182 _NPN_UnregisterObject(object); | 183 _NPN_UnregisterObject(object); |
| 183 } | 184 } |
| 184 | 185 |
| 186 void WebBindings::dropV8WrapperForObject(NPObject* object) |
| 187 { |
| 188 WebCore::forgetV8ObjectForNPObject(object); |
| 189 } |
| 190 |
| 185 NPUTF8* WebBindings::utf8FromIdentifier(NPIdentifier identifier) | 191 NPUTF8* WebBindings::utf8FromIdentifier(NPIdentifier identifier) |
| 186 { | 192 { |
| 187 return _NPN_UTF8FromIdentifier(identifier); | 193 return _NPN_UTF8FromIdentifier(identifier); |
| 188 } | 194 } |
| 189 | 195 |
| 190 void WebBindings::extractIdentifierData(const NPIdentifier& identifier, const NP
UTF8*& string, int32_t& number, bool& isString) | 196 void WebBindings::extractIdentifierData(const NPIdentifier& identifier, const NP
UTF8*& string, int32_t& number, bool& isString) |
| 191 { | 197 { |
| 192 PrivateIdentifier* data = static_cast<PrivateIdentifier*>(identifier); | 198 PrivateIdentifier* data = static_cast<PrivateIdentifier*>(identifier); |
| 193 if (!data) { | 199 if (!data) { |
| 194 isString = false; | 200 isString = false; |
| (...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 392 if (!v8Object) | 398 if (!v8Object) |
| 393 return v8::Undefined(isolate); | 399 return v8::Undefined(isolate); |
| 394 return convertNPVariantToV8Object(variant, v8Object->rootObject->frame()
->script().windowScriptNPObject(), isolate); | 400 return convertNPVariantToV8Object(variant, v8Object->rootObject->frame()
->script().windowScriptNPObject(), isolate); |
| 395 } | 401 } |
| 396 // Safe to pass 0 since we have checked the script object class to make sure
the | 402 // Safe to pass 0 since we have checked the script object class to make sure
the |
| 397 // argument is a primitive v8 type. | 403 // argument is a primitive v8 type. |
| 398 return convertNPVariantToV8Object(variant, 0, isolate); | 404 return convertNPVariantToV8Object(variant, 0, isolate); |
| 399 } | 405 } |
| 400 | 406 |
| 401 } // namespace blink | 407 } // namespace blink |
| OLD | NEW |