OLD | NEW |
(Empty) | |
| 1 // Copyright 2017 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 BackgroundFetchStructTraits_h |
| 6 #define BackgroundFetchStructTraits_h |
| 7 |
| 8 #include "public/platform/modules/background_fetch/background_fetch.mojom-blink.
h" |
| 9 #include "wtf/text/WTFString.h" |
| 10 |
| 11 namespace mojo { |
| 12 |
| 13 template <> |
| 14 struct StructTraits<blink::mojom::IconDefinitionDataView, |
| 15 blink::IconDefinition> { |
| 16 static WTF::String src(const blink::IconDefinition& definition) { |
| 17 return definition.src(); |
| 18 } |
| 19 |
| 20 static WTF::String sizes(const blink::IconDefinition& definition) { |
| 21 return definition.sizes(); |
| 22 } |
| 23 |
| 24 static WTF::String type(const blink::IconDefinition& definition) { |
| 25 return definition.type(); |
| 26 } |
| 27 |
| 28 static bool Read(blink::mojom::IconDefinitionDataView input, |
| 29 blink::IconDefinition* out); |
| 30 }; |
| 31 |
| 32 } // namespace mojo |
| 33 |
| 34 #endif // BackgroundFetchStructTraits_h |
OLD | NEW |