Update views infobars to correctly layout with any of their labels empty. This
commitd78341f52fe8495db3310792993891637e78d71a
authorpkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>
Tue, 31 Dec 2013 01:05:23 +0000 (31 01:05 +0000)
committerpkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>
Tue, 31 Dec 2013 01:05:23 +0000 (31 01:05 +0000)
tree9d562bb85ed991fe2f56ad8cd2dbab54ded7806c
parent5c38bafbf04d6196493d4bec1a851b45a1c07d12
Update views infobars to correctly layout with any of their labels empty.  This
might happen depending on the locale or with certain confirm infobar subclasses.
To make this slightly simpler to code, ConfirmInfoBar now creates |link_|
unconditionally instead of only when non-empty.

This also adjusts AfterTranslateInfoBar::ContentMinimumWidth() to correctly
handle the |autodetermined_source_language_| case, in which some of the controls
don't appear.

Finally, this tweaks the translate infobars so that buttons which appear after
all the other text/buttons are spaced out using kEndOfLabelSpacing instead of
kButtonInLabelSpacing.  This looks better as logically these buttons aren't part
of the preceding "sentence".

BUG=none
TEST=none
R=msw@chromium.org

Review URL: https://codereview.chromium.org/122523002

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@242744 0039d316-1c4b-4281-b951-d872f2087c98
chrome/browser/ui/views/infobars/after_translate_infobar.cc
chrome/browser/ui/views/infobars/before_translate_infobar.cc
chrome/browser/ui/views/infobars/confirm_infobar.cc
chrome/browser/ui/views/infobars/translate_message_infobar.cc