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

Side by Side Diff: content/browser/renderer_host/java/java_type.h

Issue 336313018: [Android] Move content/browser/{renderer_host => android}/java/* (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Updated paths for unit tests, rebased Created 6 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 | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright (c) 2012 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_BROWSER_RENDERER_HOST_JAVA_JAVA_TYPE_H_
6 #define CONTENT_BROWSER_RENDERER_HOST_JAVA_JAVA_TYPE_H_
7
8 #include <string>
9
10 #include "base/memory/scoped_ptr.h"
11
12 namespace content {
13
14 // The type of a Java value. A light-weight enum-like structure intended for
15 // use by value and in STL containers.
16 struct JavaType {
17 JavaType();
18 JavaType(const JavaType& other);
19 ~JavaType();
20 JavaType& operator=(const JavaType& other);
21
22 // Java's reflection API represents types as a string using an extended
23 // 'binary name'.
24 static JavaType CreateFromBinaryName(const std::string& binary_name);
25
26 enum Type {
27 TypeBoolean,
28 TypeByte,
29 TypeChar,
30 TypeShort,
31 TypeInt,
32 TypeLong,
33 TypeFloat,
34 TypeDouble,
35 // This is only used as a return type, so we should never convert from
36 // JavaScript with this type.
37 TypeVoid,
38 TypeArray,
39 // We special-case strings, as they get special handling when coercing.
40 TypeString,
41 TypeObject,
42 };
43
44 Type type;
45 scoped_ptr<JavaType> inner_type; // Used for TypeArray only.
46 };
47
48 } // namespace content
49
50 #endif // CONTENT_BROWSER_RENDERER_HOST_JAVA_JAVA_TYPE_H_
OLDNEW
« no previous file with comments | « content/browser/renderer_host/java/java_method.cc ('k') | content/browser/renderer_host/java/java_type.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698