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

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

Issue 8698016: Remove InfoBarDelegate::InfoBarClosed(), delete InfoBars directly. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Cancelling changes. Created 9 years 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_delegate.h" 5 #include "chrome/browser/infobars/infobar_delegate.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "build/build_config.h" 8 #include "build/build_config.h"
9 #include "chrome/browser/infobars/infobar_tab_helper.h" 9 #include "chrome/browser/infobars/infobar_tab_helper.h"
10 #include "content/browser/tab_contents/navigation_details.h" 10 #include "content/browser/tab_contents/navigation_details.h"
(...skipping 13 matching lines...) Expand all
24 const content::LoadCommittedDetails& details) const { 24 const content::LoadCommittedDetails& details) const {
25 if (!details.is_navigation_to_different_page()) 25 if (!details.is_navigation_to_different_page())
26 return false; 26 return false;
27 27
28 return ShouldExpireInternal(details); 28 return ShouldExpireInternal(details);
29 } 29 }
30 30
31 void InfoBarDelegate::InfoBarDismissed() { 31 void InfoBarDelegate::InfoBarDismissed() {
32 } 32 }
33 33
34 void InfoBarDelegate::InfoBarClosed() {
35 delete this;
36 }
37
38 gfx::Image* InfoBarDelegate::GetIcon() const { 34 gfx::Image* InfoBarDelegate::GetIcon() const {
39 return NULL; 35 return NULL;
40 } 36 }
41 37
42 InfoBarDelegate::Type InfoBarDelegate::GetInfoBarType() const { 38 InfoBarDelegate::Type InfoBarDelegate::GetInfoBarType() const {
43 return WARNING_TYPE; 39 return WARNING_TYPE;
44 } 40 }
45 41
46 ConfirmInfoBarDelegate* InfoBarDelegate::AsConfirmInfoBarDelegate() { 42 ConfirmInfoBarDelegate* InfoBarDelegate::AsConfirmInfoBarDelegate() {
47 return NULL; 43 return NULL;
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 const content::LoadCommittedDetails& details) const { 88 const content::LoadCommittedDetails& details) const {
93 return (contents_unique_id_ != details.entry->unique_id()) || 89 return (contents_unique_id_ != details.entry->unique_id()) ||
94 (content::PageTransitionStripQualifier( 90 (content::PageTransitionStripQualifier(
95 details.entry->transition_type()) == content::PAGE_TRANSITION_RELOAD); 91 details.entry->transition_type()) == content::PAGE_TRANSITION_RELOAD);
96 } 92 }
97 93
98 void InfoBarDelegate::RemoveSelf() { 94 void InfoBarDelegate::RemoveSelf() {
99 if (owner_) 95 if (owner_)
100 owner_->RemoveInfoBar(this); // Clears |owner_|. 96 owner_->RemoveInfoBar(this); // Clears |owner_|.
101 } 97 }
OLDNEW
« no previous file with comments | « chrome/browser/infobars/infobar_delegate.h ('k') | chrome/browser/infobars/infobar_tab_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698