From 2eb312b025971ee1529b3a6c67d715055cb77906 Mon Sep 17 00:00:00 2001 From: "brettw@chromium.org" Date: Thu, 5 Mar 2009 20:17:08 +0000 Subject: 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 --- webkit/port/bindings/v8/V8NPUtils.h | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 webkit/port/bindings/v8/V8NPUtils.h (limited to 'webkit/port/bindings/v8/V8NPUtils.h') 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 +#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 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 convertNPVariantToV8Object(const NPVariant* value, NPObject* owner); + +// Helper function to create an NPN String Identifier from a v8 string. +NPIdentifier getStringIdentifier(v8::Handle str); + +#endif // v8_np_utils_h + -- cgit v1.1