Fix emulator build error
[platform/framework/web/chromium-efl.git] / base / android / int_string_callback.cc
1 // Copyright 2018 The Chromium Authors
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 // This file encapsulates the JNI headers generated for IntStringCallback, so
6 // that the methods defined in the generated headers only end up in one object
7 // file. This is similar to //base/android/callback_android.*.
8
9 #include "base/android/int_string_callback.h"
10
11 #include <jni.h>
12
13 #include "base/android/jni_string.h"
14 #include "base/base_jni/IntStringCallback_jni.h"
15
16 namespace base {
17 namespace android {
18
19 void RunIntStringCallbackAndroid(const JavaRef<jobject>& callback,
20                                  int int_arg,
21                                  const std::string& str_arg) {
22   JNIEnv* env = AttachCurrentThread();
23   Java_IntStringCallback_onResult(env, callback, int_arg,
24                                   ConvertUTF8ToJavaString(env, str_arg));
25 }
26
27 }  // namespace android
28 }  // namespace base