| 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_loop/message_pump_android.h" | 5 #include "base/message_loop/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 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 122 system_message_handler_obj_.Reset(); | 122 system_message_handler_obj_.Reset(); |
| 123 } | 123 } |
| 124 | 124 |
| 125 if (run_loop_) { | 125 if (run_loop_) { |
| 126 run_loop_->AfterRun(); | 126 run_loop_->AfterRun(); |
| 127 delete run_loop_; | 127 delete run_loop_; |
| 128 run_loop_ = NULL; | 128 run_loop_ = NULL; |
| 129 } | 129 } |
| 130 } | 130 } |
| 131 | 131 |
| 132 bool MessagePumpForUI::IsRedundantQuitExpected() { |
| 133 return false; |
| 134 } |
| 135 |
| 132 void MessagePumpForUI::ScheduleWork() { | 136 void MessagePumpForUI::ScheduleWork() { |
| 133 DCHECK(!system_message_handler_obj_.is_null()); | 137 DCHECK(!system_message_handler_obj_.is_null()); |
| 134 | 138 |
| 135 JNIEnv* env = base::android::AttachCurrentThread(); | 139 JNIEnv* env = base::android::AttachCurrentThread(); |
| 136 DCHECK(env); | 140 DCHECK(env); |
| 137 | 141 |
| 138 Java_SystemMessageHandler_scheduleWork(env, | 142 Java_SystemMessageHandler_scheduleWork(env, |
| 139 system_message_handler_obj_.obj()); | 143 system_message_handler_obj_.obj()); |
| 140 } | 144 } |
| 141 | 145 |
| (...skipping 11 matching lines...) Expand all Loading... |
| 153 system_message_handler_obj_.obj(), | 157 system_message_handler_obj_.obj(), |
| 154 delayed_work_time.ToInternalValue(), millis); | 158 delayed_work_time.ToInternalValue(), millis); |
| 155 } | 159 } |
| 156 | 160 |
| 157 // static | 161 // static |
| 158 bool MessagePumpForUI::RegisterBindings(JNIEnv* env) { | 162 bool MessagePumpForUI::RegisterBindings(JNIEnv* env) { |
| 159 return RegisterNativesImpl(env); | 163 return RegisterNativesImpl(env); |
| 160 } | 164 } |
| 161 | 165 |
| 162 } // namespace base | 166 } // namespace base |
| OLD | NEW |