| Index: base/android/callback_android.h
|
| diff --git a/base/android/callback_android.h b/base/android/callback_android.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..c044d9c86e56cf97e835e87f68650c09755aa8e3
|
| --- /dev/null
|
| +++ b/base/android/callback_android.h
|
| @@ -0,0 +1,30 @@
|
| +// Copyright 2016 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#ifndef BASE_ANDROID_CALLBACK_ANDROID_H_
|
| +#define BASE_ANDROID_CALLBACK_ANDROID_H_
|
| +
|
| +#include <jni.h>
|
| +
|
| +#include "base/android/scoped_java_ref.h"
|
| +#include "base/base_export.h"
|
| +
|
| +namespace base {
|
| +namespace android {
|
| +
|
| +// Runs the given |callback| with the specified |arg|.
|
| +void BASE_EXPORT RunCallbackAndroid(const JavaRef<jobject>& callback,
|
| + const JavaRef<jobject>& arg);
|
| +
|
| +// Runs the given |callback| with the specified |arg|.
|
| +void BASE_EXPORT RunCallbackAndroid(const JavaRef<jobject>& callback,
|
| + bool arg);
|
| +
|
| +// JNI registration boilerplate.
|
| +bool RegisterCallbackAndroid(JNIEnv* env);
|
| +
|
| +} // namespace android
|
| +} // namespace base
|
| +
|
| +#endif // BASE_ANDROID_CALLBACK_ANDROID_H_
|
|
|