| 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/ui/cocoa/infobars/mock_confirm_infobar_delegate.h" | 5 #include "chrome/browser/ui/cocoa/infobars/mock_confirm_infobar_delegate.h" |
| 6 | 6 |
| 7 #include "base/strings/utf_string_conversions.h" | 7 #include "base/strings/utf_string_conversions.h" |
| 8 | 8 |
| 9 const char MockConfirmInfoBarDelegate::kMessage[] = "MockConfirmInfoBarMessage"; | 9 const char MockConfirmInfoBarDelegate::kMessage[] = "MockConfirmInfoBarMessage"; |
| 10 | 10 |
| (...skipping 14 matching lines...) Expand all Loading... |
| 25 owner_->OnInfoBarDelegateClosed(); | 25 owner_->OnInfoBarDelegateClosed(); |
| 26 } | 26 } |
| 27 | 27 |
| 28 int MockConfirmInfoBarDelegate::GetIconID() const { | 28 int MockConfirmInfoBarDelegate::GetIconID() const { |
| 29 icon_accessed_ = true; | 29 icon_accessed_ = true; |
| 30 return kNoIconID; | 30 return kNoIconID; |
| 31 } | 31 } |
| 32 | 32 |
| 33 base::string16 MockConfirmInfoBarDelegate::GetMessageText() const { | 33 base::string16 MockConfirmInfoBarDelegate::GetMessageText() const { |
| 34 message_text_accessed_ = true; | 34 message_text_accessed_ = true; |
| 35 return ASCIIToUTF16(kMessage); | 35 return base::ASCIIToUTF16(kMessage); |
| 36 } | 36 } |
| 37 | 37 |
| 38 base::string16 MockConfirmInfoBarDelegate::GetButtonLabel( | 38 base::string16 MockConfirmInfoBarDelegate::GetButtonLabel( |
| 39 InfoBarButton button) const { | 39 InfoBarButton button) const { |
| 40 return ASCIIToUTF16((button == BUTTON_OK) ? "OK" : "Cancel"); | 40 return base::ASCIIToUTF16((button == BUTTON_OK) ? "OK" : "Cancel"); |
| 41 } | 41 } |
| 42 | 42 |
| 43 bool MockConfirmInfoBarDelegate::Accept() { | 43 bool MockConfirmInfoBarDelegate::Accept() { |
| 44 ok_clicked_ = true; | 44 ok_clicked_ = true; |
| 45 return closes_on_action_; | 45 return closes_on_action_; |
| 46 } | 46 } |
| 47 | 47 |
| 48 bool MockConfirmInfoBarDelegate::Cancel() { | 48 bool MockConfirmInfoBarDelegate::Cancel() { |
| 49 cancel_clicked_ = true; | 49 cancel_clicked_ = true; |
| 50 return closes_on_action_; | 50 return closes_on_action_; |
| 51 } | 51 } |
| 52 | 52 |
| 53 base::string16 MockConfirmInfoBarDelegate::GetLinkText() const { | 53 base::string16 MockConfirmInfoBarDelegate::GetLinkText() const { |
| 54 link_text_accessed_ = true; | 54 link_text_accessed_ = true; |
| 55 return base::string16(); | 55 return base::string16(); |
| 56 } | 56 } |
| 57 | 57 |
| 58 bool MockConfirmInfoBarDelegate::LinkClicked( | 58 bool MockConfirmInfoBarDelegate::LinkClicked( |
| 59 WindowOpenDisposition disposition) { | 59 WindowOpenDisposition disposition) { |
| 60 link_clicked_ = true; | 60 link_clicked_ = true; |
| 61 return closes_on_action_; | 61 return closes_on_action_; |
| 62 } | 62 } |
| OLD | NEW |