| 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 27 matching lines...) Expand all Loading... |
| 38 } | 38 } |
| 39 | 39 |
| 40 bool ConfirmInfoBarDelegate::Cancel() { | 40 bool ConfirmInfoBarDelegate::Cancel() { |
| 41 return true; | 41 return true; |
| 42 } | 42 } |
| 43 | 43 |
| 44 base::string16 ConfirmInfoBarDelegate::GetLinkText() const { | 44 base::string16 ConfirmInfoBarDelegate::GetLinkText() const { |
| 45 return base::string16(); | 45 return base::string16(); |
| 46 } | 46 } |
| 47 | 47 |
| 48 GURL ConfirmInfoBarDelegate::GetLinkURL() const { |
| 49 return GURL(); |
| 50 } |
| 51 |
| 48 bool ConfirmInfoBarDelegate::LinkClicked(WindowOpenDisposition disposition) { | 52 bool ConfirmInfoBarDelegate::LinkClicked(WindowOpenDisposition disposition) { |
| 49 return true; | 53 return true; |
| 50 } | 54 } |
| 51 | 55 |
| 52 ConfirmInfoBarDelegate::ConfirmInfoBarDelegate() | 56 ConfirmInfoBarDelegate::ConfirmInfoBarDelegate() |
| 53 : InfoBarDelegate() { | 57 : InfoBarDelegate() { |
| 54 } | 58 } |
| 55 | 59 |
| 56 bool ConfirmInfoBarDelegate::EqualsDelegate(InfoBarDelegate* delegate) const { | 60 bool ConfirmInfoBarDelegate::EqualsDelegate(InfoBarDelegate* delegate) const { |
| 57 ConfirmInfoBarDelegate* confirm_delegate = | 61 ConfirmInfoBarDelegate* confirm_delegate = |
| 58 delegate->AsConfirmInfoBarDelegate(); | 62 delegate->AsConfirmInfoBarDelegate(); |
| 59 return confirm_delegate && | 63 return confirm_delegate && |
| 60 (confirm_delegate->GetMessageText() == GetMessageText()); | 64 (confirm_delegate->GetMessageText() == GetMessageText()); |
| 61 } | 65 } |
| 62 | 66 |
| 63 ConfirmInfoBarDelegate* ConfirmInfoBarDelegate::AsConfirmInfoBarDelegate() { | 67 ConfirmInfoBarDelegate* ConfirmInfoBarDelegate::AsConfirmInfoBarDelegate() { |
| 64 return this; | 68 return this; |
| 65 } | 69 } |
| OLD | NEW |