blob: 20254ac74359ca14cdef40056525d680fa0e62d8 [file] [log] [blame]
tedchoc7efe9792016-05-21 00:35:491// Copyright 2016 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_CALLBACK_ANDROID_H_
6#define BASE_ANDROID_CALLBACK_ANDROID_H_
7
8#include <jni.h>
9
10#include "base/android/scoped_java_ref.h"
11#include "base/base_export.h"
12
13namespace base {
14namespace android {
15
16// Runs the given |callback| with the specified |arg|.
17void BASE_EXPORT RunCallbackAndroid(const JavaRef<jobject>& callback,
18 const JavaRef<jobject>& arg);
19
20// Runs the given |callback| with the specified |arg|.
21void BASE_EXPORT RunCallbackAndroid(const JavaRef<jobject>& callback,
22 bool arg);
23
dewittj457b52532016-06-13 21:42:4624// Runs the given |callback| with the specified |arg|.
25void BASE_EXPORT RunCallbackAndroid(const JavaRef<jobject>& callback, int arg);
26
tedchoc7efe9792016-05-21 00:35:4927// JNI registration boilerplate.
28bool RegisterCallbackAndroid(JNIEnv* env);
29
30} // namespace android
31} // namespace base
32
33#endif // BASE_ANDROID_CALLBACK_ANDROID_H_