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

Side by Side Diff: chrome/browser/infobars/infobar_delegate.h

Issue 15067008: [InfoBar] Add InfoBarDelegate::GetIconID() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Renaming back to GetIcon() 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_INFOBARS_INFOBAR_DELEGATE_H_ 5 #ifndef CHROME_BROWSER_INFOBARS_INFOBAR_DELEGATE_H_
6 #define CHROME_BROWSER_INFOBARS_INFOBAR_DELEGATE_H_ 6 #define CHROME_BROWSER_INFOBARS_INFOBAR_DELEGATE_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/string16.h" 9 #include "base/string16.h"
10 #include "chrome/browser/infobars/infobar_service.h" 10 #include "chrome/browser/infobars/infobar_service.h"
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 // Returns true if the InfoBar should be closed automatically after the page 71 // Returns true if the InfoBar should be closed automatically after the page
72 // is navigated. By default this returns true if the navigation is to a new 72 // is navigated. By default this returns true if the navigation is to a new
73 // page (not including reloads). Subclasses wishing to change this behavior 73 // page (not including reloads). Subclasses wishing to change this behavior
74 // can override either this function or ShouldExpireInternal(), depending on 74 // can override either this function or ShouldExpireInternal(), depending on
75 // what level of control they need. 75 // what level of control they need.
76 virtual bool ShouldExpire(const content::LoadCommittedDetails& details) const; 76 virtual bool ShouldExpire(const content::LoadCommittedDetails& details) const;
77 77
78 // Called when the user clicks on the close button to dismiss the infobar. 78 // Called when the user clicks on the close button to dismiss the infobar.
79 virtual void InfoBarDismissed(); 79 virtual void InfoBarDismissed();
80 80
81 // Return the resource ID of the icon to be shown for this InfoBar. If the
82 // value is -1, no icon is shown.
83 virtual int GetIconID() const;
84
81 // Return the icon to be shown for this InfoBar. If the returned Image is 85 // Return the icon to be shown for this InfoBar. If the returned Image is
82 // NULL, no icon is shown. 86 // NULL, no icon is shown.
83 virtual gfx::Image* GetIcon() const; 87 gfx::Image* GetIcon() const;
tfarina 2013/05/11 00:44:23 if you kept the virtual, you could annotate this m
gone 2013/05/11 00:48:24 Yeah, it turns out that all of the GetIcon() calls
84 88
85 // Returns the type of the infobar. The type determines the appearance (such 89 // Returns the type of the infobar. The type determines the appearance (such
86 // as background color) of the infobar. 90 // as background color) of the infobar.
87 virtual Type GetInfoBarType() const; 91 virtual Type GetInfoBarType() const;
88 92
89 // Type-checking downcast routines: 93 // Type-checking downcast routines:
90 virtual AutoLoginInfoBarDelegate* AsAutoLoginInfoBarDelegate(); 94 virtual AutoLoginInfoBarDelegate* AsAutoLoginInfoBarDelegate();
91 virtual ConfirmInfoBarDelegate* AsConfirmInfoBarDelegate(); 95 virtual ConfirmInfoBarDelegate* AsConfirmInfoBarDelegate();
92 virtual ExtensionInfoBarDelegate* AsExtensionInfoBarDelegate(); 96 virtual ExtensionInfoBarDelegate* AsExtensionInfoBarDelegate();
93 virtual InsecureContentInfoBarDelegate* AsInsecureContentInfoBarDelegate(); 97 virtual InsecureContentInfoBarDelegate* AsInsecureContentInfoBarDelegate();
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 // opened for. Used to help expire on navigations. 132 // opened for. Used to help expire on navigations.
129 int contents_unique_id_; 133 int contents_unique_id_;
130 134
131 // TODO(pkasting): Remove. 135 // TODO(pkasting): Remove.
132 InfoBarService* owner_; 136 InfoBarService* owner_;
133 137
134 DISALLOW_COPY_AND_ASSIGN(InfoBarDelegate); 138 DISALLOW_COPY_AND_ASSIGN(InfoBarDelegate);
135 }; 139 };
136 140
137 #endif // CHROME_BROWSER_INFOBARS_INFOBAR_DELEGATE_H_ 141 #endif // CHROME_BROWSER_INFOBARS_INFOBAR_DELEGATE_H_
OLDNEW
« no previous file with comments | « chrome/browser/geolocation/geolocation_infobar_delegate.cc ('k') | chrome/browser/infobars/infobar_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698