From 80ea37d8369d4c6dc5a3fc64271762f97092629b Mon Sep 17 00:00:00 2001 From: "jcivelli@chromium.org" Date: Tue, 29 Jun 2010 18:45:02 +0000 Subject: 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 --- chrome/browser/views/infobars/infobar_text_button.cc | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'chrome/browser/views/infobars/infobar_text_button.cc') 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() { } -- cgit v1.1