OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "base/message_pump_android.h" | 5 #include "base/message_pump_android.h" |
6 | 6 |
7 #include <jni.h> | 7 #include <jni.h> |
8 | 8 |
9 #include "base/android/jni_android.h" | 9 #include "base/android/jni_android.h" |
10 #include "base/android/scoped_java_ref.h" | 10 #include "base/android/scoped_java_ref.h" |
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
125 DCHECK(env); | 125 DCHECK(env); |
126 | 126 |
127 jlong millis = | 127 jlong millis = |
128 (delayed_work_time - base::TimeTicks::Now()).InMillisecondsRoundedUp(); | 128 (delayed_work_time - base::TimeTicks::Now()).InMillisecondsRoundedUp(); |
129 // Note that we're truncating to milliseconds as required by the java side, | 129 // Note that we're truncating to milliseconds as required by the java side, |
130 // even though delayed_work_time is microseconds resolution. | 130 // even though delayed_work_time is microseconds resolution. |
131 Java_SystemMessageHandler_setDelayedTimer(env, | 131 Java_SystemMessageHandler_setDelayedTimer(env, |
132 g_system_message_handler_obj.Get().obj(), millis); | 132 g_system_message_handler_obj.Get().obj(), millis); |
133 } | 133 } |
134 | 134 |
135 // Register native methods | 135 // static |
136 bool RegisterSystemMessageHandler(JNIEnv* env) { | 136 bool MessagePumpForUI::RegisterBindings(JNIEnv* env) { |
137 return RegisterNativesImpl(env); | 137 return RegisterNativesImpl(env); |
138 } | 138 } |
139 | 139 |
140 } // namespace base | 140 } // namespace base |
OLD | NEW |