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

Unified Diff: content/common/manifest_type_converters.h

Issue 1913043002: Convert ManifestManager IPCs to Mojo. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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: content/common/manifest_type_converters.h
diff --git a/content/common/manifest_type_converters.h b/content/common/manifest_type_converters.h
new file mode 100644
index 0000000000000000000000000000000000000000..ddcea3ba96d03531e5cbde9bea6880ddd273c2d1
--- /dev/null
+++ b/content/common/manifest_type_converters.h
@@ -0,0 +1,64 @@
+// Copyright 2016 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 CONTENT_COMMON_MANIFEST_TYPE_CONVERTERS_H_
+#define CONTENT_COMMON_MANIFEST_TYPE_CONVERTERS_H_
+
+#include <stddef.h>
+
+#include "base/strings/nullable_string16.h"
+#include "content/public/common/manifest.h"
+#include "third_party/WebKit/public/platform/modules/manifest/manifest.mojom.h"
+
+namespace mojo {
+
+template <>
+struct TypeConverter<mojo::String, base::NullableString16> {
+ static mojo::String Convert(const base::NullableString16& input);
+};
+
+template <>
+struct TypeConverter<base::NullableString16, mojo::String> {
+ static base::NullableString16 Convert(mojo::String input);
+};
mlamouri (slow - plz ping) 2016/04/27 13:38:08 Should these be in a string_type_coverters.h? or b
Sam McNally 2016/04/28 08:25:27 Done.
+
+template <>
+struct TypeConverter<blink::mojom::ManifestPtr, content::Manifest> {
+ static blink::mojom::ManifestPtr Convert(const content::Manifest& input);
+};
+
+template <>
+struct TypeConverter<content::Manifest, blink::mojom::ManifestPtr> {
+ static content::Manifest Convert(const blink::mojom::ManifestPtr& input);
+};
+
+template <>
+struct TypeConverter<blink::mojom::ManifestIconPtr, content::Manifest::Icon> {
+ static blink::mojom::ManifestIconPtr Convert(
+ const content::Manifest::Icon& input);
+};
+
+template <>
+struct TypeConverter<content::Manifest::Icon, blink::mojom::ManifestIconPtr> {
+ static content::Manifest::Icon Convert(
+ const blink::mojom::ManifestIconPtr& input);
+};
+
+template <>
+struct TypeConverter<blink::mojom::RelatedApplicationPtr,
+ content::Manifest::RelatedApplication> {
+ static blink::mojom::RelatedApplicationPtr Convert(
+ const content::Manifest::RelatedApplication& input);
+};
+
+template <>
+struct TypeConverter<content::Manifest::RelatedApplication,
+ blink::mojom::RelatedApplicationPtr> {
+ static content::Manifest::RelatedApplication Convert(
+ const blink::mojom::RelatedApplicationPtr& input);
+};
+
+} // namespace mojo
+
+#endif // CONTENT_COMMON_MANIFEST_TYPE_CONVERTERS_H_

Powered by Google App Engine
This is Rietveld 408576698