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

Unified Diff: chrome/browser/infobars/infobar_delegate.cc

Issue 15067008: [InfoBar] Add InfoBarDelegate::GetIconID() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove unused includes Created 7 years, 7 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: chrome/browser/infobars/infobar_delegate.cc
diff --git a/chrome/browser/infobars/infobar_delegate.cc b/chrome/browser/infobars/infobar_delegate.cc
index 719b99fa6fa88b4616c75ffd2194d4c904b90bc8..6b6cfecade420eecc20b106d6fc1ed5573230952 100644
--- a/chrome/browser/infobars/infobar_delegate.cc
+++ b/chrome/browser/infobars/infobar_delegate.cc
@@ -11,6 +11,7 @@
#include "content/public/browser/navigation_details.h"
#include "content/public/browser/navigation_entry.h"
#include "content/public/browser/web_contents.h"
+#include "ui/base/resource/resource_bundle.h"
using content::NavigationEntry;
@@ -39,8 +40,17 @@ bool InfoBarDelegate::ShouldExpire(
void InfoBarDelegate::InfoBarDismissed() {
}
+int InfoBarDelegate::GetIconID() const {
+ return -1;
+}
+
gfx::Image* InfoBarDelegate::GetIcon() const {
- return NULL;
+ if (GetIconID() == -1) {
+ return NULL;
+ } else {
Peter Kasting 2013/05/14 00:50:50 Nit: No else after return. Do this: int icon_i
gone 2013/05/14 17:50:17 Done.
+ return &ResourceBundle::GetSharedInstance().GetNativeImageNamed(
+ GetIconID());
+ }
}
InfoBarDelegate::Type InfoBarDelegate::GetInfoBarType() const {

Powered by Google App Engine
This is Rietveld 408576698