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 "chrome/browser/infobars/confirm_infobar_delegate.h" | 5 #include "chrome/browser/infobars/confirm_infobar_delegate.h" |
6 | 6 |
7 #include "grit/generated_resources.h" | 7 #include "grit/generated_resources.h" |
8 #include "ui/base/l10n/l10n_util.h" | 8 #include "ui/base/l10n/l10n_util.h" |
9 | 9 |
| 10 using infobars::InfoBarDelegate; |
| 11 |
10 ConfirmInfoBarDelegate::~ConfirmInfoBarDelegate() { | 12 ConfirmInfoBarDelegate::~ConfirmInfoBarDelegate() { |
11 } | 13 } |
12 | 14 |
13 InfoBarDelegate::InfoBarAutomationType | 15 InfoBarDelegate::InfoBarAutomationType |
14 ConfirmInfoBarDelegate::GetInfoBarAutomationType() const { | 16 ConfirmInfoBarDelegate::GetInfoBarAutomationType() const { |
15 return CONFIRM_INFOBAR; | 17 return CONFIRM_INFOBAR; |
16 } | 18 } |
17 | 19 |
18 int ConfirmInfoBarDelegate::GetButtons() const { | 20 int ConfirmInfoBarDelegate::GetButtons() const { |
19 return BUTTON_OK | BUTTON_CANCEL; | 21 return BUTTON_OK | BUTTON_CANCEL; |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
60 bool ConfirmInfoBarDelegate::EqualsDelegate(InfoBarDelegate* delegate) const { | 62 bool ConfirmInfoBarDelegate::EqualsDelegate(InfoBarDelegate* delegate) const { |
61 ConfirmInfoBarDelegate* confirm_delegate = | 63 ConfirmInfoBarDelegate* confirm_delegate = |
62 delegate->AsConfirmInfoBarDelegate(); | 64 delegate->AsConfirmInfoBarDelegate(); |
63 return confirm_delegate && | 65 return confirm_delegate && |
64 (confirm_delegate->GetMessageText() == GetMessageText()); | 66 (confirm_delegate->GetMessageText() == GetMessageText()); |
65 } | 67 } |
66 | 68 |
67 ConfirmInfoBarDelegate* ConfirmInfoBarDelegate::AsConfirmInfoBarDelegate() { | 69 ConfirmInfoBarDelegate* ConfirmInfoBarDelegate::AsConfirmInfoBarDelegate() { |
68 return this; | 70 return this; |
69 } | 71 } |
OLD | NEW |