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

Issue 1537183002: Refactor Chromoting JNI code to use jni/Client (Java changes only). (Closed)

Created:
5 years ago by Lambros
Modified:
4 years, 10 months ago
Reviewers:
Sergey Ulanov, joedow
CC:
chromium-reviews, chromoting-reviews_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Reland: Refactor Chromoting JNI code to use jni/Client (Java changes only). CL was reverted as the FindBugs step broke on an internal builder. Relanding with FB suppression. Original CL description: This removes globals from jni/JniInterface in favor of passing a jni/Client instance to code that needs to access the Chromoting client connection. The C++ code is unchanged - JniInterface class is still used to marshall Java <-> C++ calls. JniInterface still holds a singleton Client connection, but all other globals have been removed (including the singleton CapabilityManager instance). Each Activity's onCreate() method gets the singleton Client instance, and then passes it to objects that need it (for input injection and so on). This should make it easier to use a fake Client instance for unit-instrumentation tests. BUG=526336, 585799 Committed: https://crrev.com/40e8dff71ae626f479e7356515d7bfce0b9b68b0 Cr-Commit-Position: refs/heads/master@{#374924}

Patch Set 1 #

Total comments: 22

Patch Set 2 : rebase #

Patch Set 3 : Move singleton from JniInterface to Client #

Patch Set 4 : Update some comments #

Total comments: 8

Patch Set 5 : rebase #

Patch Set 6 : address comments #

Patch Set 7 : fix tests #

Patch Set 8 : Suppress FindBugs warning #

Unified diffs Side-by-side diffs Delta from patch set Stats (+568 lines, -380 lines) Patch
M remoting/android/java/src/org/chromium/chromoting/CapabilityManager.java View 4 chunks +1 line, -23 lines 0 comments Download
M remoting/android/java/src/org/chromium/chromoting/Chromoting.java View 1 2 3 4 5 5 chunks +23 lines, -4 lines 0 comments Download
M remoting/android/java/src/org/chromium/chromoting/Desktop.java View 1 2 3 4 5 14 chunks +29 lines, -24 lines 0 comments Download
M remoting/android/java/src/org/chromium/chromoting/DesktopView.java View 9 chunks +18 lines, -10 lines 0 comments Download
M remoting/android/java/src/org/chromium/chromoting/SessionAuthenticator.java View 1 2 5 chunks +10 lines, -6 lines 0 comments Download
M remoting/android/java/src/org/chromium/chromoting/SessionConnector.java View 1 2 3 4 3 chunks +6 lines, -5 lines 0 comments Download
M remoting/android/java/src/org/chromium/chromoting/SimulatedTouchInputStrategy.java View 6 chunks +7 lines, -5 lines 0 comments Download
M remoting/android/java/src/org/chromium/chromoting/TouchInputStrategy.java View 3 chunks +8 lines, -5 lines 0 comments Download
M remoting/android/java/src/org/chromium/chromoting/TrackpadInputStrategy.java View 5 chunks +7 lines, -5 lines 0 comments Download
M remoting/android/java/src/org/chromium/chromoting/cardboard/CardboardRenderer.java View 7 chunks +9 lines, -7 lines 0 comments Download
M remoting/android/java/src/org/chromium/chromoting/cardboard/Cursor.java View 6 chunks +8 lines, -5 lines 0 comments Download
M remoting/android/java/src/org/chromium/chromoting/cardboard/Desktop.java View 5 chunks +7 lines, -4 lines 0 comments Download
M remoting/android/java/src/org/chromium/chromoting/cardboard/DesktopActivity.java View 1 2 3 4 5 8 chunks +13 lines, -9 lines 0 comments Download
M remoting/android/java/src/org/chromium/chromoting/jni/Client.java View 1 2 3 4 5 6 7 2 chunks +374 lines, -2 lines 0 comments Download
M remoting/android/java/src/org/chromium/chromoting/jni/JniInterface.java View 1 2 3 4 5 10 chunks +44 lines, -265 lines 0 comments Download
M remoting/android/javatests/src/org/chromium/chromoting/TouchInputStrategyTest.java View 1 2 3 4 5 6 1 chunk +4 lines, -1 line 0 comments Download

Messages

Total messages: 32 (13 generated)
Lambros
sergeyu: Overall review joedow: Anything that impacts Touch/Tracking mode. Please could you test to make ...
5 years ago (2015-12-19 03:15:51 UTC) #2
Sergey Ulanov
https://codereview.chromium.org/1537183002/diff/1/remoting/android/java/src/org/chromium/chromoting/Chromoting.java File remoting/android/java/src/org/chromium/chromoting/Chromoting.java (right): https://codereview.chromium.org/1537183002/diff/1/remoting/android/java/src/org/chromium/chromoting/Chromoting.java#newcode434 remoting/android/java/src/org/chromium/chromoting/Chromoting.java:434: Client client = JniInterface.createClient(); Can this be replaced with ...
5 years ago (2015-12-21 17:58:15 UTC) #3
joedow
https://codereview.chromium.org/1537183002/diff/1/remoting/android/java/src/org/chromium/chromoting/jni/Client.java File remoting/android/java/src/org/chromium/chromoting/jni/Client.java (right): https://codereview.chromium.org/1537183002/diff/1/remoting/android/java/src/org/chromium/chromoting/jni/Client.java#newcode48 remoting/android/java/src/org/chromium/chromoting/jni/Client.java:48: /** Whether the native code is attempting a connection. ...
4 years, 11 months ago (2016-01-19 16:35:06 UTC) #4
Lambros
ptal https://codereview.chromium.org/1537183002/diff/1/remoting/android/java/src/org/chromium/chromoting/Chromoting.java File remoting/android/java/src/org/chromium/chromoting/Chromoting.java (right): https://codereview.chromium.org/1537183002/diff/1/remoting/android/java/src/org/chromium/chromoting/Chromoting.java#newcode434 remoting/android/java/src/org/chromium/chromoting/Chromoting.java:434: Client client = JniInterface.createClient(); On 2015/12/21 17:58:15, Sergey ...
4 years, 10 months ago (2016-01-29 23:58:26 UTC) #5
Sergey Ulanov
https://codereview.chromium.org/1537183002/diff/60001/remoting/android/java/src/org/chromium/chromoting/Chromoting.java File remoting/android/java/src/org/chromium/chromoting/Chromoting.java (right): https://codereview.chromium.org/1537183002/diff/60001/remoting/android/java/src/org/chromium/chromoting/Chromoting.java#newcode341 remoting/android/java/src/org/chromium/chromoting/Chromoting.java:341: Client.getClient().destroy(); keep the Client object created in connectToHost() (i.e. ...
4 years, 10 months ago (2016-01-30 01:03:24 UTC) #6
Lambros
https://codereview.chromium.org/1537183002/diff/60001/remoting/android/java/src/org/chromium/chromoting/Chromoting.java File remoting/android/java/src/org/chromium/chromoting/Chromoting.java (right): https://codereview.chromium.org/1537183002/diff/60001/remoting/android/java/src/org/chromium/chromoting/Chromoting.java#newcode341 remoting/android/java/src/org/chromium/chromoting/Chromoting.java:341: Client.getClient().destroy(); On 2016/01/30 01:03:23, Sergey Ulanov wrote: > keep ...
4 years, 10 months ago (2016-02-03 22:57:43 UTC) #7
Sergey Ulanov
lgtm https://codereview.chromium.org/1537183002/diff/60001/remoting/android/java/src/org/chromium/chromoting/Desktop.java File remoting/android/java/src/org/chromium/chromoting/Desktop.java (right): https://codereview.chromium.org/1537183002/diff/60001/remoting/android/java/src/org/chromium/chromoting/Desktop.java#newcode104 remoting/android/java/src/org/chromium/chromoting/Desktop.java:104: mClient = Client.getClient(); On 2016/02/03 22:57:43, Lambros wrote: ...
4 years, 10 months ago (2016-02-08 22:05:16 UTC) #8
Lambros
https://codereview.chromium.org/1537183002/diff/60001/remoting/android/java/src/org/chromium/chromoting/Desktop.java File remoting/android/java/src/org/chromium/chromoting/Desktop.java (right): https://codereview.chromium.org/1537183002/diff/60001/remoting/android/java/src/org/chromium/chromoting/Desktop.java#newcode104 remoting/android/java/src/org/chromium/chromoting/Desktop.java:104: mClient = Client.getClient(); On 2016/02/08 22:05:16, Sergey Ulanov wrote: ...
4 years, 10 months ago (2016-02-08 23:48:51 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1537183002/100001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1537183002/100001
4 years, 10 months ago (2016-02-09 02:19:00 UTC) #11
commit-bot: I haz the power
Try jobs failed on following builders: android_chromium_gn_compile_rel on tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/android_chromium_gn_compile_rel/builds/19245)
4 years, 10 months ago (2016-02-09 03:12:17 UTC) #13
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1537183002/120001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1537183002/120001
4 years, 10 months ago (2016-02-09 23:54:08 UTC) #16
commit-bot: I haz the power
Committed patchset #7 (id:120001)
4 years, 10 months ago (2016-02-10 00:38:26 UTC) #17
commit-bot: I haz the power
Patchset 7 (id:??) landed as https://crrev.com/22ee9b8426839b0c2c841fbc919cd4a79b1456d0 Cr-Commit-Position: refs/heads/master@{#374548}
4 years, 10 months ago (2016-02-10 00:39:58 UTC) #19
hartmanng
A revert of this CL (patchset #7 id:120001) has been created in https://codereview.chromium.org/1687873002/ by hartmanng@chromium.org. ...
4 years, 10 months ago (2016-02-10 14:59:08 UTC) #20
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1537183002/140001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1537183002/140001
4 years, 10 months ago (2016-02-11 01:15:57 UTC) #24
commit-bot: I haz the power
Try jobs failed on following builders: android_chromium_gn_compile_rel on tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/android_chromium_gn_compile_rel/builds/20593)
4 years, 10 months ago (2016-02-11 02:13:37 UTC) #26
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1537183002/140001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1537183002/140001
4 years, 10 months ago (2016-02-11 17:57:21 UTC) #28
commit-bot: I haz the power
Committed patchset #8 (id:140001)
4 years, 10 months ago (2016-02-11 19:39:27 UTC) #30
commit-bot: I haz the power
4 years, 10 months ago (2016-02-16 22:36:16 UTC) #32
Message was sent while issue was closed.
Patchset 8 (id:??) landed as
https://crrev.com/40e8dff71ae626f479e7356515d7bfce0b9b68b0
Cr-Commit-Position: refs/heads/master@{#374924}

Powered by Google App Engine
This is Rietveld 408576698