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

Side by Side Diff: chrome/browser/infobars/infobar.cc

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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 #include "chrome/browser/infobars/infobar.h" 5 #include "chrome/browser/infobars/infobar.h"
6 6
7 #include <cmath> 7 #include <cmath>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "build/build_config.h" 10 #include "build/build_config.h"
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
176 PlatformSpecificOnHeightsRecalculated(); 176 PlatformSpecificOnHeightsRecalculated();
177 177
178 if (container_ && (heights_differ || force_notify)) 178 if (container_ && (heights_differ || force_notify))
179 container_->OnInfoBarStateChanged(animation_.is_animating()); 179 container_->OnInfoBarStateChanged(animation_.is_animating());
180 } 180 }
181 181
182 void InfoBar::MaybeDelete() { 182 void InfoBar::MaybeDelete() {
183 if (!owner_ && delegate_ && (animation_.GetCurrentValue() == 0.0)) { 183 if (!owner_ && delegate_ && (animation_.GetCurrentValue() == 0.0)) {
184 if (container_) 184 if (container_)
185 container_->RemoveInfoBar(this); 185 container_->RemoveInfoBar(this);
186 delegate_->InfoBarClosed(); 186 delete delegate_;
187 delegate_ = NULL; 187 delegate_ = NULL;
188 } 188 }
189 } 189 }
190 190
191 #endif // TOOLKIT_VIEWS || TOOLKIT_GTK 191 #endif // TOOLKIT_VIEWS || TOOLKIT_GTK
OLDNEW
« no previous file with comments | « chrome/browser/infobars/alternate_nav_infobar_delegate.cc ('k') | chrome/browser/infobars/infobar_extension_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698