diff options
Diffstat (limited to 'chrome/browser/translate/translate_manager.cc')
-rw-r--r-- | chrome/browser/translate/translate_manager.cc | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/chrome/browser/translate/translate_manager.cc b/chrome/browser/translate/translate_manager.cc index 8c90bdf..9435786 100644 --- a/chrome/browser/translate/translate_manager.cc +++ b/chrome/browser/translate/translate_manager.cc @@ -75,13 +75,17 @@ void TranslateManager::Observe(NotificationType type, } case NotificationType::PAGE_TRANSLATED: { // Only add translate infobar if it doesn't exist; if it already exists, - // it would have received the same notification and acted accordingly. + // just update the state, the actual infobar would have received the same + // notification and update the visual display accordingly. TabContents* tab = Source<TabContents>(source).ptr(); int i; for (i = 0; i < tab->infobar_delegate_count(); ++i) { - InfoBarDelegate* info_bar = tab->GetInfoBarDelegateAt(i); - if (info_bar->AsTranslateInfoBarDelegate()) + TranslateInfoBarDelegate* info_bar = + tab->GetInfoBarDelegateAt(i)->AsTranslateInfoBarDelegate(); + if (info_bar) { + info_bar->UpdateState(TranslateInfoBarDelegate::kAfterTranslate); break; + } } if (i == tab->infobar_delegate_count()) { NavigationEntry* entry = tab->controller().GetActiveEntry(); |