Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef CONTENT_COMMON_MANIFEST_TYPE_CONVERTERS_H_ | |
| 6 #define CONTENT_COMMON_MANIFEST_TYPE_CONVERTERS_H_ | |
| 7 | |
| 8 #include <stddef.h> | |
| 9 | |
| 10 #include "base/strings/nullable_string16.h" | |
| 11 #include "content/public/common/manifest.h" | |
| 12 #include "third_party/WebKit/public/platform/modules/manifest/manifest.mojom.h" | |
| 13 | |
| 14 namespace mojo { | |
| 15 | |
| 16 template <> | |
| 17 struct TypeConverter<mojo::String, base::NullableString16> { | |
| 18 static mojo::String Convert(const base::NullableString16& input); | |
| 19 }; | |
| 20 | |
| 21 template <> | |
| 22 struct TypeConverter<base::NullableString16, mojo::String> { | |
| 23 static base::NullableString16 Convert(mojo::String input); | |
| 24 }; | |
|
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.
| |
| 25 | |
| 26 template <> | |
| 27 struct TypeConverter<blink::mojom::ManifestPtr, content::Manifest> { | |
| 28 static blink::mojom::ManifestPtr Convert(const content::Manifest& input); | |
| 29 }; | |
| 30 | |
| 31 template <> | |
| 32 struct TypeConverter<content::Manifest, blink::mojom::ManifestPtr> { | |
| 33 static content::Manifest Convert(const blink::mojom::ManifestPtr& input); | |
| 34 }; | |
| 35 | |
| 36 template <> | |
| 37 struct TypeConverter<blink::mojom::ManifestIconPtr, content::Manifest::Icon> { | |
| 38 static blink::mojom::ManifestIconPtr Convert( | |
| 39 const content::Manifest::Icon& input); | |
| 40 }; | |
| 41 | |
| 42 template <> | |
| 43 struct TypeConverter<content::Manifest::Icon, blink::mojom::ManifestIconPtr> { | |
| 44 static content::Manifest::Icon Convert( | |
| 45 const blink::mojom::ManifestIconPtr& input); | |
| 46 }; | |
| 47 | |
| 48 template <> | |
| 49 struct TypeConverter<blink::mojom::RelatedApplicationPtr, | |
| 50 content::Manifest::RelatedApplication> { | |
| 51 static blink::mojom::RelatedApplicationPtr Convert( | |
| 52 const content::Manifest::RelatedApplication& input); | |
| 53 }; | |
| 54 | |
| 55 template <> | |
| 56 struct TypeConverter<content::Manifest::RelatedApplication, | |
| 57 blink::mojom::RelatedApplicationPtr> { | |
| 58 static content::Manifest::RelatedApplication Convert( | |
| 59 const blink::mojom::RelatedApplicationPtr& input); | |
| 60 }; | |
| 61 | |
| 62 } // namespace mojo | |
| 63 | |
| 64 #endif // CONTENT_COMMON_MANIFEST_TYPE_CONVERTERS_H_ | |
| OLD | NEW |