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

Side by Side Diff: base/test/android/java_handler_thread_for_testing.h

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 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 #ifndef BASE_ANDROID_JAVA_HANDLER_THREAD_FOR_TESTING_H_
6 #define BASE_ANDROID_JAVA_HANDLER_THREAD_FOR_TESTING_H_
7
8 #include "base/android/java_handler_thread.h"
9 #include "base/android/java_message_handler_factory.h"
10 #include "base/message_loop/message_loop.h"
11 #include "base/test/android/test_system_message_handler_link_android.h"
12
13 namespace base {
14
15 namespace android {
16
17 class TestJavaMessageHandlerFactory : public JavaMessageHandlerFactory {
nyquist 2016/08/18 15:50:03 Nit: Could you explain why this class exists?
gsennton 2016/08/18 18:56:54 Done.
18 base::android::ScopedJavaLocalRef<jobject> CreateMessageHandler(
19 JNIEnv* env,
20 base::MessagePump::Delegate* delegate,
21 MessagePumpForUI* message_pump,
22 WaitableEvent* test_done_event) override;
23 };
24
25 class JavaHandlerThreadForTesting : public JavaHandlerThread {
nyquist 2016/08/18 15:50:02 Nit: Could you add a comment as to what's special
gsennton 2016/08/18 18:56:54 Done.
26 public:
27 JavaHandlerThreadForTesting(const char* name,
28 base::WaitableEvent* test_done_event);
29 virtual ~JavaHandlerThreadForTesting();
30
31 void StartMessageLoop() override;
32 void StopMessageLoop() override;
33
34 private:
35 std::unique_ptr<JavaMessageHandlerFactory> message_handler_factory_;
36 base::WaitableEvent* test_done_event_;
37 };
38
39 } // namespace android
40 } // namespace base
41
42 #endif // BASE_ANDROID_JAVA_HANDLER_THREAD_FOR_TESTING_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698