| Index: ppapi/cpp/extensions/to_var_converter.h
|
| diff --git a/ppapi/cpp/extensions/to_var_converter.h b/ppapi/cpp/extensions/to_var_converter.h
|
| index ba05064ec8d7e6374b5b86bcc8bb485c87cc9a4b..591365290f72aa89a8ecb57d49e2e4003017e3ef 100644
|
| --- a/ppapi/cpp/extensions/to_var_converter.h
|
| +++ b/ppapi/cpp/extensions/to_var_converter.h
|
| @@ -8,8 +8,11 @@
|
| #include <string>
|
|
|
| #include "ppapi/c/pp_var.h"
|
| +#include "ppapi/cpp/dev/var_array_dev.h"
|
| +#include "ppapi/cpp/dev/var_dictionary_dev.h"
|
| #include "ppapi/cpp/extensions/optional.h"
|
| #include "ppapi/cpp/var.h"
|
| +#include "ppapi/cpp/var_array_buffer.h"
|
|
|
| namespace pp {
|
| namespace ext {
|
| @@ -66,6 +69,36 @@ class ToVarConverter<Optional<T> > : public ToVarConverterBase {
|
| };
|
|
|
| template <>
|
| +class ToVarConverter<bool> : public ToVarConverterBase {
|
| + public:
|
| + explicit ToVarConverter(bool object) : ToVarConverterBase(Var(object)) {
|
| + }
|
| +
|
| + ~ToVarConverter() {
|
| + }
|
| +};
|
| +
|
| +template <>
|
| +class ToVarConverter<int32_t> : public ToVarConverterBase {
|
| + public:
|
| + explicit ToVarConverter(int32_t object) : ToVarConverterBase(Var(object)) {
|
| + }
|
| +
|
| + ~ToVarConverter() {
|
| + }
|
| +};
|
| +
|
| +template <>
|
| +class ToVarConverter<double> : public ToVarConverterBase {
|
| + public:
|
| + explicit ToVarConverter(double object) : ToVarConverterBase(Var(object)) {
|
| + }
|
| +
|
| + ~ToVarConverter() {
|
| + }
|
| +};
|
| +
|
| +template <>
|
| class ToVarConverter<std::string> : public ToVarConverterBase {
|
| public:
|
| explicit ToVarConverter(const std::string& object)
|
| @@ -77,9 +110,39 @@ class ToVarConverter<std::string> : public ToVarConverterBase {
|
| };
|
|
|
| template <>
|
| -class ToVarConverter<double> : public ToVarConverterBase {
|
| +class ToVarConverter<Var> : public ToVarConverterBase {
|
| public:
|
| - explicit ToVarConverter(double object) : ToVarConverterBase(Var(object)) {
|
| + explicit ToVarConverter(const Var& object) : ToVarConverterBase(object) {
|
| + }
|
| +
|
| + ~ToVarConverter() {
|
| + }
|
| +};
|
| +
|
| +template <>
|
| +class ToVarConverter<VarArray_Dev> : public ToVarConverterBase {
|
| + public:
|
| + explicit ToVarConverter(const Var& object) : ToVarConverterBase(object) {
|
| + }
|
| +
|
| + ~ToVarConverter() {
|
| + }
|
| +};
|
| +
|
| +template <>
|
| +class ToVarConverter<VarDictionary_Dev> : public ToVarConverterBase {
|
| + public:
|
| + explicit ToVarConverter(const Var& object) : ToVarConverterBase(object) {
|
| + }
|
| +
|
| + ~ToVarConverter() {
|
| + }
|
| +};
|
| +
|
| +template <>
|
| +class ToVarConverter<VarArrayBuffer> : public ToVarConverterBase {
|
| + public:
|
| + explicit ToVarConverter(const Var& object) : ToVarConverterBase(object) {
|
| }
|
|
|
| ~ToVarConverter() {
|
|
|