OLD | NEW |
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 Loading... |
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::InfoBarClosing() { |
| 35 } |
| 36 |
34 void InfoBarDelegate::InfoBarClosed() { | 37 void InfoBarDelegate::InfoBarClosed() { |
| 38 InfoBarClosing(); |
35 delete this; | 39 delete this; |
36 } | 40 } |
37 | 41 |
38 gfx::Image* InfoBarDelegate::GetIcon() const { | 42 gfx::Image* InfoBarDelegate::GetIcon() const { |
39 return NULL; | 43 return NULL; |
40 } | 44 } |
41 | 45 |
42 InfoBarDelegate::Type InfoBarDelegate::GetInfoBarType() const { | 46 InfoBarDelegate::Type InfoBarDelegate::GetInfoBarType() const { |
43 return WARNING_TYPE; | 47 return WARNING_TYPE; |
44 } | 48 } |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
92 const content::LoadCommittedDetails& details) const { | 96 const content::LoadCommittedDetails& details) const { |
93 return (contents_unique_id_ != details.entry->unique_id()) || | 97 return (contents_unique_id_ != details.entry->unique_id()) || |
94 (content::PageTransitionStripQualifier( | 98 (content::PageTransitionStripQualifier( |
95 details.entry->transition_type()) == content::PAGE_TRANSITION_RELOAD); | 99 details.entry->transition_type()) == content::PAGE_TRANSITION_RELOAD); |
96 } | 100 } |
97 | 101 |
98 void InfoBarDelegate::RemoveSelf() { | 102 void InfoBarDelegate::RemoveSelf() { |
99 if (owner_) | 103 if (owner_) |
100 owner_->RemoveInfoBar(this); // Clears |owner_|. | 104 owner_->RemoveInfoBar(this); // Clears |owner_|. |
101 } | 105 } |
OLD | NEW |