diff options
author | tfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-06-16 01:51:28 +0000 |
---|---|---|
committer | tfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-06-16 01:51:28 +0000 |
commit | efa02ecf2250b303f452dd51881bf53af3b696f8 (patch) | |
tree | 315e87d193d681d74e4cf690a27e089e7cfa3bbb /chrome/browser/tab_contents | |
parent | 7d7cf8d1c3e3312763e4fe34d7ae121bd309f832 (diff) | |
download | chromium_src-efa02ecf2250b303f452dd51881bf53af3b696f8.zip chromium_src-efa02ecf2250b303f452dd51881bf53af3b696f8.tar.gz chromium_src-efa02ecf2250b303f452dd51881bf53af3b696f8.tar.bz2 |
infobars: Use TCW directly in InfoBar to remove the delegate.
Note: This is a TODO in infobar.h for pkasting.
BUG=None
TEST=None
R=pkasting@chromium.org
Review URL: http://codereview.chromium.org/7182004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@89285 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/tab_contents')
-rw-r--r-- | chrome/browser/tab_contents/infobar.cc | 4 | ||||
-rw-r--r-- | chrome/browser/tab_contents/infobar_container.cc | 4 | ||||
-rw-r--r-- | chrome/browser/tab_contents/infobar_container.h | 5 |
3 files changed, 2 insertions, 11 deletions
diff --git a/chrome/browser/tab_contents/infobar.cc b/chrome/browser/tab_contents/infobar.cc index 0a55bc5..4330261 100644 --- a/chrome/browser/tab_contents/infobar.cc +++ b/chrome/browser/tab_contents/infobar.cc @@ -8,6 +8,7 @@ #include "base/logging.h" #include "chrome/browser/tab_contents/infobar_container.h" +#include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h" #include "ui/base/animation/slide_animation.h" SkColor GetInfoBarTopColor(InfoBarDelegate::Type infobar_type) { @@ -88,8 +89,7 @@ void InfoBar::AnimationProgressed(const ui::Animation* animation) { } void InfoBar::RemoveInfoBar() { - if (container_) - container_->RemoveDelegate(delegate_); + owner_->RemoveInfoBar(delegate_); } void InfoBar::SetBarTargetHeight(int height) { diff --git a/chrome/browser/tab_contents/infobar_container.cc b/chrome/browser/tab_contents/infobar_container.cc index 6541c25..6e9d02e 100644 --- a/chrome/browser/tab_contents/infobar_container.cc +++ b/chrome/browser/tab_contents/infobar_container.cc @@ -96,10 +96,6 @@ void InfoBarContainer::OnInfoBarStateChanged(bool is_animating) { delegate_->InfoBarContainerStateChanged(is_animating); } -void InfoBarContainer::RemoveDelegate(InfoBarDelegate* delegate) { - tab_contents_->RemoveInfoBar(delegate); -} - void InfoBarContainer::RemoveInfoBar(InfoBar* infobar) { InfoBars::iterator infobar_iterator(std::find(infobars_.begin(), infobars_.end(), infobar)); diff --git a/chrome/browser/tab_contents/infobar_container.h b/chrome/browser/tab_contents/infobar_container.h index 1be2b81..0b3eb5b 100644 --- a/chrome/browser/tab_contents/infobar_container.h +++ b/chrome/browser/tab_contents/infobar_container.h @@ -72,11 +72,6 @@ class InfoBarContainer : public NotificationObserver { // anything necessary to respond, e.g. re-layout. void OnInfoBarStateChanged(bool is_animating); - // Removes the specified InfoBarDelegate from the selected TabContentsWrapper. - // This will notify us back and cause us to close the InfoBar. This is called - // from the InfoBar's close button handler. - void RemoveDelegate(InfoBarDelegate* delegate); - // Called by |infobar| to request that it be removed from the container, as it // is about to delete itself. At this point, |infobar| should already be // hidden. |