Index: ppapi/cpp/dev/from_c_type_converter_dev.h |
diff --git a/ppapi/cpp/dev/from_c_type_converter_dev.h b/ppapi/cpp/dev/from_c_type_converter_dev.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..db93dd25dc88a377de2c440845f78f8582b3e8b4 |
--- /dev/null |
+++ b/ppapi/cpp/dev/from_c_type_converter_dev.h |
@@ -0,0 +1,52 @@ |
+// Copyright (c) 2013 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 PPAPI_CPP_DEV_FROM_C_TYPE_CONVERTER_DEV_H_ |
+#define PPAPI_CPP_DEV_FROM_C_TYPE_CONVERTER_DEV_H_ |
+ |
+#include <string> |
+ |
+#include "ppapi/c/pp_var.h" |
+#include "ppapi/cpp/dev/memory_dev.h" |
+#include "ppapi/cpp/dev/optional_dev.h" |
+#include "ppapi/cpp/logging.h" |
+#include "ppapi/cpp/var.h" |
+ |
+namespace pp { |
+namespace internal { |
+ |
+template <class T> |
+class FromCTypeConverter { |
+ public: |
+ FromCTypeConverter() { |
+ } |
+ |
+ typename T::COutputType StartRawUpdate() { |
+ return value_.StartRawUpdate(); |
+ } |
+ |
+ void EndRawUpdate() { |
+ value_.EndRawUpdate(); |
+ } |
+ |
+ T& value() { |
+ return value_; |
+ } |
+ |
+ T& value() const { |
+ return value_; |
+ } |
+ |
+ private: |
+ // Disallow copying and assignment. |
+ FromCTypeConverter(const FromCTypeConverter<T>&); |
+ FromCTypeConverter<T>& operator=(const FromCTypeConverter<T>&); |
+ |
+ T value_; |
+}; |
+ |
+} // namespace internal |
+} // namespace pp |
+ |
+#endif // PPAPI_CPP_DEV_FROM_C_TYPE_CONVERTER_DEV_H_ |