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

Side by Side Diff: base/test/android/test_system_message_handler_link_android.cc

Issue 2169553002: Properly throw java exceptions from shouldOverrideUrlLoading (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove unused includes in test_support_android.cc. Created 4 years, 4 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
(Empty)
1 // Copyright (c) 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "base/test/android/test_system_message_handler_link_android.h"
6
7 #include "base/message_loop/message_pump_android.h"
8 #include "base/synchronization/waitable_event.h"
9
nyquist 2016/08/18 15:50:03 Nit: Remove empty line.
gsennton 2016/08/18 18:56:54 Done.
10 #include "jni/TestSystemMessageHandler_jni.h"
11
12 namespace base {
13 namespace android {
14
15 base::android::ScopedJavaLocalRef<jobject>
16 TestSystemMessageHandlerLink::createTestSystemMessageHandler(
17 JNIEnv* env,
18 base::MessagePump::Delegate* delegate,
19 MessagePumpForUI* message_pump,
20 WaitableEvent* test_done_event) {
21 return Java_TestSystemMessageHandler_create(
22 env, reinterpret_cast<intptr_t>(delegate),
23 reinterpret_cast<intptr_t>(message_pump),
24 reinterpret_cast<intptr_t>(test_done_event));
25 }
26
27 bool TestSystemMessageHandlerLink::RegisterJNI(JNIEnv* env) {
28 return RegisterNativesImpl(env);
29 }
30
31 static void NotifyTestDone(JNIEnv* env,
32 const base::android::JavaParamRef<jclass>& jcaller,
33 jlong native_waitable_test_event) {
34 WaitableEvent* event =
35 reinterpret_cast<WaitableEvent*>(native_waitable_test_event);
36 DCHECK(event);
37 event->Signal();
38 }
39
40 } // namespace android
41 } // namespace base
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698