|
android: Java-based launcher thread
A major part of android's ChildProcessLauncher is implemented in Java
so having an easy access to the launcher thread is important.
Refactor JavaHandlerThread in base so that that java part can be created
first, and then connected with native peer after consutrction. This is
needed because the launcher thread can be used before native library is
loaded.
Add LauncherThread in content which is a simple wrapper around
JavaHandlerThread. Then for android, override the launcher thread
message loop. Note this means the launcher thread will no longer be
joined on shutdown, but this is not a problem in practice since android
never does clean shutdowns.
Convert two cases of random background threads in ChildProcessLauncher
to use LauncherThread. There are more in the future.
BUG= 701442
Review-Url: https://codereview.chromium.org/2774363003
Cr-Commit-Position: refs/heads/master@{#460509}
Committed: https://chromium.googlesource.com/chromium/src/+/61687ec5b7b5dce1c9c86ae46f552c0c34473555
Total comments: 8
Total comments: 2
Total comments: 9
Total comments: 11
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+283 lines, -42 lines) |
Patch |
 |
M |
base/BUILD.gn
|
View
|
1
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
 |
M |
base/android/java/src/org/chromium/base/JavaHandlerThread.java
|
View
|
1
|
4 chunks |
+25 lines, -7 lines |
0 comments
|
Download
|
 |
M |
base/android/java_handler_thread.h
|
View
|
|
1 chunk |
+6 lines, -1 line |
0 comments
|
Download
|
 |
M |
base/android/java_handler_thread.cc
|
View
|
|
2 chunks |
+12 lines, -8 lines |
0 comments
|
Download
|
 |
M |
base/message_loop/message_loop_unittest.cc
|
View
|
1
2
3
|
3 chunks |
+22 lines, -9 lines |
0 comments
|
Download
|
 |
M |
base/test/BUILD.gn
|
View
|
1
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
 |
A |
base/test/android/java/src/org/chromium/base/JavaHandlerThreadTest.java
|
View
|
1
2
|
1 chunk |
+48 lines, -0 lines |
0 comments
|
Download
|
 |
M |
base/test/android/java_handler_thread_for_testing.h
|
View
|
1
2
3
4
|
2 chunks |
+14 lines, -2 lines |
0 comments
|
Download
|
 |
M |
base/test/android/java_handler_thread_for_testing.cc
|
View
|
1
2
3
|
3 chunks |
+24 lines, -3 lines |
0 comments
|
Download
|
 |
M |
content/browser/BUILD.gn
|
View
|
1
2
3
|
1 chunk |
+2 lines, -0 lines |
0 comments
|
Download
|
 |
A |
content/browser/android/launcher_thread.h
|
View
|
1
|
1 chunk |
+32 lines, -0 lines |
0 comments
|
Download
|
 |
A |
content/browser/android/launcher_thread.cc
|
View
|
1
|
1 chunk |
+27 lines, -0 lines |
0 comments
|
Download
|
 |
M |
content/browser/browser_main_loop.cc
|
View
|
1
2
3
4
|
8 chunks |
+23 lines, -6 lines |
0 comments
|
Download
|
 |
M |
content/browser/browser_process_sub_thread.h
|
View
|
|
1 chunk |
+2 lines, -0 lines |
0 comments
|
Download
|
 |
M |
content/browser/browser_process_sub_thread.cc
|
View
|
|
1 chunk |
+6 lines, -2 lines |
0 comments
|
Download
|
 |
M |
content/public/android/BUILD.gn
|
View
|
1
2
3
|
2 chunks |
+2 lines, -0 lines |
0 comments
|
Download
|
 |
M |
content/public/android/java/src/org/chromium/content/browser/ChildProcessLauncher.java
|
View
|
1
|
4 chunks |
+3 lines, -4 lines |
0 comments
|
Download
|
 |
A |
content/public/android/java/src/org/chromium/content/browser/LauncherThread.java
|
View
|
1
|
1 chunk |
+33 lines, -0 lines |
0 comments
|
Download
|
Total messages: 34 (16 generated)
|