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

Issue 2361633002: android: Introduce DisplayAndroid (Closed)

Created:
4 years, 3 months ago by boliu
Modified:
4 years, 2 months ago
CC:
chromium-reviews
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

android: Introduce DisplayAndroid DisplayAndroid is the Display abstraction. It will eventually replace all usage of DeviceDisplayInfo. Main difference is DeviceDisplayInfo assumes there is only one display, whereas DisplayAndroid can support many. Move ScreenOrientationListener to the ui layer as an implementation detail. Rewrote the tests to use CallbackHelper. BUG=625089 Committed: https://crrev.com/16136c0600c027d8dac41a3871f687851fd8d773 Cr-Commit-Position: refs/heads/master@{#423363}

Patch Set 1 #

Patch Set 2 : content shell compiles #

Patch Set 3 : delete existing tests #

Patch Set 4 : tests #

Patch Set 5 : contextual search #

Patch Set 6 : reverse landscape #

Patch Set 7 : moar null checks #

Patch Set 8 : clean ups #

Patch Set 9 : remove refcounting #

Patch Set 10 : remove deprecation #

Patch Set 11 : fix clang bot #

Total comments: 19

Patch Set 12 : add back reverse_portrait #

Patch Set 13 : review #

Patch Set 14 : DisplayAndroidManager sans rename #

Patch Set 15 : rename to DisplayAndroidManager #

Patch Set 16 : Observer->DisplayAndroidObserver #

Total comments: 19

Patch Set 17 : reviews #

Patch Set 18 : test comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+639 lines, -825 lines) Patch
M content/public/android/BUILD.gn View 1 2 3 4 5 6 7 8 2 chunks +0 lines, -2 lines 0 comments Download
M content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 12 chunks +49 lines, -9 lines 0 comments Download
D content/public/android/java/src/org/chromium/content/browser/ScreenOrientationListener.java View 1 1 chunk +0 lines, -354 lines 0 comments Download
M content/public/android/java/src/org/chromium/content/browser/ScreenOrientationProvider.java View 1 3 chunks +3 lines, -2 lines 0 comments Download
M content/public/android/javatests/src/org/chromium/content/browser/ScreenOrientationListenerTest.java View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +176 lines, -146 lines 0 comments Download
M content/public/android/javatests/src/org/chromium/content/browser/ScreenOrientationProviderTest.java View 1 2 3 1 chunk +0 lines, -244 lines 0 comments Download
M content/public/test/android/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 2 chunks +1 line, -2 lines 0 comments Download
D content/public/test/android/javatests/src/org/chromium/content/browser/test/util/MockOrientationObserver.java View 1 2 3 1 chunk +0 lines, -22 lines 0 comments Download
D content/public/test/android/javatests/src/org/chromium/content/browser/test/util/OrientationChangeObserverCriteria.java View 1 2 3 1 chunk +0 lines, -42 lines 0 comments Download
M content/shell/android/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 1 chunk +1 line, -0 lines 0 comments Download
M ui/android/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +2 lines, -0 lines 0 comments Download
M ui/android/java/src/org/chromium/ui/base/WindowAndroid.java View 1 2 3 4 5 6 7 8 4 chunks +10 lines, -0 lines 0 comments Download
A ui/android/java/src/org/chromium/ui/display/DisplayAndroid.java View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +156 lines, -0 lines 0 comments Download
A ui/android/java/src/org/chromium/ui/display/DisplayAndroidManager.java View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +237 lines, -0 lines 0 comments Download
M ui/android/java/src/org/chromium/ui/gfx/DeviceDisplayInfo.java View 1 2 3 4 5 6 7 8 9 3 chunks +4 lines, -2 lines 0 comments Download

Messages

Total messages: 34 (21 generated)
boliu
PTAL tedchoc to review everything mlamouri since I'm moving and rewriting your code :p
4 years, 2 months ago (2016-09-30 03:49:21 UTC) #7
boliu
Removed explicit refcounting and just use onDisplayRemoved instead, as Ted suggested in person. Also fixed ...
4 years, 2 months ago (2016-10-03 18:02:17 UTC) #15
Ted C
https://codereview.chromium.org/2361633002/diff/190001/ui/android/java/src/org/chromium/ui/display/DisplayAndroid.java File ui/android/java/src/org/chromium/ui/display/DisplayAndroid.java (right): https://codereview.chromium.org/2361633002/diff/190001/ui/android/java/src/org/chromium/ui/display/DisplayAndroid.java#newcode28 ui/android/java/src/org/chromium/ui/display/DisplayAndroid.java:28: private static final Observer[] sEmptyObserverArray = new Observer[0]; static ...
4 years, 2 months ago (2016-10-04 20:01:13 UTC) #20
boliu
https://codereview.chromium.org/2361633002/diff/190001/ui/android/java/src/org/chromium/ui/display/DisplayAndroid.java File ui/android/java/src/org/chromium/ui/display/DisplayAndroid.java (right): https://codereview.chromium.org/2361633002/diff/190001/ui/android/java/src/org/chromium/ui/display/DisplayAndroid.java#newcode28 ui/android/java/src/org/chromium/ui/display/DisplayAndroid.java:28: private static final Observer[] sEmptyObserverArray = new Observer[0]; On ...
4 years, 2 months ago (2016-10-04 23:11:31 UTC) #21
boliu
https://codereview.chromium.org/2361633002/diff/190001/ui/android/java/src/org/chromium/ui/display/DisplayAndroid.java File ui/android/java/src/org/chromium/ui/display/DisplayAndroid.java (right): https://codereview.chromium.org/2361633002/diff/190001/ui/android/java/src/org/chromium/ui/display/DisplayAndroid.java#newcode39 ui/android/java/src/org/chromium/ui/display/DisplayAndroid.java:39: Display display = getDisplayFromContext(context); On 2016/10/04 23:11:30, boliu wrote: ...
4 years, 2 months ago (2016-10-04 23:20:20 UTC) #22
boliu
https://codereview.chromium.org/2361633002/diff/190001/ui/android/java/src/org/chromium/ui/display/DisplayAndroid.java File ui/android/java/src/org/chromium/ui/display/DisplayAndroid.java (right): https://codereview.chromium.org/2361633002/diff/190001/ui/android/java/src/org/chromium/ui/display/DisplayAndroid.java#newcode39 ui/android/java/src/org/chromium/ui/display/DisplayAndroid.java:39: Display display = getDisplayFromContext(context); On 2016/10/04 23:20:19, boliu wrote: ...
4 years, 2 months ago (2016-10-04 23:23:04 UTC) #23
boliu
Ok, all done as discussed in person I think. But split into multiple patch sets ...
4 years, 2 months ago (2016-10-05 01:30:21 UTC) #24
Ted C
this definitely feels right to me...last round of comments and I think we're good to ...
4 years, 2 months ago (2016-10-05 16:47:27 UTC) #25
boliu
https://codereview.chromium.org/2361633002/diff/290001/content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java File content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java (right): https://codereview.chromium.org/2361633002/diff/290001/content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java#newcode707 content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java:707: onRotationChanged(windowAndroid.getDisplay().getRotation()); On 2016/10/05 16:47:26, Ted C wrote: > is ...
4 years, 2 months ago (2016-10-05 20:05:08 UTC) #26
Ted C
lgtm
4 years, 2 months ago (2016-10-05 23:24:27 UTC) #27
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/2361633002/330001
4 years, 2 months ago (2016-10-05 23:38:32 UTC) #30
commit-bot: I haz the power
Committed patchset #18 (id:330001)
4 years, 2 months ago (2016-10-06 00:55:48 UTC) #32
commit-bot: I haz the power
4 years, 2 months ago (2016-10-06 00:58:37 UTC) #34
Message was sent while issue was closed.
Patchset 18 (id:??) landed as
https://crrev.com/16136c0600c027d8dac41a3871f687851fd8d773
Cr-Commit-Position: refs/heads/master@{#423363}

Powered by Google App Engine
This is Rietveld 408576698