diff options
author | jcivelli@chromium.org <jcivelli@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-06-29 18:45:02 +0000 |
---|---|---|
committer | jcivelli@chromium.org <jcivelli@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-06-29 18:45:02 +0000 |
commit | 80ea37d8369d4c6dc5a3fc64271762f97092629b (patch) | |
tree | 49c874a70cc004393afe1cfe233f441ddd4fa151 /chrome/browser/views/infobars/infobar_text_button.cc | |
parent | 2e1e8b56450c4cc0e4b5e5931a13aeea4d1d9922 (diff) | |
download | chromium_src-80ea37d8369d4c6dc5a3fc64271762f97092629b.zip chromium_src-80ea37d8369d4c6dc5a3fc64271762f97092629b.tar.gz chromium_src-80ea37d8369d4c6dc5a3fc64271762f97092629b.tar.bz2 |
Translate infobar always/never translate buttons
Adding extra buttons on the translate infobar to let user easily set the "never/always translate this language" property when they declined/accepted translation for a language more than 3 times.
Original review:
http://codereview.chromium.org/2825015/show
BUG=NONE
TEST=Visit a page in a foreign language, translate the page. Repeat 4 times. On the fourth time, the "before translate" infobar should show a button that says "always translate".
Similarly when declining translations 4 times.
Review URL: http://codereview.chromium.org/2835025
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@51148 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/views/infobars/infobar_text_button.cc')
-rw-r--r-- | chrome/browser/views/infobars/infobar_text_button.cc | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/chrome/browser/views/infobars/infobar_text_button.cc b/chrome/browser/views/infobars/infobar_text_button.cc index 35726d0..ebf5d22 100644 --- a/chrome/browser/views/infobars/infobar_text_button.cc +++ b/chrome/browser/views/infobars/infobar_text_button.cc @@ -22,6 +22,13 @@ InfoBarTextButton* InfoBarTextButton::CreateWithMessageID( l10n_util::GetStringUTF16(message_id)); } +// static +InfoBarTextButton* InfoBarTextButton::CreateWithMessageIDAndParam( + views::ButtonListener* listener, int message_id, const string16& param) { + return new InfoBarTextButton(listener, + l10n_util::GetStringFUTF16(message_id, param)); +} + InfoBarTextButton::~InfoBarTextButton() { } |