diff options
author | pkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-01-26 23:58:58 +0000 |
---|---|---|
committer | pkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-01-26 23:58:58 +0000 |
commit | 70b1f803bad74bc90a5586af96534c2b4f9a65cc (patch) | |
tree | 4e7753e6c9c0a4a9cdf583f4868b766fc1b453fd /chrome/browser/ui/views/infobars | |
parent | 13786dd536bb42858d03db754b0dfe39a749a47f (diff) | |
download | chromium_src-70b1f803bad74bc90a5586af96534c2b4f9a65cc.zip chromium_src-70b1f803bad74bc90a5586af96534c2b4f9a65cc.tar.gz chromium_src-70b1f803bad74bc90a5586af96534c2b4f9a65cc.tar.bz2 |
Cleanup:
* Remove AlertInfoBarDelegate. There are basically no users of this (the only one is in autofill which is really trying to make something like a confirm info bar).
* Change the default button set for a ConfirmInfoBarDelegate from 0 buttons to 2 to match how practically every caller uses it.
Note that this doesn't remove views' AlertInfoBar yet. AlertInfoBar is now only used as a base for ConfirmInfoBar, but actually moving that functionality into ConfirmInfoBar is to come in a subsequent patch.
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/6262018
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@72726 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/ui/views/infobars')
-rw-r--r-- | chrome/browser/ui/views/infobars/infobars.cc | 14 | ||||
-rw-r--r-- | chrome/browser/ui/views/infobars/infobars.h | 6 |
2 files changed, 3 insertions, 17 deletions
diff --git a/chrome/browser/ui/views/infobars/infobars.cc b/chrome/browser/ui/views/infobars/infobars.cc index 1014ed8..8129c273 100644 --- a/chrome/browser/ui/views/infobars/infobars.cc +++ b/chrome/browser/ui/views/infobars/infobars.cc @@ -316,7 +316,7 @@ void InfoBar::DeleteSelf() { // AlertInfoBar, public: ------------------------------------------------------- -AlertInfoBar::AlertInfoBar(AlertInfoBarDelegate* delegate) +AlertInfoBar::AlertInfoBar(ConfirmInfoBarDelegate* delegate) : InfoBar(delegate) { label_ = new views::Label( UTF16ToWideHack(delegate->GetMessageText()), @@ -353,12 +353,6 @@ void AlertInfoBar::Layout() { OffsetY(this, text_ps), text_width, text_ps.height()); } -// AlertInfoBar, private: ------------------------------------------------------ - -AlertInfoBarDelegate* AlertInfoBar::GetDelegate() { - return delegate()->AsAlertInfoBarDelegate(); -} - // LinkInfoBar, public: -------------------------------------------------------- LinkInfoBar::LinkInfoBar(LinkInfoBarDelegate* delegate) @@ -598,12 +592,6 @@ void ConfirmInfoBar::Init() { AddChildView(link_); } -// AlertInfoBarDelegate, InfoBarDelegate overrides: ---------------------------- - -InfoBar* AlertInfoBarDelegate::CreateInfoBar() { - return new AlertInfoBar(this); -} - // LinkInfoBarDelegate, InfoBarDelegate overrides: ----------------------------- InfoBar* LinkInfoBarDelegate::CreateInfoBar() { diff --git a/chrome/browser/ui/views/infobars/infobars.h b/chrome/browser/ui/views/infobars/infobars.h index 4b8e6aa..ba5967b 100644 --- a/chrome/browser/ui/views/infobars/infobars.h +++ b/chrome/browser/ui/views/infobars/infobars.h @@ -1,4 +1,4 @@ -// Copyright (c) 2010 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -171,7 +171,7 @@ class InfoBar : public views::View, class AlertInfoBar : public InfoBar { public: - explicit AlertInfoBar(AlertInfoBarDelegate* delegate); + explicit AlertInfoBar(ConfirmInfoBarDelegate* delegate); virtual ~AlertInfoBar(); // Overridden from views::View: @@ -182,8 +182,6 @@ class AlertInfoBar : public InfoBar { views::ImageView* icon() const { return icon_; } private: - AlertInfoBarDelegate* GetDelegate(); - views::Label* label_; views::ImageView* icon_; |