diff options
author | pkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-02-08 04:20:40 +0000 |
---|---|---|
committer | pkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-02-08 04:20:40 +0000 |
commit | ec8f51164d477d8d83726fe61c68977d17b03149 (patch) | |
tree | de1ea01984caab5a5841c8a7c1593805157ce60d /chrome/browser/ui/views/infobars/infobar_container.cc | |
parent | ef47ded033e48098e83bb94e63b6e44ca6b511b4 (diff) | |
download | chromium_src-ec8f51164d477d8d83726fe61c68977d17b03149.zip chromium_src-ec8f51164d477d8d83726fe61c68977d17b03149.tar.gz chromium_src-ec8f51164d477d8d83726fe61c68977d17b03149.tar.bz2 |
Cleanup:
* Change int to size_t in a few APIs.
* Rename infobar_delegate_count() to infobar_count() in preparation for TabContents owning InfoBars rather than InfoBarDelegates.
* Move some code from PluginInstallerInfoBarDelegate to PluginObserver since it's more related to who's instantiating the infobar(delegate)s.
* Unify InfoBarDelegate behavior by making no delegates auto-add themselves to tabs (callers now all do this explicitly).
* Eliminate unused member TabContentsSSLHelper::SSLAddCertData::handler_.
* De-inline a couple classes.
* Make more functions private.
* Add some consts.
* Change DCHECK() to DCHECK_EQ() where possible.
* Rename the delegates in plugin_observer.cc to have "Delegate" in the names.
* Remove unnecessary qualifiers.
* Simplify.
* Misc. style issues, naming issues, etc.
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/6250172
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@74086 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/ui/views/infobars/infobar_container.cc')
-rw-r--r-- | chrome/browser/ui/views/infobars/infobar_container.cc | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/chrome/browser/ui/views/infobars/infobar_container.cc b/chrome/browser/ui/views/infobars/infobar_container.cc index c829c14..b0c7f37 100644 --- a/chrome/browser/ui/views/infobars/infobar_container.cc +++ b/chrome/browser/ui/views/infobars/infobar_container.cc @@ -14,8 +14,6 @@ #include "grit/generated_resources.h" #include "ui/base/l10n/l10n_util.h" -// InfoBarContainer, public: --------------------------------------------------- - InfoBarContainer::InfoBarContainer(Delegate* delegate) : delegate_(delegate), tab_contents_(NULL) { @@ -62,14 +60,12 @@ void InfoBarContainer::RemoveDelegate(InfoBarDelegate* delegate) { void InfoBarContainer::PaintInfoBarArrows(gfx::Canvas* canvas, views::View* outer_view, int arrow_center_x) { - for(int i = 0; i < GetChildViewCount(); ++i) { + for (int i = 0; i < GetChildViewCount(); ++i) { InfoBarView* infobar = static_cast<InfoBarView*>(GetChildViewAt(i)); infobar->PaintArrow(canvas, outer_view, arrow_center_x); } } -// InfoBarContainer, views::View overrides: ------------------------------------ - gfx::Size InfoBarContainer::GetPreferredSize() { // We do not have a preferred width (we will expand to fit the available width // of the delegate). Our preferred height is the sum of the preferred @@ -106,8 +102,6 @@ void InfoBarContainer::ViewHierarchyChanged(bool is_add, } } -// InfoBarContainer, NotificationObserver implementation: ---------------------- - void InfoBarContainer::Observe(NotificationType type, const NotificationSource& source, const NotificationDetails& details) { @@ -124,10 +118,8 @@ void InfoBarContainer::Observe(NotificationType type, } } -// InfoBarContainer, private: -------------------------------------------------- - void InfoBarContainer::UpdateInfoBars() { - for (int i = 0; i < tab_contents_->infobar_delegate_count(); ++i) { + for (size_t i = 0; i < tab_contents_->infobar_count(); ++i) { InfoBarDelegate* delegate = tab_contents_->GetInfoBarDelegateAt(i); InfoBarView* infobar = static_cast<InfoBarView*>(delegate->CreateInfoBar()); infobar->set_container(this); |