| Index: webkit/glue/cpp_variant.h
|
| ===================================================================
|
| --- webkit/glue/cpp_variant.h (revision 30898)
|
| +++ webkit/glue/cpp_variant.h (working copy)
|
| @@ -2,19 +2,17 @@
|
| // Use of this source code is governed by a BSD-style license that can be
|
| // found in the LICENSE file.
|
|
|
| -/*
|
| - This file contains the declaration for CppVariant, a type used by C++ classes
|
| - that are to be bound to JavaScript objects.
|
| +// This file contains the declaration for CppVariant, a type used by C++ classes
|
| +// that are to be bound to JavaScript objects.
|
| +//
|
| +// CppVariant exists primarily as an interface between C++ callers and the
|
| +// corresponding NPVariant type. CppVariant also provides a number of
|
| +// convenience constructors and accessors, so that the NPVariantType values
|
| +// don't need to be exposed, and a destructor to free any memory allocated for
|
| +// string values.
|
| +//
|
| +// For a usage example, see cpp_binding_example.{h|cc}.
|
|
|
| - CppVariant exists primarily as an interface between C++ callers and the
|
| - corresponding NPVariant type. CppVariant also provides a number of
|
| - convenience constructors and accessors, so that the NPVariantType values
|
| - don't need to be exposed, and a destructor to free any memory allocated for
|
| - string values.
|
| -
|
| - For a usage example, see cpp_binding_example.{h|cc}.
|
| -*/
|
| -
|
| #ifndef WEBKIT_GLUE_CPP_VARIANT_H__
|
| #define WEBKIT_GLUE_CPP_VARIANT_H__
|
|
|
| @@ -104,7 +102,12 @@
|
| // method was invoked successfully, any return value is stored in the
|
| // CppVariant specified by result.
|
| bool Invoke(const std::string& method, const CppVariant* args,
|
| - uint32 arg_count, CppVariant& result) const;
|
| + uint32 arg_count, CppVariant* result) const;
|
| +
|
| + // Retrieves the value of a property. Returns whether the property was
|
| + // found and could be retrieved. If the method was invoked successfully,
|
| + // the value is stored in the CppVariant specified by result.
|
| + bool GetProperty(const std::string& property, CppVariant* result) const;
|
| };
|
|
|
| #endif // WEBKIT_GLUE_CPP_VARIANT_H__
|
|
|