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

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

Issue 1235093002: Move sky_viewer into services/sky (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: again 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 | « sky/viewer/content_handler_impl.cc ('k') | sky/viewer/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/type_converter.h"
9
10 #include "mojo/public/cpp/bindings/array.h"
11 #include "sky/engine/public/platform/WebVector.h"
12
13 namespace blink {
14 class WebString;
15 }
16
17 namespace mojo {
18 class String;
19
20 template<>
21 struct TypeConverter<String, blink::WebString> {
22 static String Convert(const blink::WebString& str);
23 };
24 template<>
25 struct TypeConverter<blink::WebString, String> {
26 static blink::WebString Convert(const String& str);
27 };
28
29 template<typename T, typename U>
30 struct TypeConverter<Array<T>, blink::WebVector<U> > {
31 static Array<T> Convert(const blink::WebVector<U>& vector) {
32 Array<T> array(vector.size());
33 for (size_t i = 0; i < vector.size(); ++i)
34 array[i] = TypeConverter<T, U>::Convert(vector[i]);
35 return array.Pass();
36 }
37 };
38
39 } // namespace mojo
40
41 #endif // SKY_VIEWER_CONVERTERS_BASIC_TYPES_H_
OLDNEW
« no previous file with comments | « sky/viewer/content_handler_impl.cc ('k') | sky/viewer/converters/basic_types.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698