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

Issue 2132883002: [Remoting Android] Placeholder for DesktopView (Closed)

Created:
4 years, 5 months ago by Yuwei
Modified:
4 years, 5 months ago
Reviewers:
Lambros, Hzj_jie
CC:
Hzj_jie, 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

[Remoting Android] Placeholder for DesktopView Preparation for using OpenGL ES rendering component on Android. This CL leaves a FrameLayout placeholder for the DesktopView and creates the implementation specific DesktopView in runtime. BUG=385924 Committed: https://crrev.com/0822e24c49deda76b49076fe67f002ea8c66fc04 Cr-Commit-Position: refs/heads/master@{#404555}

Patch Set 1 #

Total comments: 12

Patch Set 2 : Resolve some feedbacks #

Patch Set 3 : Making DesktopViewInterface an abstract class of SurfaceView? #

Total comments: 10

Patch Set 4 : Reviewer's Feedback #

Patch Set 5 : Rebase ToT and do same fix for GlDisplay #

Total comments: 4
Unified diffs Side-by-side diffs Delta from patch set Stats (+124 lines, -130 lines) Patch
M remoting/android/client_java_tmpl.gni View 1 2 3 4 2 chunks +2 lines, -1 line 0 comments Download
M remoting/android/java/res/layout/desktop.xml View 1 chunk +1 line, -1 line 0 comments Download
A + remoting/android/java/src/org/chromium/chromoting/AbstractDesktopView.java View 1 2 3 1 chunk +21 lines, -14 lines 0 comments Download
M remoting/android/java/src/org/chromium/chromoting/Desktop.java View 1 2 3 chunks +5 lines, -3 lines 0 comments Download
M remoting/android/java/src/org/chromium/chromoting/DesktopCanvas.java View 1 2 2 chunks +2 lines, -2 lines 0 comments Download
M remoting/android/java/src/org/chromium/chromoting/DesktopView.java View 1 2 4 chunks +6 lines, -10 lines 2 comments Download
A remoting/android/java/src/org/chromium/chromoting/DesktopViewFactory.java View 1 2 1 chunk +18 lines, -0 lines 0 comments Download
M remoting/android/java/src/org/chromium/chromoting/DesktopViewInterface.java View 1 2 1 chunk +0 lines, -68 lines 0 comments Download
M remoting/android/java/src/org/chromium/chromoting/FeedbackAnimator.java View 1 2 1 chunk +1 line, -1 line 0 comments Download
M remoting/android/java/src/org/chromium/chromoting/TouchInputHandler.java View 1 2 3 chunks +3 lines, -3 lines 0 comments Download
M remoting/android/java/src/org/chromium/chromoting/cardboard/CardboardRenderer.java View 1 2 chunks +3 lines, -3 lines 0 comments Download
M remoting/android/java/src/org/chromium/chromoting/cardboard/Cursor.java View 1 1 chunk +2 lines, -2 lines 0 comments Download
M remoting/android/java/src/org/chromium/chromoting/cardboard/DesktopActivity.java View 1 1 chunk +5 lines, -1 line 0 comments Download
M remoting/android/java/src/org/chromium/chromoting/jni/Client.java View 1 2 3 4 chunks +15 lines, -13 lines 2 comments Download
M remoting/android/java/src/org/chromium/chromoting/jni/Display.java View 1 2 3 4 3 chunks +14 lines, -0 lines 0 comments Download
M remoting/android/java/src/org/chromium/chromoting/jni/GlDisplay.java View 1 2 3 4 2 chunks +14 lines, -0 lines 0 comments Download
M remoting/client/jni/jni_client.cc View 1 2 3 4 1 chunk +3 lines, -2 lines 0 comments Download
M remoting/client/jni/jni_display_handler.h View 1 1 chunk +1 line, -1 line 0 comments Download
M remoting/client/jni/jni_display_handler.cc View 1 1 chunk +4 lines, -2 lines 0 comments Download
M remoting/client/jni/jni_gl_display_handler.h View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M remoting/client/jni/jni_gl_display_handler.cc View 1 2 3 4 1 chunk +3 lines, -2 lines 0 comments Download

Messages

Total messages: 24 (8 generated)
Yuwei
PTAL https://codereview.chromium.org/2132883002/diff/1/remoting/android/java/src/org/chromium/chromoting/Desktop.java File remoting/android/java/src/org/chromium/chromoting/Desktop.java (left): https://codereview.chromium.org/2132883002/diff/1/remoting/android/java/src/org/chromium/chromoting/Desktop.java#oldcode166 remoting/android/java/src/org/chromium/chromoting/Desktop.java:166: DesktopView desktopView = (DesktopView) findViewById(R.id.desktop_view); This logic is ...
4 years, 5 months ago (2016-07-08 00:30:01 UTC) #2
Lambros
https://codereview.chromium.org/2132883002/diff/1/remoting/android/java/src/org/chromium/chromoting/Desktop.java File remoting/android/java/src/org/chromium/chromoting/Desktop.java (right): https://codereview.chromium.org/2132883002/diff/1/remoting/android/java/src/org/chromium/chromoting/Desktop.java#newcode109 remoting/android/java/src/org/chromium/chromoting/Desktop.java:109: mClient.getDisplay().createDesktopView(getApplicationContext()); When creating Views, it's important to use the ...
4 years, 5 months ago (2016-07-08 02:13:41 UTC) #3
Yuwei
ptal https://codereview.chromium.org/2132883002/diff/1/remoting/android/java/src/org/chromium/chromoting/Desktop.java File remoting/android/java/src/org/chromium/chromoting/Desktop.java (right): https://codereview.chromium.org/2132883002/diff/1/remoting/android/java/src/org/chromium/chromoting/Desktop.java#newcode109 remoting/android/java/src/org/chromium/chromoting/Desktop.java:109: mClient.getDisplay().createDesktopView(getApplicationContext()); On 2016/07/08 02:13:41, Lambros wrote: > When ...
4 years, 5 months ago (2016-07-08 19:58:56 UTC) #4
Lambros
lgtm https://codereview.chromium.org/2132883002/diff/1/remoting/android/java/src/org/chromium/chromoting/Desktop.java File remoting/android/java/src/org/chromium/chromoting/Desktop.java (right): https://codereview.chromium.org/2132883002/diff/1/remoting/android/java/src/org/chromium/chromoting/Desktop.java#newcode112 remoting/android/java/src/org/chromium/chromoting/Desktop.java:112: ((ViewGroup) findViewById(R.id.desktop_view_placeholder)).addView((View) remoteHostDesktop); On 2016/07/08 19:58:56, Yuwei wrote: ...
4 years, 5 months ago (2016-07-08 22:02:36 UTC) #5
Yuwei
https://codereview.chromium.org/2132883002/diff/1/remoting/android/java/src/org/chromium/chromoting/Desktop.java File remoting/android/java/src/org/chromium/chromoting/Desktop.java (right): https://codereview.chromium.org/2132883002/diff/1/remoting/android/java/src/org/chromium/chromoting/Desktop.java#newcode112 remoting/android/java/src/org/chromium/chromoting/Desktop.java:112: ((ViewGroup) findViewById(R.id.desktop_view_placeholder)).addView((View) remoteHostDesktop); On 2016/07/08 22:02:36, Lambros wrote: > ...
4 years, 5 months ago (2016-07-08 23:07:54 UTC) #6
Yuwei
https://codereview.chromium.org/2132883002/diff/1/remoting/android/java/src/org/chromium/chromoting/Desktop.java File remoting/android/java/src/org/chromium/chromoting/Desktop.java (right): https://codereview.chromium.org/2132883002/diff/1/remoting/android/java/src/org/chromium/chromoting/Desktop.java#newcode112 remoting/android/java/src/org/chromium/chromoting/Desktop.java:112: ((ViewGroup) findViewById(R.id.desktop_view_placeholder)).addView((View) remoteHostDesktop); On 2016/07/08 23:07:54, Yuwei wrote: > ...
4 years, 5 months ago (2016-07-08 23:35:53 UTC) #7
Yuwei
https://codereview.chromium.org/2132883002/diff/40001/remoting/android/java/src/org/chromium/chromoting/AbstractDesktopView.java File remoting/android/java/src/org/chromium/chromoting/AbstractDesktopView.java (right): https://codereview.chromium.org/2132883002/diff/40001/remoting/android/java/src/org/chromium/chromoting/AbstractDesktopView.java#newcode72 remoting/android/java/src/org/chromium/chromoting/AbstractDesktopView.java:72: /** An {@link Event} which is triggered when user ...
4 years, 5 months ago (2016-07-08 23:46:01 UTC) #8
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/2132883002/60001
4 years, 5 months ago (2016-07-08 23:56:54 UTC) #11
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/2132883002/80001
4 years, 5 months ago (2016-07-09 00:15:32 UTC) #15
commit-bot: I haz the power
Committed patchset #5 (id:80001)
4 years, 5 months ago (2016-07-09 01:13:18 UTC) #16
commit-bot: I haz the power
CQ bit was unchecked.
4 years, 5 months ago (2016-07-09 01:13:20 UTC) #17
commit-bot: I haz the power
Patchset 5 (id:??) landed as https://crrev.com/0822e24c49deda76b49076fe67f002ea8c66fc04 Cr-Commit-Position: refs/heads/master@{#404555}
4 years, 5 months ago (2016-07-09 01:15:23 UTC) #19
Hzj_jie
https://codereview.chromium.org/2132883002/diff/80001/remoting/android/java/src/org/chromium/chromoting/DesktopView.java File remoting/android/java/src/org/chromium/chromoting/DesktopView.java (right): https://codereview.chromium.org/2132883002/diff/80001/remoting/android/java/src/org/chromium/chromoting/DesktopView.java#newcode75 remoting/android/java/src/org/chromium/chromoting/DesktopView.java:75: public DesktopView(Context context, Display display) { Since we are ...
4 years, 5 months ago (2016-07-10 19:23:59 UTC) #21
Hzj_jie
Sorry, I have missed this code review on Friday. I have two comments regarding to ...
4 years, 5 months ago (2016-07-10 19:25:44 UTC) #22
Hzj_jie
And I cannot quite understand why you need to send the DesktopViewFactory through native code. ...
4 years, 5 months ago (2016-07-10 19:59:07 UTC) #23
Yuwei
4 years, 5 months ago (2016-07-11 00:17:09 UTC) #24
Message was sent while issue was closed.
For passing DesktopViewFactory to JNI, I think it can be simplified by passing
Client to createJavaDisplay and set up the DesktopViewFactory there.

I'll resolve your comments in a different CL. Thanks for reviewing this CL for
me :)

https://codereview.chromium.org/2132883002/diff/80001/remoting/android/java/s...
File remoting/android/java/src/org/chromium/chromoting/DesktopView.java (right):

https://codereview.chromium.org/2132883002/diff/80001/remoting/android/java/s...
remoting/android/java/src/org/chromium/chromoting/DesktopView.java:75: public
DesktopView(Context context, Display display) {
On 2016/07/10 19:23:59, Hzj_jie wrote:
> Since we are not using Android internal way to create AbstractDesktopView
> anymore, I would suggest to include Client in the constructor parameter, and
> remove init function.

Sure

https://codereview.chromium.org/2132883002/diff/80001/remoting/android/java/s...
File remoting/android/java/src/org/chromium/chromoting/jni/Client.java (right):

https://codereview.chromium.org/2132883002/diff/80001/remoting/android/java/s...
remoting/android/java/src/org/chromium/chromoting/jni/Client.java:52: private
void setDesktopViewFactory(DesktopViewFactory factory) {
On 2016/07/10 19:23:59, Hzj_jie wrote:
> Do we really need to have a DesktopViewFactory? It seems DesktopView would
only
> be created once. So you may be able to have a
> private void setDesktopView(AbstractDesktopView view)
> instead of
> private void setDesktopViewFactory(DesktopViewFactory factory)
> 
> Is my understanding correctly?

Activity will be destroyed and recreated when you rotate the screen, in which
case the view will be created for multiple times.

Also it needs an activity context when creating the view, which doesn't exist
when creating the Display.

Powered by Google App Engine
This is Rietveld 408576698