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

Issue 2753963002: Refactoring and rewriting the chromoting jni instance to be chromoting session. (Closed)

Created:
3 years, 9 months ago by nicholss
Modified:
3 years, 8 months ago
Reviewers:
Yuwei, Lambros
CC:
chromium-reviews, chromoting-reviews_chromium.org
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Refactoring and rewriting the chromoting jni instance to be chromoting session. This will allow Android and iOS to share the majority of code related to session and instance management. The setup flow for each client will be very similar, this change will allow the iOS app to reuse the session management (xmpp, client, etc) that was originally written for the JNI layer of Android. Adding a session delegate allows for reuse and moves most of the code into a common place and leaves the java/JNI only bits in the JNI layer. BUG=699788 Review-Url: https://codereview.chromium.org/2753963002 Cr-Commit-Position: refs/heads/master@{#462154} Committed: https://chromium.googlesource.com/chromium/src/+/a6be869a25aa4de4c6b4629a1b710e5d34f8fd34

Patch Set 1 #

Patch Set 2 : A build file change snuck in here. Removing. #

Patch Set 3 : Removing change. #

Patch Set 4 : Merged with master. #

Patch Set 5 : Fixing jni_client, missing the android audio member. #

Patch Set 6 : Pointer not obj. #

Total comments: 38

Patch Set 7 : Update based on feedback. #

Patch Set 8 : Merge with master. #

Total comments: 4

Patch Set 9 : Jni Runtime Delegate needed a weakptr factory. #

Patch Set 10 : Never included JniRuntimeDelegate, fixed. #

Patch Set 11 : WeakPtr Factory now makes type ChromotingClientRuntime::Delegate. #

Total comments: 2

Patch Set 12 : JNI client is the session delegate. #

Total comments: 1

Patch Set 13 : Release audio_player on the network thread. #

Total comments: 4

Patch Set 14 : Moving dep on dom_keycode_converter to client. #

Patch Set 15 : Fixing override missing per chromium style. #

Patch Set 16 : Reworking where stats logs are printed to the log file. #

Patch Set 17 : Fixed feedback. #

Total comments: 32

Patch Set 18 : Updating based on feedback. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+522 lines, -1581 lines) Patch
M remoting/BUILD.gn View 1 2 3 4 5 6 7 1 chunk +2 lines, -0 lines 0 comments Download
M remoting/client/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 5 chunks +9 lines, -4 lines 0 comments Download
M remoting/client/chromoting_client_runtime.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 2 chunks +7 lines, -1 line 0 comments Download
A + remoting/client/chromoting_session.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 8 chunks +55 lines, -31 lines 0 comments Download
A + remoting/client/chromoting_session.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 19 chunks +96 lines, -143 lines 0 comments Download
D remoting/client/client_status_logger.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +0 lines, -62 lines 0 comments Download
D remoting/client/client_status_logger.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +0 lines, -144 lines 0 comments Download
D remoting/client/client_status_logger_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +0 lines, -156 lines 0 comments Download
M remoting/client/client_telemetry_logger.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +2 lines, -0 lines 0 comments Download
M remoting/client/client_telemetry_logger.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 2 chunks +32 lines, -0 lines 0 comments Download
A + remoting/client/connect_to_host_info.h View 2 chunks +3 lines, -3 lines 0 comments Download
A + remoting/client/connect_to_host_info.cc View 1 chunk +1 line, -1 line 0 comments Download
M remoting/client/ios/bridge/client_instance.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 2 chunks +7 lines, -4 lines 0 comments Download
M remoting/client/ios/bridge/client_instance.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 5 chunks +6 lines, -6 lines 0 comments Download
M remoting/client/jni/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +0 lines, -8 lines 0 comments Download
D remoting/client/jni/android_keymap.h View 1 chunk +0 lines, -25 lines 0 comments Download
D remoting/client/jni/android_keymap.cc View 1 chunk +0 lines, -215 lines 0 comments Download
D remoting/client/jni/chromoting_jni_instance.h View 1 2 3 1 chunk +0 lines, -200 lines 0 comments Download
D remoting/client/jni/chromoting_jni_instance.cc View 1 2 3 1 chunk +0 lines, -505 lines 0 comments Download
D remoting/client/jni/connect_to_host_info.h View 1 chunk +0 lines, -34 lines 0 comments Download
D remoting/client/jni/connect_to_host_info.cc View 1 chunk +0 lines, -14 lines 0 comments Download
M remoting/client/jni/jni_client.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 4 chunks +19 lines, -15 lines 0 comments Download
M remoting/client/jni/jni_client.cc View 1 2 3 4 5 6 7 8 9 10 11 12 6 chunks +36 lines, -9 lines 0 comments Download
M remoting/client/jni/jni_runtime_delegate.h View 1 2 3 9 10 11 1 chunk +1 line, -1 line 0 comments Download
A remoting/client/native_device_keymap.h View 1 2 3 4 5 6 1 chunk +17 lines, -0 lines 0 comments Download
A remoting/client/native_device_keymap.cc View 1 chunk +14 lines, -0 lines 0 comments Download
A remoting/client/native_device_keymap_android.cc View 1 2 3 4 5 6 1 chunk +215 lines, -0 lines 0 comments Download

Messages

Total messages: 161 (134 generated)
nicholss
PTAL, I will address comments next week. Wanted to give a chance for review. Thanks!
3 years, 9 months ago (2017-03-21 14:39:26 UTC) #36
Yuwei
https://codereview.chromium.org/2753963002/diff/140001/remoting/BUILD.gn File remoting/BUILD.gn (right): https://codereview.chromium.org/2753963002/diff/140001/remoting/BUILD.gn#newcode172 remoting/BUILD.gn:172: libs += [ "android" ] Why is this needed? ...
3 years, 9 months ago (2017-03-21 20:40:30 UTC) #37
Lambros
https://codereview.chromium.org/2753963002/diff/140001/remoting/client/chromoting_client_runtime.h File remoting/client/chromoting_client_runtime.h (right): https://codereview.chromium.org/2753963002/diff/140001/remoting/client/chromoting_client_runtime.h#newcode90 remoting/client/chromoting_client_runtime.h:90: // TODO(nicholss): Auththreads will be leaked because they depend ...
3 years, 9 months ago (2017-03-24 00:07:15 UTC) #38
nicholss
Thanks for the feedback, I have updated some code and added some questions, PTAL, thanks! ...
3 years, 8 months ago (2017-03-29 20:32:36 UTC) #39
Yuwei
https://codereview.chromium.org/2753963002/diff/140001/remoting/client/chromoting_session.cc File remoting/client/chromoting_session.cc (right): https://codereview.chromium.org/2753963002/diff/140001/remoting/client/chromoting_session.cc#newcode299 remoting/client/chromoting_session.cc:299: VLOG(1) << "Route: " << message.c_str(); On 2017/03/29 20:32:35, ...
3 years, 8 months ago (2017-03-29 21:52:15 UTC) #51
Yuwei
https://codereview.chromium.org/2753963002/diff/220001/remoting/client/jni/jni_client.cc File remoting/client/jni/jni_client.cc (right): https://codereview.chromium.org/2753963002/diff/220001/remoting/client/jni/jni_client.cc#newcode61 remoting/client/jni/jni_client.cc:61: GetWeakPtr(), display_handler_->CreateCursorShapeStub(), GetWeakPtr() should be the JniRuntimeDelegate
3 years, 8 months ago (2017-03-29 22:55:27 UTC) #54
nicholss
https://codereview.chromium.org/2753963002/diff/220001/remoting/client/jni/jni_client.cc File remoting/client/jni/jni_client.cc (right): https://codereview.chromium.org/2753963002/diff/220001/remoting/client/jni/jni_client.cc#newcode61 remoting/client/jni/jni_client.cc:61: GetWeakPtr(), display_handler_->CreateCursorShapeStub(), On 2017/03/29 22:55:27, Yuwei wrote: > GetWeakPtr() ...
3 years, 8 months ago (2017-03-29 23:34:53 UTC) #55
Yuwei
https://codereview.chromium.org/2753963002/diff/220001/remoting/client/jni/jni_client.cc File remoting/client/jni/jni_client.cc (right): https://codereview.chromium.org/2753963002/diff/220001/remoting/client/jni/jni_client.cc#newcode61 remoting/client/jni/jni_client.cc:61: GetWeakPtr(), display_handler_->CreateCursorShapeStub(), On 2017/03/29 23:34:53, nicholss wrote: > On ...
3 years, 8 months ago (2017-03-29 23:56:29 UTC) #58
nicholss
On 2017/03/29 23:56:29, Yuwei wrote: > https://codereview.chromium.org/2753963002/diff/220001/remoting/client/jni/jni_client.cc > File remoting/client/jni/jni_client.cc (right): > > https://codereview.chromium.org/2753963002/diff/220001/remoting/client/jni/jni_client.cc#newcode61 > ...
3 years, 8 months ago (2017-03-30 17:02:25 UTC) #65
Yuwei
https://codereview.chromium.org/2753963002/diff/220001/remoting/client/jni/jni_client.cc File remoting/client/jni/jni_client.cc (right): https://codereview.chromium.org/2753963002/diff/220001/remoting/client/jni/jni_client.cc#newcode61 remoting/client/jni/jni_client.cc:61: GetWeakPtr(), display_handler_->CreateCursorShapeStub(), On 2017/03/29 23:34:53, nicholss wrote: > On ...
3 years, 8 months ago (2017-03-30 19:02:57 UTC) #72
Yuwei
App should build after you make all of these three changes. I tried to apply ...
3 years, 8 months ago (2017-03-30 19:18:39 UTC) #73
nicholss
On 2017/03/30 19:02:57, Yuwei wrote: > https://codereview.chromium.org/2753963002/diff/220001/remoting/client/jni/jni_client.cc > File remoting/client/jni/jni_client.cc (right): > > https://codereview.chromium.org/2753963002/diff/220001/remoting/client/jni/jni_client.cc#newcode61 > ...
3 years, 8 months ago (2017-03-30 19:57:34 UTC) #74
Yuwei
https://codereview.chromium.org/2753963002/diff/320001/remoting/client/jni/jni_client.cc File remoting/client/jni/jni_client.cc (right): https://codereview.chromium.org/2753963002/diff/320001/remoting/client/jni/jni_client.cc#newcode80 remoting/client/jni/jni_client.cc:80: audio_player_.reset(); You will need to delete audio_player_ on the ...
3 years, 8 months ago (2017-03-30 21:18:56 UTC) #79
nicholss
On 2017/03/30 21:18:56, Yuwei wrote: > https://codereview.chromium.org/2753963002/diff/320001/remoting/client/jni/jni_client.cc > File remoting/client/jni/jni_client.cc (right): > > https://codereview.chromium.org/2753963002/diff/320001/remoting/client/jni/jni_client.cc#newcode80 > ...
3 years, 8 months ago (2017-03-30 21:27:16 UTC) #81
nicholss
The changes I have had to make in the last few patches are related to ...
3 years, 8 months ago (2017-03-31 21:57:59 UTC) #103
nicholss
Updated the logging to use #if defines, I think other comments have been addressed. The ...
3 years, 8 months ago (2017-04-03 17:37:16 UTC) #125
Yuwei
Will it be easier to provide a function in remoting/base/logging like this: LogClientInfo(component, message) { ...
3 years, 8 months ago (2017-04-03 19:29:22 UTC) #138
nicholss
On 2017/04/03 19:29:22, Yuwei wrote: > Will it be easier to provide a function in ...
3 years, 8 months ago (2017-04-03 19:45:16 UTC) #139
Yuwei
On 2017/04/03 19:45:16, nicholss wrote: > On 2017/04/03 19:29:22, Yuwei wrote: > > Will it ...
3 years, 8 months ago (2017-04-03 20:49:59 UTC) #143
nicholss
On 2017/04/03 20:49:59, Yuwei wrote: > On 2017/04/03 19:45:16, nicholss wrote: > > On 2017/04/03 ...
3 years, 8 months ago (2017-04-03 21:03:32 UTC) #144
nicholss
https://codereview.chromium.org/2753963002/diff/340001/remoting/client/chromoting_client_runtime.h File remoting/client/chromoting_client_runtime.h (right): https://codereview.chromium.org/2753963002/diff/340001/remoting/client/chromoting_client_runtime.h#newcode90 remoting/client/chromoting_client_runtime.h:90: // TODO(nicholss): AuthThreads will be leaked because they depend ...
3 years, 8 months ago (2017-04-03 21:03:53 UTC) #145
Yuwei
LGTM once comments are addressed. https://codereview.chromium.org/2753963002/diff/550001/remoting/client/client_telemetry_logger.cc File remoting/client/client_telemetry_logger.cc (right): https://codereview.chromium.org/2753963002/diff/550001/remoting/client/client_telemetry_logger.cc#newcode100 remoting/client/client_telemetry_logger.cc:100: VLOG(1) << base::StringPrintf( What ...
3 years, 8 months ago (2017-04-03 21:40:46 UTC) #146
nicholss
Lambros: Please take another look. Thanks. https://codereview.chromium.org/2753963002/diff/550001/remoting/client/client_telemetry_logger.cc File remoting/client/client_telemetry_logger.cc (right): https://codereview.chromium.org/2753963002/diff/550001/remoting/client/client_telemetry_logger.cc#newcode100 remoting/client/client_telemetry_logger.cc:100: VLOG(1) << base::StringPrintf( ...
3 years, 8 months ago (2017-04-03 21:56:00 UTC) #147
Lambros
lgtm https://codereview.chromium.org/2753963002/diff/550001/remoting/client/chromoting_session.cc File remoting/client/chromoting_session.cc (right): https://codereview.chromium.org/2753963002/diff/550001/remoting/client/chromoting_session.cc#newcode7 remoting/client/chromoting_session.cc:7: #if defined(OS_ANDROID) Conditional #include should be after the ...
3 years, 8 months ago (2017-04-05 01:31:19 UTC) #150
nicholss
Thanks for the review! https://codereview.chromium.org/2753963002/diff/550001/remoting/client/chromoting_session.cc File remoting/client/chromoting_session.cc (right): https://codereview.chromium.org/2753963002/diff/550001/remoting/client/chromoting_session.cc#newcode7 remoting/client/chromoting_session.cc:7: #if defined(OS_ANDROID) On 2017/04/05 01:31:19, ...
3 years, 8 months ago (2017-04-05 17:24:26 UTC) #153
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2753963002/570001
3 years, 8 months ago (2017-04-05 18:29:05 UTC) #158
commit-bot: I haz the power
3 years, 8 months ago (2017-04-05 18:40:10 UTC) #161
Message was sent while issue was closed.
Committed patchset #18 (id:570001) as
https://chromium.googlesource.com/chromium/src/+/a6be869a25aa4de4c6b4629a1b71...

Powered by Google App Engine
This is Rietveld 408576698