OLD | NEW |
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 #include "components/infobars/core/confirm_infobar_delegate.h" | 5 #include "components/infobars/core/confirm_infobar_delegate.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "components/infobars/core/infobar.h" | 8 #include "components/infobars/core/infobar.h" |
9 #include "ui/base/l10n/l10n_util.h" | 9 #include "ui/base/l10n/l10n_util.h" |
10 #include "ui/strings/grit/ui_strings.h" | 10 #include "ui/strings/grit/ui_strings.h" |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
46 } | 46 } |
47 | 47 |
48 bool ConfirmInfoBarDelegate::LinkClicked(WindowOpenDisposition disposition) { | 48 bool ConfirmInfoBarDelegate::LinkClicked(WindowOpenDisposition disposition) { |
49 return true; | 49 return true; |
50 } | 50 } |
51 | 51 |
52 ConfirmInfoBarDelegate::ConfirmInfoBarDelegate() | 52 ConfirmInfoBarDelegate::ConfirmInfoBarDelegate() |
53 : InfoBarDelegate() { | 53 : InfoBarDelegate() { |
54 } | 54 } |
55 | 55 |
56 bool ConfirmInfoBarDelegate::ShouldExpireInternal( | |
57 const NavigationDetails& details) const { | |
58 return !details.did_replace_entry && | |
59 InfoBarDelegate::ShouldExpireInternal(details); | |
60 } | |
61 | |
62 bool ConfirmInfoBarDelegate::EqualsDelegate(InfoBarDelegate* delegate) const { | 56 bool ConfirmInfoBarDelegate::EqualsDelegate(InfoBarDelegate* delegate) const { |
63 ConfirmInfoBarDelegate* confirm_delegate = | 57 ConfirmInfoBarDelegate* confirm_delegate = |
64 delegate->AsConfirmInfoBarDelegate(); | 58 delegate->AsConfirmInfoBarDelegate(); |
65 return confirm_delegate && | 59 return confirm_delegate && |
66 (confirm_delegate->GetMessageText() == GetMessageText()); | 60 (confirm_delegate->GetMessageText() == GetMessageText()); |
67 } | 61 } |
68 | 62 |
69 ConfirmInfoBarDelegate* ConfirmInfoBarDelegate::AsConfirmInfoBarDelegate() { | 63 ConfirmInfoBarDelegate* ConfirmInfoBarDelegate::AsConfirmInfoBarDelegate() { |
70 return this; | 64 return this; |
71 } | 65 } |
OLD | NEW |