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

Unified Diff: base/test/android/test_system_message_handler_link_android.h

Issue 2169553002: Properly throw java exceptions from shouldOverrideUrlLoading (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix trybot compilation failure. 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 side-by-side diff with in-line comments
Download patch
Index: base/test/android/test_system_message_handler_link_android.h
diff --git a/base/test/android/test_system_message_handler_link_android.h b/base/test/android/test_system_message_handler_link_android.h
new file mode 100644
index 0000000000000000000000000000000000000000..52d77b52f72255cf1f8e261ca63665c0a5380f00
--- /dev/null
+++ b/base/test/android/test_system_message_handler_link_android.h
@@ -0,0 +1,43 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef BASE_TEST_SYSTEM_MESSAGE_HANDLER_LINK_ANDROID_H
+#define BASE_TEST_SYSTEM_MESSAGE_HANDLER_LINK_ANDROID_H
+
+#include <jni.h>
+
+#include "base/android/scoped_java_ref.h"
+#include "base/message_loop/message_pump.h"
+
+namespace base {
+
+class MessagePumpForUI;
+class WaitableEvent;
+
+namespace android {
+class TestJavaMessageHandlerFactory;
+
+// This provides a link to (a way to create) the java-side
+// TestSystemMessageHandler class.
+class TestSystemMessageHandlerLink {
+ public:
+ static bool RegisterJNI(JNIEnv* env);
+
+ private:
+ friend class base::android::TestJavaMessageHandlerFactory;
+
+ TestSystemMessageHandlerLink() = delete;
+ ~TestSystemMessageHandlerLink() = delete;
+
+ static base::android::ScopedJavaLocalRef<jobject>
+ CreateTestSystemMessageHandler(JNIEnv* env,
+ base::MessagePump::Delegate* delegate,
+ MessagePumpForUI* message_pump,
+ WaitableEvent* test_done_event);
+};
+
+} // namespace android
+} // namespace base
+
+#endif // BASE_TEST_SYSTEM_MESSAGE_HANDLER_LINK_ANDROID_H
« no previous file with comments | « base/test/android/java_handler_thread_for_testing.cc ('k') | base/test/android/test_system_message_handler_link_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698