Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(31)

Side by Side Diff: base/message_loop/message_pump_android.cc

Issue 319053006: Calling Shutdown() for Android content_browsertests. Removed webrtc test hack. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Replaced boilerplate code w/BrowserMain() invocation. Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 system_message_handler_obj_.Reset( 110 system_message_handler_obj_.Reset(
111 Java_SystemMessageHandler_create( 111 Java_SystemMessageHandler_create(
112 env, reinterpret_cast<intptr_t>(delegate))); 112 env, reinterpret_cast<intptr_t>(delegate)));
113 } 113 }
114 114
115 void MessagePumpForUI::Quit() { 115 void MessagePumpForUI::Quit() {
116 if (!system_message_handler_obj_.is_null()) { 116 if (!system_message_handler_obj_.is_null()) {
117 JNIEnv* env = base::android::AttachCurrentThread(); 117 JNIEnv* env = base::android::AttachCurrentThread();
118 DCHECK(env); 118 DCHECK(env);
119 119
120 Java_SystemMessageHandler_removeScheduledWork(env, 120 Java_SystemMessageHandler_removeAllPendingMessages(env,
121 system_message_handler_obj_.obj()); 121 system_message_handler_obj_.obj());
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 }
(...skipping 22 matching lines...) Expand all
153 system_message_handler_obj_.obj(), 153 system_message_handler_obj_.obj(),
154 delayed_work_time.ToInternalValue(), millis); 154 delayed_work_time.ToInternalValue(), millis);
155 } 155 }
156 156
157 // static 157 // static
158 bool MessagePumpForUI::RegisterBindings(JNIEnv* env) { 158 bool MessagePumpForUI::RegisterBindings(JNIEnv* env) {
159 return RegisterNativesImpl(env); 159 return RegisterNativesImpl(env);
160 } 160 }
161 161
162 } // namespace base 162 } // namespace base
OLDNEW
« no previous file with comments | « base/android/java/src/org/chromium/base/SystemMessageHandler.java ('k') | content/browser/browser_main_runner.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698