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

Side by Side Diff: third_party/WebKit/Source/modules/background_fetch/BackgroundFetchStructTraits.h

Issue 2772893002: Experiment with typemaps in Blink Modules
Patch Set: Experiment with typemaps in Blink Modules Created 3 years, 9 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 unified diff | Download patch
OLDNEW
(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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698