CC:
chromium-reviews, David Trainor- moved to gerrit, ntp-dev+reviews_chromium.org, tfarina, browser-components-watch_chromium.org, noyau+watch_chromium.org, agrieve+watch_chromium.org
[Home] Allow bottom sheet content to update handle color
This change adds some plumbing to allow the toolbars of the bottom
sheet to update the handle color based on their state. The
BottomSheetContent interface has been updated to allow the bottom
sheet to query the current handle color if a custom toolbar is
showing and each toolbar has a reference to the bottom sheet to
request an update.
BUG=712689
Review-Url: https://codereview.chromium.org/2833573002
Cr-Commit-Position: refs/heads/master@{#466164}
Committed: https://chromium.googlesource.com/chromium/src/+/3de25d5d2440ec1df7c04ec0b3fa639450bd6105
Description was changed from ========== [Home] Allow bottom sheet content to update handle color This ...
3 years, 8 months ago
(2017-04-19 20:15:42 UTC)
#1
Description was changed from
==========
[Home] Allow bottom sheet content to update handle color
This change adds some plumbing to allow the toolbars of the bottom
sheet to update the handle color based on their state. The
BottomSheetContent interface has been updated to allow the bottom
sheet to query the current handle color if a custom toolbar is
showing and each toolbar has a reference to the bottom sheet to
request an update.
BUG=712689
==========
to
==========
[Home] Allow bottom sheet content to update handle color
This change adds some plumbing to allow the toolbars of the bottom
sheet to update the handle color based on their state. The
BottomSheetContent interface has been updated to allow the bottom
sheet to query the current handle color if a custom toolbar is
showing and each toolbar has a reference to the bottom sheet to
request an update.
BUG=712689
==========
There are some other options to this implementation that don't necessarily involve the sheet content ...
3 years, 8 months ago
(2017-04-19 20:17:57 UTC)
#3
There are some other options to this implementation that don't necessarily
involve the sheet content knowing about the specific kind of toolbar, ptal.
Theresa
I would prefer the selection widgets not to have a hard dependency on BottomSheet. Rather, ...
3 years, 8 months ago
(2017-04-19 21:28:29 UTC)
#4
I would prefer the selection widgets not to have a hard dependency on
BottomSheet. Rather, I'd like BookmarkSheetContent, DownloadSheetContent, and
HistorySheetContent own the connection with the bottom sheet.
What if the SelectableListToolbar had an observer interface (with unfortunately
only one method for now), like:
Observer {
void onToolbarColorChanged(boolean isBackgroundLightColor);
}
*SheetContent could add an observer to the toolbar and call into the BottomSheet
to update the tint when it does.
https://codereview.chromium.org/2833573002/diff/1/chrome/android/java/src/org...
File
chrome/android/java/src/org/chromium/chrome/browser/widget/bottomsheet/BottomSheet.java
(right):
https://codereview.chromium.org/2833573002/diff/1/chrome/android/java/src/org...
chrome/android/java/src/org/chromium/chrome/browser/widget/bottomsheet/BottomSheet.java:577:
mDefaultToolbarView.updateHandleTint(isLight);
I'm interpreting isUsingLightToolbar() to mean that the toolbar itself is light
(e.g. grey or white), which would be we should use a dark handle.
Based on the method names, I would expect:
isUsingLightToolbar() -> updateHandleTint(useLightHandle = false)
mdjones
Added observers so BottomSheet isn't being passed everywhere. https://codereview.chromium.org/2833573002/diff/1/chrome/android/java/src/org/chromium/chrome/browser/widget/bottomsheet/BottomSheet.java File chrome/android/java/src/org/chromium/chrome/browser/widget/bottomsheet/BottomSheet.java (right): https://codereview.chromium.org/2833573002/diff/1/chrome/android/java/src/org/chromium/chrome/browser/widget/bottomsheet/BottomSheet.java#newcode577 chrome/android/java/src/org/chromium/chrome/browser/widget/bottomsheet/BottomSheet.java:577: mDefaultToolbarView.updateHandleTint(isLight); ...
3 years, 8 months ago
(2017-04-19 22:49:45 UTC)
#5
Added observers so BottomSheet isn't being passed everywhere.
https://codereview.chromium.org/2833573002/diff/1/chrome/android/java/src/org...
File
chrome/android/java/src/org/chromium/chrome/browser/widget/bottomsheet/BottomSheet.java
(right):
https://codereview.chromium.org/2833573002/diff/1/chrome/android/java/src/org...
chrome/android/java/src/org/chromium/chrome/browser/widget/bottomsheet/BottomSheet.java:577:
mDefaultToolbarView.updateHandleTint(isLight);
On 2017/04/19 21:28:29, Theresa wrote:
> I'm interpreting isUsingLightToolbar() to mean that the toolbar itself is
light
> (e.g. grey or white), which would be we should use a dark handle.
>
> Based on the method names, I would expect:
> isUsingLightToolbar() -> updateHandleTint(useLightHandle = false)
Yeah, I some of the names got confised. Fixed.
Theresa
lgtm https://codereview.chromium.org/2833573002/diff/20001/chrome/android/java/src/org/chromium/chrome/browser/download/DownloadSheetContent.java File chrome/android/java/src/org/chromium/chrome/browser/download/DownloadSheetContent.java (right): https://codereview.chromium.org/2833573002/diff/20001/chrome/android/java/src/org/chromium/chrome/browser/download/DownloadSheetContent.java#newcode81 chrome/android/java/src/org/chromium/chrome/browser/download/DownloadSheetContent.java:81: public boolean isUsingLightToolbar() { nit: should this be ...
3 years, 8 months ago
(2017-04-19 23:48:48 UTC)
#6
CQ is committing da patch. Bot data: {"patchset_id": 40001, "attempt_start_ts": 1492724281396660, "parent_rev": "0c12d093e94c924034f682abe7e7f643453fd28c", "commit_rev": "3de25d5d2440ec1df7c04ec0b3fa639450bd6105"}
3 years, 8 months ago
(2017-04-20 22:28:27 UTC)
#13
CQ is committing da patch.
Bot data: {"patchset_id": 40001, "attempt_start_ts": 1492724281396660,
"parent_rev": "0c12d093e94c924034f682abe7e7f643453fd28c", "commit_rev":
"3de25d5d2440ec1df7c04ec0b3fa639450bd6105"}
commit-bot: I haz the power
Description was changed from ========== [Home] Allow bottom sheet content to update handle color This ...
3 years, 8 months ago
(2017-04-20 22:28:40 UTC)
#14
Message was sent while issue was closed.
Description was changed from
==========
[Home] Allow bottom sheet content to update handle color
This change adds some plumbing to allow the toolbars of the bottom
sheet to update the handle color based on their state. The
BottomSheetContent interface has been updated to allow the bottom
sheet to query the current handle color if a custom toolbar is
showing and each toolbar has a reference to the bottom sheet to
request an update.
BUG=712689
==========
to
==========
[Home] Allow bottom sheet content to update handle color
This change adds some plumbing to allow the toolbars of the bottom
sheet to update the handle color based on their state. The
BottomSheetContent interface has been updated to allow the bottom
sheet to query the current handle color if a custom toolbar is
showing and each toolbar has a reference to the bottom sheet to
request an update.
BUG=712689
Review-Url: https://codereview.chromium.org/2833573002
Cr-Commit-Position: refs/heads/master@{#466164}
Committed:
https://chromium.googlesource.com/chromium/src/+/3de25d5d2440ec1df7c04ec0b3fa...
==========
commit-bot: I haz the power
Committed patchset #3 (id:40001) as https://chromium.googlesource.com/chromium/src/+/3de25d5d2440ec1df7c04ec0b3fa639450bd6105
3 years, 8 months ago
(2017-04-20 22:28:41 UTC)
#15
Issue 2833573002: 🏠 Allow bottom sheet content to update handle color
(Closed)
Created 3 years, 8 months ago by mdjones
Modified 3 years, 8 months ago
Reviewers: Theresa, gone
Base URL:
Comments: 6