There's a new pattern emerging that allows the controls to be placed in a 48dp high bar, with everything vertically centered: https://folio.googleplex.com/chrome-ux-specs-and-sources/Clank%20-%20Material%20design/Preview%20and%20Specs/_specs#%2FSPECS-Infobar-04%20Compact%20InfoBar.png%3Fz=width Adjust the implementation to allow this.
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/7bc9bd3a6fa05f39eab314b3193e2ba382e96b45 commit 7bc9bd3a6fa05f39eab314b3193e2ba382e96b45 Author: dfalcantara <dfalcantara@chromium.org> Date: Mon Mar 27 18:26:04 2017 ❄ Add InfoBarCompactLayout Adds the ability to create infobars that are "compact": * Adds an InfoBarCompactLayout that is basically a LinearLayout: it sandwiches custom controls in a 48dp high bar between an optional icon and a close button. * Pull out code that creates the icon ImageView and the close ImageButton so that it can be reused. * Add the ability for InfoBar subclasses to define whether or not they produce these compact infobars. * Add some stub code to TranslateCompactInfoBar that allows uses this code. This CL is meant to unblock the Sydney team from progressing; refinements to the way InfoBar uses the InfoBarCompactaLayout and the InfoBarLayout classes are forthcoming (along with a doc). Screenshots: https://drive.google.com/corp/drive/u/0/folders/0B7c8ZkXVwskDUmlESWpyZHRoeUk BUG= 705312 Review-Url: https://codereview.chromium.org/2767523002 Cr-Commit-Position: refs/heads/master@{#459834} [modify] https://crrev.com/7bc9bd3a6fa05f39eab314b3193e2ba382e96b45/chrome/android/java/res/values/dimens.xml [modify] https://crrev.com/7bc9bd3a6fa05f39eab314b3193e2ba382e96b45/chrome/android/java/src/org/chromium/chrome/browser/infobar/InfoBar.java [add] https://crrev.com/7bc9bd3a6fa05f39eab314b3193e2ba382e96b45/chrome/android/java/src/org/chromium/chrome/browser/infobar/InfoBarCompactLayout.java [modify] https://crrev.com/7bc9bd3a6fa05f39eab314b3193e2ba382e96b45/chrome/android/java/src/org/chromium/chrome/browser/infobar/InfoBarLayout.java [modify] https://crrev.com/7bc9bd3a6fa05f39eab314b3193e2ba382e96b45/chrome/android/java/src/org/chromium/chrome/browser/infobar/TranslateCompactInfoBar.java [modify] https://crrev.com/7bc9bd3a6fa05f39eab314b3193e2ba382e96b45/chrome/android/java_sources.gni
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/ee3cd20ca02aa2b2e00e96f125c10bb84cfb92eb commit ee3cd20ca02aa2b2e00e96f125c10bb84cfb92eb Author: dfalcantara <dfalcantara@chromium.org> Date: Wed Apr 05 20:40:17 2017 ❄ Infobar links Get rid of the copy-pasta by forcing all linkifying code to do the same thing: show a clickable non-underlined blue link. Also fixes how some infobars were inheriting from the (admittedly) screwy Java infobar hierarchy. BUG= 705312 Review-Url: https://codereview.chromium.org/2804443002 Cr-Commit-Position: refs/heads/master@{#462205} [modify] https://crrev.com/ee3cd20ca02aa2b2e00e96f125c10bb84cfb92eb/chrome/android/java/src/org/chromium/chrome/browser/infobar/ConfirmInfoBar.java [modify] https://crrev.com/ee3cd20ca02aa2b2e00e96f125c10bb84cfb92eb/chrome/android/java/src/org/chromium/chrome/browser/infobar/GeneratedPasswordSavedInfoBar.java [modify] https://crrev.com/ee3cd20ca02aa2b2e00e96f125c10bb84cfb92eb/chrome/android/java/src/org/chromium/chrome/browser/infobar/InfoBarLayout.java [modify] https://crrev.com/ee3cd20ca02aa2b2e00e96f125c10bb84cfb92eb/chrome/android/java/src/org/chromium/chrome/browser/infobar/SearchGeolocationDisclosureInfoBar.java [modify] https://crrev.com/ee3cd20ca02aa2b2e00e96f125c10bb84cfb92eb/chrome/android/java/src/org/chromium/chrome/browser/infobar/SubresourceFilterExperimentalInfoBar.java [modify] https://crrev.com/ee3cd20ca02aa2b2e00e96f125c10bb84cfb92eb/chrome/android/java/src/org/chromium/chrome/browser/infobar/UpdatePasswordInfoBar.java
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/0a929145b1f3d51656a53582749a90123528963b commit 0a929145b1f3d51656a53582749a90123528963b Author: dfalcantara <dfalcantara@chromium.org> Date: Thu Apr 06 03:05:18 2017 ❄ Unify infobar spannable creation Infobars were creating spannable links in two different ways. Unify them. Note that this means that no links (except the weirdo ones in the translate infobars) will be underlined; apparently this is how they were specced. BUG= 705312 Review-Url: https://codereview.chromium.org/2802783003 Cr-Commit-Position: refs/heads/master@{#462337} [modify] https://crrev.com/0a929145b1f3d51656a53582749a90123528963b/chrome/android/java/src/org/chromium/chrome/browser/infobar/InfoBarLayout.java
Comment 1 by bugdroid1@chromium.org
, Mar 27 2017