Chromium Code Reviews| Index: chrome/browser/infobars/infobar_delegate.h |
| diff --git a/chrome/browser/infobars/infobar_delegate.h b/chrome/browser/infobars/infobar_delegate.h |
| index 1fb7d632a9d9b1197125bcdeefbc3e1bd00099e3..e092e636c702c87b8cb8188d2e39f8ff195040be 100644 |
| --- a/chrome/browser/infobars/infobar_delegate.h |
| +++ b/chrome/browser/infobars/infobar_delegate.h |
| @@ -47,6 +47,9 @@ class InfoBarDelegate { |
| UNKNOWN_INFOBAR, |
| }; |
| + // Value to use when the InfoBar has no icon to show. |
| + static const int kNoIconID = 0; |
|
Peter Kasting
2013/05/15 21:47:43
You may want to merely declare this here, and defi
gone
2013/05/15 22:06:25
Done.
|
| + |
| virtual ~InfoBarDelegate(); |
| virtual InfoBarAutomationType GetInfoBarAutomationType() const; |
| @@ -78,9 +81,9 @@ class InfoBarDelegate { |
| // Called when the user clicks on the close button to dismiss the infobar. |
| virtual void InfoBarDismissed(); |
| - // Return the icon to be shown for this InfoBar. If the returned Image is |
| - // NULL, no icon is shown. |
| - virtual gfx::Image* GetIcon() const; |
| + // Return the resource ID of the icon to be shown for this InfoBar. If the |
| + // value is equal to |kNoIconID|, no icon is shown. |
| + virtual int GetIconID() const; |
| // Returns the type of the infobar. The type determines the appearance (such |
| // as background color) of the infobar. |
| @@ -99,6 +102,10 @@ class InfoBarDelegate { |
| virtual ThreeDAPIInfoBarDelegate* AsThreeDAPIInfoBarDelegate(); |
| virtual TranslateInfoBarDelegate* AsTranslateInfoBarDelegate(); |
| + // Return the icon to be shown for this InfoBar. If the returned Image is |
| + // empty, no icon is shown. |
| + gfx::Image GetIcon() const; |
| + |
| content::WebContents* web_contents() { |
| return owner_ ? owner_->web_contents() : NULL; |
| } |