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

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

Issue 11644059: Change infobar creation to use a public static Create() method on the infobar delegate classes. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 7 years, 11 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 | Annotate | Revision Log
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_API_INFOBARS_INFOBAR_DELEGATE_H_ 5 #ifndef CHROME_BROWSER_API_INFOBARS_INFOBAR_DELEGATE_H_
6 #define CHROME_BROWSER_API_INFOBARS_INFOBAR_DELEGATE_H_ 6 #define CHROME_BROWSER_API_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 "webkit/glue/window_open_disposition.h" 10 #include "webkit/glue/window_open_disposition.h"
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 // Returns true if the InfoBar should be closed automatically after the page 77 // Returns true if the InfoBar should be closed automatically after the page
78 // is navigated. By default this returns true if the navigation is to a new 78 // is navigated. By default this returns true if the navigation is to a new
79 // page (not including reloads). Subclasses wishing to change this behavior 79 // page (not including reloads). Subclasses wishing to change this behavior
80 // can override either this function or ShouldExpireInternal(), depending on 80 // can override either this function or ShouldExpireInternal(), depending on
81 // what level of control they need. 81 // what level of control they need.
82 virtual bool ShouldExpire(const content::LoadCommittedDetails& details) const; 82 virtual bool ShouldExpire(const content::LoadCommittedDetails& details) const;
83 83
84 // Called when the user clicks on the close button to dismiss the infobar. 84 // Called when the user clicks on the close button to dismiss the infobar.
85 virtual void InfoBarDismissed(); 85 virtual void InfoBarDismissed();
86 86
87 // Called after the InfoBar is closed. Deletes |this|.
88 // TODO(pkasting): Get rid of this and delete delegates directly.
89 void InfoBarClosed();
90
91 // Return the icon to be shown for this InfoBar. If the returned Image is 87 // Return the icon to be shown for this InfoBar. If the returned Image is
92 // NULL, no icon is shown. 88 // NULL, no icon is shown.
93 virtual gfx::Image* GetIcon() const; 89 virtual gfx::Image* GetIcon() const;
94 90
95 // Returns the type of the infobar. The type determines the appearance (such 91 // Returns the type of the infobar. The type determines the appearance (such
96 // as background color) of the infobar. 92 // as background color) of the infobar.
97 virtual Type GetInfoBarType() const; 93 virtual Type GetInfoBarType() const;
98 94
99 // Type-checking downcast routines: 95 // Type-checking downcast routines:
100 virtual AlternateNavInfoBarDelegate* AsAlternateNavInfoBarDelegate(); 96 virtual AlternateNavInfoBarDelegate* AsAlternateNavInfoBarDelegate();
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 // opened for. Used to help expire on navigations. 130 // opened for. Used to help expire on navigations.
135 int contents_unique_id_; 131 int contents_unique_id_;
136 132
137 // TODO(pkasting): Remove. 133 // TODO(pkasting): Remove.
138 InfoBarService* owner_; 134 InfoBarService* owner_;
139 135
140 DISALLOW_COPY_AND_ASSIGN(InfoBarDelegate); 136 DISALLOW_COPY_AND_ASSIGN(InfoBarDelegate);
141 }; 137 };
142 138
143 #endif // CHROME_BROWSER_API_INFOBARS_INFOBAR_DELEGATE_H_ 139 #endif // CHROME_BROWSER_API_INFOBARS_INFOBAR_DELEGATE_H_
OLDNEW
« no previous file with comments | « chrome/browser/api/infobars/confirm_infobar_delegate.cc ('k') | chrome/browser/api/infobars/infobar_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698