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

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

Issue 228293004: InfoBarService inherits from InfoBarManager (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: whitespace Created 6 years, 8 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_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/strings/string16.h" 9 #include "base/strings/string16.h"
10 #include "ui/base/window_open_disposition.h" 10 #include "ui/base/window_open_disposition.h"
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 // later upon navigation to determine if this InfoBarDelegate should be 120 // later upon navigation to determine if this InfoBarDelegate should be
121 // expired. 121 // expired.
122 void StoreActiveEntryUniqueID(); 122 void StoreActiveEntryUniqueID();
123 123
124 // Return the icon to be shown for this InfoBar. If the returned Image is 124 // Return the icon to be shown for this InfoBar. If the returned Image is
125 // empty, no icon is shown. 125 // empty, no icon is shown.
126 virtual gfx::Image GetIcon() const; 126 virtual gfx::Image GetIcon() const;
127 127
128 // This trivial getter is defined out-of-line in order to avoid needing to 128 // This trivial getter is defined out-of-line in order to avoid needing to
129 // #include infobar.h, which would lead to circular #includes. 129 // #include infobar.h, which would lead to circular #includes.
130 // TODO(droger): Remove this function and have callers use
131 // InfoBarService::WebContentsFromInfoBar() instead.
130 content::WebContents* web_contents(); 132 content::WebContents* web_contents();
131 133
132 protected: 134 protected:
133 InfoBarDelegate(); 135 InfoBarDelegate();
134 136
135 // Returns true if the navigation is to a new URL or a reload occured. 137 // Returns true if the navigation is to a new URL or a reload occured.
136 virtual bool ShouldExpireInternal(const NavigationDetails& details) const; 138 virtual bool ShouldExpireInternal(const NavigationDetails& details) const;
137 139
138 int contents_unique_id() const { return contents_unique_id_; } 140 int contents_unique_id() const { return contents_unique_id_; }
139 InfoBar* infobar() { return infobar_; } 141 InfoBar* infobar() { return infobar_; }
140 142
141 private: 143 private:
142 // The unique id of the active NavigationEntry of the WebContents that we were 144 // The unique id of the active NavigationEntry of the WebContents that we were
143 // opened for. Used to help expire on navigations. 145 // opened for. Used to help expire on navigations.
144 int contents_unique_id_; 146 int contents_unique_id_;
145 147
146 // The InfoBar associated with us. 148 // The InfoBar associated with us.
147 InfoBar* infobar_; 149 InfoBar* infobar_;
148 150
149 DISALLOW_COPY_AND_ASSIGN(InfoBarDelegate); 151 DISALLOW_COPY_AND_ASSIGN(InfoBarDelegate);
150 }; 152 };
151 153
152 #endif // CHROME_BROWSER_INFOBARS_INFOBAR_DELEGATE_H_ 154 #endif // CHROME_BROWSER_INFOBARS_INFOBAR_DELEGATE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698