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

Issue 2625923002: Introduce the bottom sheet class for Chrome Home (Closed)

Created:
3 years, 11 months ago by mdjones
Modified:
3 years, 11 months ago
CC:
chromium-reviews, agrieve+watch_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Introduce the bottom sheet class for Chrome Home This change introduces the swipe/scroll logic for the bottom sheet (BottomSheet.java) as well as a placeholder for its content. The sheet can be moved to 3 states -- peeking, half expanded, and fully expanded -- and will move to the nearest one when released in between any of them. The sheet will only intercept swipes in the up and down direction until it is moving, then it will follow the user's finger until released. If the sheet is fully expanded, upward swipes will not be intercepted. Likewise for downward swipes when the sheet is in its peeking state. This means that all of the current gestures that the toolbar supports still function when the sheet is in the peeking state. BUG=671361 Review-Url: https://codereview.chromium.org/2625923002 Cr-Commit-Position: refs/heads/master@{#444868} Committed: https://chromium.googlesource.com/chromium/src/+/f45d9fc526bf93ab943315b26432f101d7a1e6ed

Patch Set 1 #

Total comments: 28

Patch Set 2 : move gatherTransparentRegion work around #

Patch Set 3 : address comments #

Patch Set 4 : rebase #

Total comments: 16

Patch Set 5 : address comments #

Patch Set 6 : javadoc #

Total comments: 8

Patch Set 7 : address comments #

Patch Set 8 : fix findbugs #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+467 lines, -40 lines) Patch
M chrome/android/java/res/layout/bottom_control_container.xml View 1 2 3 4 5 6 7 1 chunk +45 lines, -31 lines 0 comments Download
M chrome/android/java/src/org/chromium/chrome/browser/ChromeActivity.java View 1 2 3 4 4 chunks +8 lines, -9 lines 0 comments Download
A chrome/android/java/src/org/chromium/chrome/browser/widget/BottomSheet.java View 1 2 3 4 5 6 7 1 chunk +413 lines, -0 lines 1 comment Download
M chrome/android/java_sources.gni View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download

Dependent Patchsets:

Messages

Total messages: 27 (10 generated)
mdjones
Looking for initial thoughts. ptal
3 years, 11 months ago (2017-01-11 01:00:12 UTC) #2
Ian Wen
Looks impressive! https://codereview.chromium.org/2625923002/diff/1/chrome/android/java/res/layout/bottom_control_container.xml File chrome/android/java/res/layout/bottom_control_container.xml (right): https://codereview.chromium.org/2625923002/diff/1/chrome/android/java/res/layout/bottom_control_container.xml#newcode13 chrome/android/java/res/layout/bottom_control_container.xml:13: android:id="@+id/bottom_sheet_content_wrapper" This linear layout might not be ...
3 years, 11 months ago (2017-01-11 19:46:54 UTC) #3
mdjones
https://codereview.chromium.org/2625923002/diff/1/chrome/android/java/res/layout/bottom_control_container.xml File chrome/android/java/res/layout/bottom_control_container.xml (right): https://codereview.chromium.org/2625923002/diff/1/chrome/android/java/res/layout/bottom_control_container.xml#newcode13 chrome/android/java/res/layout/bottom_control_container.xml:13: android:id="@+id/bottom_sheet_content_wrapper" On 2017/01/11 19:46:53, Ian Wen wrote: > This ...
3 years, 11 months ago (2017-01-12 21:26:58 UTC) #4
mdjones
+dfalcantara
3 years, 11 months ago (2017-01-13 19:58:47 UTC) #6
Ian Wen
I've some small suggestions for this CL but overall this is a great change. lgtm. ...
3 years, 11 months ago (2017-01-17 18:39:48 UTC) #7
mdjones
https://codereview.chromium.org/2625923002/diff/60001/chrome/android/java/src/org/chromium/chrome/browser/ChromeActivity.java File chrome/android/java/src/org/chromium/chrome/browser/ChromeActivity.java (right): https://codereview.chromium.org/2625923002/diff/60001/chrome/android/java/src/org/chromium/chrome/browser/ChromeActivity.java#newcode359 chrome/android/java/src/org/chromium/chrome/browser/ChromeActivity.java:359: ControlContainer controlContainer = null; On 2017/01/17 18:39:47, Ian Wen ...
3 years, 11 months ago (2017-01-17 21:29:46 UTC) #8
gone
lgtm % questions https://codereview.chromium.org/2625923002/diff/60001/chrome/android/java/res/layout/bottom_control_container.xml File chrome/android/java/res/layout/bottom_control_container.xml (right): https://codereview.chromium.org/2625923002/diff/60001/chrome/android/java/res/layout/bottom_control_container.xml#newcode11 chrome/android/java/res/layout/bottom_control_container.xml:11: android:orientation="vertical" > Given that BottomSheet is ...
3 years, 11 months ago (2017-01-19 18:00:42 UTC) #9
mdjones
https://codereview.chromium.org/2625923002/diff/100001/chrome/android/java/src/org/chromium/chrome/browser/widget/BottomSheet.java File chrome/android/java/src/org/chromium/chrome/browser/widget/BottomSheet.java (right): https://codereview.chromium.org/2625923002/diff/100001/chrome/android/java/src/org/chromium/chrome/browser/widget/BottomSheet.java#newcode35 chrome/android/java/src/org/chromium/chrome/browser/widget/BottomSheet.java:35: public static final int STATE_PEEK = 0; On 2017/01/19 ...
3 years, 11 months ago (2017-01-19 18:52:50 UTC) #10
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/2625923002/120001
3 years, 11 months ago (2017-01-19 18:53:36 UTC) #13
commit-bot: I haz the power
Try jobs failed on following builders: android_clang_dbg_recipe on master.tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/android_clang_dbg_recipe/builds/197253)
3 years, 11 months ago (2017-01-19 20:49:43 UTC) #15
mdjones
https://codereview.chromium.org/2625923002/diff/60001/chrome/android/java/res/layout/bottom_control_container.xml File chrome/android/java/res/layout/bottom_control_container.xml (right): https://codereview.chromium.org/2625923002/diff/60001/chrome/android/java/res/layout/bottom_control_container.xml#newcode11 chrome/android/java/res/layout/bottom_control_container.xml:11: android:orientation="vertical" > On 2017/01/19 18:00:41, dfalcantara (load balance plz) ...
3 years, 11 months ago (2017-01-19 21:49:08 UTC) #16
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/2625923002/140001
3 years, 11 months ago (2017-01-19 21:49:42 UTC) #19
commit-bot: I haz the power
Committed patchset #8 (id:140001) as https://chromium.googlesource.com/chromium/src/+/f45d9fc526bf93ab943315b26432f101d7a1e6ed
3 years, 11 months ago (2017-01-19 22:49:40 UTC) #22
Bernhard Bauer
https://codereview.chromium.org/2625923002/diff/140001/chrome/android/java/src/org/chromium/chrome/browser/widget/BottomSheet.java File chrome/android/java/src/org/chromium/chrome/browser/widget/BottomSheet.java (right): https://codereview.chromium.org/2625923002/diff/140001/chrome/android/java/src/org/chromium/chrome/browser/widget/BottomSheet.java#newcode218 chrome/android/java/src/org/chromium/chrome/browser/widget/BottomSheet.java:218: region.setEmpty(); Drive-by: I would be very careful with this ...
3 years, 11 months ago (2017-01-25 12:02:28 UTC) #24
mdjones
On 2017/01/25 12:02:28, Bernhard Bauer wrote: > https://codereview.chromium.org/2625923002/diff/140001/chrome/android/java/src/org/chromium/chrome/browser/widget/BottomSheet.java > File chrome/android/java/src/org/chromium/chrome/browser/widget/BottomSheet.java > (right): > > ...
3 years, 11 months ago (2017-01-25 16:31:20 UTC) #25
Bernhard Bauer
On 2017/01/25 16:31:20, mdjones wrote: > On 2017/01/25 12:02:28, Bernhard Bauer wrote: > > > ...
3 years, 11 months ago (2017-01-25 17:59:27 UTC) #26
mdjones
3 years, 11 months ago (2017-01-26 00:38:06 UTC) #27
Message was sent while issue was closed.
On 2017/01/25 17:59:27, Bernhard Bauer wrote:
> On 2017/01/25 16:31:20, mdjones wrote:
> > On 2017/01/25 12:02:28, Bernhard Bauer wrote:
> > >
> >
>
https://codereview.chromium.org/2625923002/diff/140001/chrome/android/java/sr...
> > > File
> > chrome/android/java/src/org/chromium/chrome/browser/widget/BottomSheet.java
> > > (right):
> > > 
> > >
> >
>
https://codereview.chromium.org/2625923002/diff/140001/chrome/android/java/sr...
> > >
> >
>
chrome/android/java/src/org/chromium/chrome/browser/widget/BottomSheet.java:218:
> > > region.setEmpty();
> > > Drive-by: I would be very careful with this -- the region passed here is
not
> > > used in isolation, but instead the method is called for every view in
> sequence
> > > with the same region, which means you can clobber some other view's
> > transparent
> > > region. In particular, you are saying here that nothing in the whole
region
> > > (which means everything the activity draws on the screen) is transparent,
> > which
> > > is I think not the case if the web content SurfaceView is visible.
> > 
> > I realize that the implemented solution is not correct, the problem is that
> > function is not called at the same rate as the sheet is animating causing
the
> it
> > to be clipped. I need to find out how to trigger that call and have it run
as
> > part of the animation update. This is definitely something I am coming back
> to.
> 
> OK, I see. Given that the whole point of gatherTransparentRegion is to find
out
> when _everything_ is transparent (so the compositor can remove the non-surface
> layer), would it be sufficient to trigger a relayout when showing / hiding the
> toolbar?

If that is the case, I may take a different approach to this problem; I didn't
realize it only mattered when the whole screen is transparent. I'll try that
solution as one of my next patches.

Powered by Google App Engine
This is Rietveld 408576698