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

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

Issue 102163002: Revert 238283 "Infobar system refactor." (Closed) Base URL: svn://svn.chromium.org/chrome/
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: trunk/src/chrome/browser/ui/views/infobars/infobar_view.cc
===================================================================
--- trunk/src/chrome/browser/ui/views/infobars/infobar_view.cc (revision 238401)
+++ trunk/src/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(scoped_ptr<InfoBarDelegate> delegate)
- : InfoBar(delegate.Pass()),
+InfoBarView::InfoBarView(InfoBarService* owner, InfoBarDelegate* delegate)
+ : InfoBar(owner, delegate),
views::ExternalFocusTracker(this, NULL),
icon_(NULL),
close_button_(NULL) {
@@ -376,9 +376,11 @@
}
void InfoBarView::GetAccessibleState(ui::AccessibleViewState* state) {
- state->name = l10n_util::GetStringUTF16(
- (delegate()->GetInfoBarType() == InfoBarDelegate::WARNING_TYPE) ?
- IDS_ACCNAME_INFOBAR_WARNING : IDS_ACCNAME_INFOBAR_PAGE_ACTION);
+ if (delegate()) {
+ 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;
}

Powered by Google App Engine
This is Rietveld 408576698