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

Unified Diff: components/framelet/common/value_type_converters.h

Issue 1602663003: Framelet Prototype 2016 using Mojo IPC Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased. Disabled oilpan Created 4 years, 11 months 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
Index: components/framelet/common/value_type_converters.h
diff --git a/components/framelet/common/value_type_converters.h b/components/framelet/common/value_type_converters.h
new file mode 100644
index 0000000000000000000000000000000000000000..99d6f0df8d1a2fc7963c4be4052ea6f0add13cd8
--- /dev/null
+++ b/components/framelet/common/value_type_converters.h
@@ -0,0 +1,42 @@
+// Copyright 2015 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.
+
+#include "mojo/public/cpp/bindings/type_converter.h"
+
+#include "base/values.h"
+#include "components/framelet/common/framelet.mojom.h"
+
+namespace mojo {
+
+template <>
+struct TypeConverter<int, framelet::mojom::ValuePtr> {
+ static int Convert(const framelet::mojom::ValuePtr& input);
+};
+
+template <>
+struct TypeConverter<framelet::mojom::ValuePtr, int> {
+ static framelet::mojom::ValuePtr Convert(int input);
+};
+
+template <>
+struct TypeConverter<bool, framelet::mojom::ValuePtr> {
+ static bool Convert(const framelet::mojom::ValuePtr& input);
+};
+
+template <>
+struct TypeConverter<framelet::mojom::ValuePtr, bool> {
+ static framelet::mojom::ValuePtr Convert(bool input);
+};
+
+template <>
+struct TypeConverter<framelet::mojom::ValuePtr, std::string> {
+ static framelet::mojom::ValuePtr Convert(const std::string& input);
+};
+
+template <>
+struct TypeConverter<base::Value*, framelet::mojom::ValuePtr> {
+ static base::Value* Convert(const framelet::mojom::ValuePtr& value);
+};
+
+} // namesapce mojo
« no previous file with comments | « components/framelet/common/framelet_param_traits.h ('k') | components/framelet/common/value_type_converters.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698