| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 #import "ios/chrome/browser/ui/reader_mode/reader_mode_infobar_delegate.h" | 5 #import "ios/chrome/browser/ui/reader_mode/reader_mode_infobar_delegate.h" |
| 6 | 6 |
| 7 #include "base/strings/utf_string_conversions.h" | 7 #include "base/strings/utf_string_conversions.h" |
| 8 | 8 |
| 9 #if !defined(__has_feature) || !__has_feature(objc_arc) |
| 10 #error "This file requires ARC support." |
| 11 #endif |
| 12 |
| 9 ReaderModeInfoBarDelegate::ReaderModeInfoBarDelegate( | 13 ReaderModeInfoBarDelegate::ReaderModeInfoBarDelegate( |
| 10 const base::Closure& callback) | 14 const base::Closure& callback) |
| 11 : callback_(callback) {} | 15 : callback_(callback) {} |
| 12 | 16 |
| 13 ReaderModeInfoBarDelegate::~ReaderModeInfoBarDelegate() {} | 17 ReaderModeInfoBarDelegate::~ReaderModeInfoBarDelegate() {} |
| 14 | 18 |
| 15 infobars::InfoBarDelegate::InfoBarIdentifier | 19 infobars::InfoBarDelegate::InfoBarIdentifier |
| 16 ReaderModeInfoBarDelegate::GetIdentifier() const { | 20 ReaderModeInfoBarDelegate::GetIdentifier() const { |
| 17 return READER_MODE_INFOBAR_DELEGATE_IOS; | 21 return READER_MODE_INFOBAR_DELEGATE_IOS; |
| 18 } | 22 } |
| 19 | 23 |
| 20 base::string16 ReaderModeInfoBarDelegate::GetMessageText() const { | 24 base::string16 ReaderModeInfoBarDelegate::GetMessageText() const { |
| 21 // TODO(noyau): Waiting for text to put here. | 25 // TODO(noyau): Waiting for text to put here. |
| 22 return base::ASCIIToUTF16("Open in reader mode"); | 26 return base::ASCIIToUTF16("Open in reader mode"); |
| 23 } | 27 } |
| 24 | 28 |
| 25 bool ReaderModeInfoBarDelegate::Accept() { | 29 bool ReaderModeInfoBarDelegate::Accept() { |
| 26 callback_.Run(); | 30 callback_.Run(); |
| 27 return true; | 31 return true; |
| 28 } | 32 } |
| OLD | NEW |