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

Unified Diff: chrome/browser/ui/cocoa/infobars/alternate_nav_infobar_controller.mm

Issue 12017031: infobars: Remove the downcast AsAlternateNavInfoBarDelegate() function. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 11 months 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/cocoa/infobars/alternate_nav_infobar_controller.mm
diff --git a/chrome/browser/ui/cocoa/infobars/alternate_nav_infobar_controller.mm b/chrome/browser/ui/cocoa/infobars/alternate_nav_infobar_controller.mm
index 17726f540a924c99f505b65b95f0eaf7dc9674ab..ba8aa7b7fd42b5960d7bea5407594cf58269766f 100644
--- a/chrome/browser/ui/cocoa/infobars/alternate_nav_infobar_controller.mm
+++ b/chrome/browser/ui/cocoa/infobars/alternate_nav_infobar_controller.mm
@@ -25,7 +25,7 @@
[self removeButtons];
AlternateNavInfoBarDelegate* delegate =
- delegate_->AsAlternateNavInfoBarDelegate();
+ static_cast<AlternateNavInfoBarDelegate*>(delegate_);
DCHECK(delegate);
size_t offset = string16::npos;
string16 message = delegate->GetMessageTextWithOffset(&offset);
@@ -49,7 +49,9 @@
return;
WindowOpenDisposition disposition =
event_utils::WindowOpenDispositionFromNSEvent([NSApp currentEvent]);
- if (delegate_->AsAlternateNavInfoBarDelegate()->LinkClicked(disposition))
+ AlternateNavInfoBarDelegate* delegate =
+ static_cast<AlternateNavInfoBarDelegate*>(delegate_);
+ if (delegate->LinkClicked(disposition))
[self removeSelf];
}
« no previous file with comments | « chrome/browser/api/infobars/infobar_delegate.cc ('k') | chrome/browser/ui/gtk/infobars/alternate_nav_infobar_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698