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

Side by Side Diff: services/sky/converters/basic_types.h

Issue 1239963003: Remove //services/sky (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 5 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
« no previous file with comments | « services/sky/content_handler_impl.cc ('k') | services/sky/converters/basic_types.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2014 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 SKY_VIEWER_CONVERTERS_BASIC_TYPES_H_
6 #define SKY_VIEWER_CONVERTERS_BASIC_TYPES_H_
7
8 #include "mojo/public/cpp/bindings/array.h"
9 #include "mojo/public/cpp/bindings/type_converter.h"
10 #include "sky/engine/public/platform/WebVector.h"
11
12 namespace blink {
13 class WebString;
14 }
15
16 namespace mojo {
17 class String;
18
19 template<>
20 struct TypeConverter<String, blink::WebString> {
21 static String Convert(const blink::WebString& str);
22 };
23 template<>
24 struct TypeConverter<blink::WebString, String> {
25 static blink::WebString Convert(const String& str);
26 };
27
28 template<typename T, typename U>
29 struct TypeConverter<Array<T>, blink::WebVector<U> > {
30 static Array<T> Convert(const blink::WebVector<U>& vector) {
31 Array<T> array(vector.size());
32 for (size_t i = 0; i < vector.size(); ++i)
33 array[i] = TypeConverter<T, U>::Convert(vector[i]);
34 return array.Pass();
35 }
36 };
37
38 } // namespace mojo
39
40 #endif // SKY_VIEWER_CONVERTERS_BASIC_TYPES_H_
OLDNEW
« no previous file with comments | « services/sky/content_handler_impl.cc ('k') | services/sky/converters/basic_types.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698