diff options
author | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-03-05 20:17:08 +0000 |
---|---|---|
committer | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-03-05 20:17:08 +0000 |
commit | 2eb312b025971ee1529b3a6c67d715055cb77906 (patch) | |
tree | 8d0eb7b8445c14840c255ed988f0e9b9b518cb08 /webkit/port/bindings/v8/V8NPUtils.h | |
parent | 0ed164e1bbe8bde1b5be616c10ef46388ea78079 (diff) | |
download | chromium_src-2eb312b025971ee1529b3a6c67d715055cb77906.zip chromium_src-2eb312b025971ee1529b3a6c67d715055cb77906.tar.gz chromium_src-2eb312b025971ee1529b3a6c67d715055cb77906.tar.bz2 |
Address some of the review comments on comment 2 of
https://bugs.webkit.org/show_bug.cgi?id=24299
This is everything up to "not supposed to be using STL container classes."
Review URL: http://codereview.chromium.org/40122
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@11025 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/port/bindings/v8/V8NPUtils.h')
-rw-r--r-- | webkit/port/bindings/v8/V8NPUtils.h | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/webkit/port/bindings/v8/V8NPUtils.h b/webkit/port/bindings/v8/V8NPUtils.h new file mode 100644 index 0000000..4b6fc2b --- /dev/null +++ b/webkit/port/bindings/v8/V8NPUtils.h @@ -0,0 +1,28 @@ +// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef v8_np_utils_h +#define v8_np_utils_h + +#include <v8.h> +#include "third_party/npapi/bindings/npruntime.h" + +namespace WebCore { + class Frame; +} + +// Convert a V8 Value of any type (string, bool, object, etc) to a NPVariant. +void convertV8ObjectToNPVariant(v8::Local<v8::Value> object, NPObject *owner, NPVariant* result); + +// Convert a NPVariant (string, bool, object, etc) back to a V8 Value. +// The owner object is the NPObject which relates to the object, if the object +// is an Object. The created NPObject will be tied to the lifetime of the +// owner. +v8::Handle<v8::Value> convertNPVariantToV8Object(const NPVariant* value, NPObject* owner); + +// Helper function to create an NPN String Identifier from a v8 string. +NPIdentifier getStringIdentifier(v8::Handle<v8::String> str); + +#endif // v8_np_utils_h + |