OLD | NEW |
| (Empty) |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef v8_np_utils_h | |
6 #define v8_np_utils_h | |
7 | |
8 #include <v8.h> | |
9 #include "third_party/npapi/bindings/npruntime.h" | |
10 | |
11 namespace WebCore { | |
12 class Frame; | |
13 } | |
14 | |
15 // Convert a V8 Value of any type (string, bool, object, etc) to a NPVariant. | |
16 void convertV8ObjectToNPVariant(v8::Local<v8::Value> object, NPObject *owner, NP
Variant* result); | |
17 | |
18 // Convert a NPVariant (string, bool, object, etc) back to a V8 Value. | |
19 // The owner object is the NPObject which relates to the object, if the object | |
20 // is an Object. The created NPObject will be tied to the lifetime of the | |
21 // owner. | |
22 v8::Handle<v8::Value> convertNPVariantToV8Object(const NPVariant* value, NPObjec
t* owner); | |
23 | |
24 // Helper function to create an NPN String Identifier from a v8 string. | |
25 NPIdentifier getStringIdentifier(v8::Handle<v8::String> str); | |
26 | |
27 #endif // v8_np_utils_h | |
OLD | NEW |