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

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

Issue 22694006: Infobar system refactor. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 7 years 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/infobar_view.cc
===================================================================
--- chrome/browser/ui/views/infobars/infobar_view.cc (revision 238220)
+++ chrome/browser/ui/views/infobars/infobar_view.cc (working copy)
@@ -54,8 +54,8 @@
const int InfoBarView::kEndOfLabelSpacing = 16;
const int InfoBarView::kHorizontalPadding = 6;
-InfoBarView::InfoBarView(InfoBarService* owner, InfoBarDelegate* delegate)
- : InfoBar(owner, delegate),
+InfoBarView::InfoBarView(scoped_ptr<InfoBarDelegate> delegate)
+ : InfoBar(delegate.Pass()),
views::ExternalFocusTracker(this, NULL),
icon_(NULL),
close_button_(NULL) {
@@ -376,11 +376,9 @@
}
void InfoBarView::GetAccessibleState(ui::AccessibleViewState* state) {
- if (delegate()) {
- state->name = l10n_util::GetStringUTF16(
- (delegate()->GetInfoBarType() == InfoBarDelegate::WARNING_TYPE) ?
- IDS_ACCNAME_INFOBAR_WARNING : IDS_ACCNAME_INFOBAR_PAGE_ACTION);
- }
+ state->name = l10n_util::GetStringUTF16(
+ (delegate()->GetInfoBarType() == InfoBarDelegate::WARNING_TYPE) ?
+ IDS_ACCNAME_INFOBAR_WARNING : IDS_ACCNAME_INFOBAR_PAGE_ACTION);
state->role = ui::AccessibilityTypes::ROLE_ALERT;
}
« no previous file with comments | « chrome/browser/ui/views/infobars/infobar_view.h ('k') | chrome/browser/ui/views/infobars/translate_infobar_base.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698