Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1124)

Unified Diff: ppapi/cpp/dev/from_c_type_converter_dev.h

Issue 60173003: Draft: apps APIs in Pepper (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ppapi/cpp/dev/foobar_dev.cc ('k') | ppapi/cpp/dev/may_own_ptr_dev.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_
« no previous file with comments | « ppapi/cpp/dev/foobar_dev.cc ('k') | ppapi/cpp/dev/may_own_ptr_dev.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698