Commit 6f6a4944 authored by bulach@chromium.org's avatar bulach@chromium.org

Android: moves base/ to use long for JNI.

Follow up from crrev.com/234212

BUG=317523

Review URL: https://codereview.chromium.org/59323004

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@235725 0039d316-1c4b-4281-b951-d872f2087c98
parent dafd8d3b
......@@ -16,9 +16,9 @@ class SystemMessageHandler extends Handler {
private static final int DELAYED_TIMER_MESSAGE = 2;
// Native class pointer set by the constructor of the SharedClient native class.
private int mMessagePumpDelegateNative = 0;
private long mMessagePumpDelegateNative = 0;
private SystemMessageHandler(int messagePumpDelegateNative) {
private SystemMessageHandler(long messagePumpDelegateNative) {
mMessagePumpDelegateNative = messagePumpDelegateNative;
}
......@@ -47,9 +47,9 @@ class SystemMessageHandler extends Handler {
}
@CalledByNative
private static SystemMessageHandler create(int messagePumpDelegateNative) {
private static SystemMessageHandler create(long messagePumpDelegateNative) {
return new SystemMessageHandler(messagePumpDelegateNative);
}
private native void nativeDoRunLoopOnce(int messagePumpDelegateNative);
private native void nativeDoRunLoopOnce(long messagePumpDelegateNative);
}
......@@ -21,7 +21,7 @@ using base::android::ScopedJavaLocalRef;
// ----------------------------------------------------------------------------
// This method can not move to anonymous namespace as it has been declared as
// 'static' in system_message_handler_jni.h.
static void DoRunLoopOnce(JNIEnv* env, jobject obj, jint native_delegate) {
static void DoRunLoopOnce(JNIEnv* env, jobject obj, jlong native_delegate) {
base::MessagePump::Delegate* delegate =
reinterpret_cast<base::MessagePump::Delegate*>(native_delegate);
DCHECK(delegate);
......@@ -81,7 +81,8 @@ void MessagePumpForUI::Start(Delegate* delegate) {
DCHECK(env);
system_message_handler_obj_.Reset(
Java_SystemMessageHandler_create(env, reinterpret_cast<jint>(delegate)));
Java_SystemMessageHandler_create(
env, reinterpret_cast<intptr_t>(delegate)));
}
void MessagePumpForUI::Quit() {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment