Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(256)

Unified Diff: chrome/browser/ui/views/infobars/translate_infobar_base.cc

Issue 4767001: Make TabContents own its infobar delegates.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/views/infobars/translate_infobar_base.cc
===================================================================
--- chrome/browser/ui/views/infobars/translate_infobar_base.cc (revision 65711)
+++ chrome/browser/ui/views/infobars/translate_infobar_base.cc (working copy)
@@ -136,11 +136,12 @@
}
TranslateInfoBarDelegate* TranslateInfoBarBase::GetDelegate() const {
- return static_cast<TranslateInfoBarDelegate*>(delegate());
+ return delegate()->AsTranslateInfoBarDelegate();
}
const InfoBarBackground& TranslateInfoBarBase::GetBackground() const {
- return GetDelegate()->IsError() ? error_background_ : normal_background_;
+ return (delegate() && GetDelegate()->IsError()) ?
+ error_background_ : normal_background_;
}
void TranslateInfoBarBase::FadeBackground(gfx::Canvas* canvas,

Powered by Google App Engine
This is Rietveld 408576698