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

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

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.h
diff --git a/components/infobars/core/infobar_delegate.h b/components/infobars/core/infobar_delegate.h
index 00fc964da37ad339044b8b9c02a040b1a433ac34..bd7455f02198511f521ebff61d928b1ad4a6a0f7 100644
--- a/components/infobars/core/infobar_delegate.h
+++ b/components/infobars/core/infobar_delegate.h
@@ -75,8 +75,24 @@ class InfoBarDelegate {
// this point nothing is visible onscreen.
virtual ~InfoBarDelegate();
+ // Returns the type of the infobar. The type determines the appearance (such
+ // as background color) of the infobar.
+ virtual Type GetInfoBarType() const;
+
virtual InfoBarAutomationType GetInfoBarAutomationType() const;
+ // Returns the resource ID of the icon to be shown for this InfoBar. If the
+ // value is equal to |kNoIconID|, GetIcon() will not show an icon by default.
+ virtual int GetIconID() const;
+
+ // Returns the icon to be shown for this InfoBar. If the returned Image is
+ // empty, no icon is shown.
+ //
+ // Most subclasses should not override this; override GetIconID() instead
+ // unless the infobar needs to show an image from somewhere other than the
+ // resource bundle as its icon.
+ virtual gfx::Image GetIcon() const;
+
// Returns true if the supplied |delegate| is equal to this one. Equality is
// left to the implementation to define. This function is called by the
// InfoBarManager when determining whether or not a delegate should be
@@ -95,14 +111,6 @@ class InfoBarDelegate {
// Called when the user clicks on the close button to dismiss the infobar.
virtual void InfoBarDismissed();
- // 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.
- virtual Type GetInfoBarType() const;
-
// Type-checking downcast routines:
virtual AutoLoginInfoBarDelegate* AsAutoLoginInfoBarDelegate();
virtual ConfirmInfoBarDelegate* AsConfirmInfoBarDelegate();
@@ -114,6 +122,7 @@ class InfoBarDelegate {
AsRegisterProtocolHandlerInfoBarDelegate();
virtual ScreenCaptureInfoBarDelegate* AsScreenCaptureInfoBarDelegate();
virtual ThemeInstalledInfoBarDelegate* AsThemePreviewInfobarDelegate();
+ virtual ThreeDAPIInfoBarDelegate* AsThreeDAPIInfoBarDelegate();
virtual translate::TranslateInfoBarDelegate* AsTranslateInfoBarDelegate();
void set_infobar(InfoBar* infobar) { infobar_ = infobar; }
@@ -122,10 +131,6 @@ class InfoBarDelegate {
// to determine if this InfoBarDelegate should be expired.
void StoreActiveEntryUniqueID();
- // Return the icon to be shown for this InfoBar. If the returned Image is
- // empty, no icon is shown.
- virtual gfx::Image GetIcon() const;
-
protected:
InfoBarDelegate();
« no previous file with comments | « components/autofill/core/browser/autofill_cc_infobar_delegate.cc ('k') | components/infobars/core/infobar_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698