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

Unified Diff: components/infobars/core/infobar_delegate.cc

Issue 922953002: Minor infobar cleanup. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Resync Created 5 years, 10 months 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: components/infobars/core/infobar_delegate.cc
diff --git a/components/infobars/core/infobar_delegate.cc b/components/infobars/core/infobar_delegate.cc
index d409b26742225494ce063eda05309cb5bf312d6d..84cd0e1015289851931785a27263b3765241c816 100644
--- a/components/infobars/core/infobar_delegate.cc
+++ b/components/infobars/core/infobar_delegate.cc
@@ -22,6 +22,20 @@ InfoBarDelegate::InfoBarAutomationType
return UNKNOWN_INFOBAR;
}
+InfoBarDelegate::Type InfoBarDelegate::GetInfoBarType() const {
+ return WARNING_TYPE;
+}
+
+int InfoBarDelegate::GetIconID() const {
+ return kNoIconID;
+}
+
+gfx::Image InfoBarDelegate::GetIcon() const {
+ int icon_id = GetIconID();
+ return (icon_id == kNoIconID) ? gfx::Image() :
+ ResourceBundle::GetSharedInstance().GetNativeImageNamed(icon_id);
+}
+
bool InfoBarDelegate::EqualsDelegate(InfoBarDelegate* delegate) const {
return false;
}
@@ -36,14 +50,6 @@ bool InfoBarDelegate::ShouldExpire(const NavigationDetails& details) const {
void InfoBarDelegate::InfoBarDismissed() {
}
-int InfoBarDelegate::GetIconID() const {
- return kNoIconID;
-}
-
-InfoBarDelegate::Type InfoBarDelegate::GetInfoBarType() const {
- return WARNING_TYPE;
-}
-
AutoLoginInfoBarDelegate* InfoBarDelegate::AsAutoLoginInfoBarDelegate() {
return nullptr;
}
@@ -84,6 +90,10 @@ ThemeInstalledInfoBarDelegate*
return nullptr;
}
+ThreeDAPIInfoBarDelegate* InfoBarDelegate::AsThreeDAPIInfoBarDelegate() {
+ return nullptr;
+}
+
translate::TranslateInfoBarDelegate*
InfoBarDelegate::AsTranslateInfoBarDelegate() {
return nullptr;
@@ -93,12 +103,6 @@ void InfoBarDelegate::StoreActiveEntryUniqueID() {
contents_unique_id_ = infobar()->owner()->GetActiveEntryID();
}
-gfx::Image InfoBarDelegate::GetIcon() const {
- int icon_id = GetIconID();
- return (icon_id == kNoIconID) ? gfx::Image() :
- ResourceBundle::GetSharedInstance().GetNativeImageNamed(icon_id);
-}
-
InfoBarDelegate::InfoBarDelegate() : contents_unique_id_(0) {
}
« no previous file with comments | « components/infobars/core/infobar_delegate.h ('k') | components/infobars/core/simple_alert_infobar_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698