OLD | NEW |
---|---|
(Empty) | |
1 // Copyright (c) 2013 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 BASE_ANDROID_JNI_MAP_H_ | |
6 #define BASE_ANDROID_JNI_MAP_H_ | |
7 | |
8 #include <jni.h> | |
9 #include <map> | |
10 #include <string> | |
11 | |
12 #include "base/android/scoped_java_ref.h" | |
13 #include "base/base_export.h" | |
14 #include "base/string16.h" | |
15 | |
16 namespace base { | |
17 namespace android { | |
18 | |
19 // Convert a std::map<std::string, string16> to a Java HashMap<String, String> | |
20 BASE_EXPORT ScopedJavaLocalRef<jobject> ConvertMapToJavaMap( | |
bulach
2013/02/22 12:49:25
..ToJavaHashMap (and below) ?
also, this is conve
| |
21 JNIEnv* env, | |
22 const std::map<std::string, string16>& cmap); | |
23 | |
24 // Convert a Java subclass of map to std::map. Assumes values are string16. | |
25 // Any null key/values are dropped. | |
26 BASE_EXPORT std::map<std::string, string16> ConvertJavaMapToMap(JNIEnv* env, | |
27 jobject jmap); | |
28 | |
29 bool RegisterMap(JNIEnv* env); | |
30 | |
31 } // namespace android | |
32 } // namespace base | |
33 | |
34 #endif // BASE_ANDROID_JNI_MAP_H_ | |
OLD | NEW |