OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef IOS_CHROME_BROWSER_UI_READER_MODE_READER_MODE_INFOBAR_DELEGATE_H_ |
| 6 #define IOS_CHROME_BROWSER_UI_READER_MODE_READER_MODE_INFOBAR_DELEGATE_H_ |
| 7 |
| 8 #include <string> |
| 9 |
| 10 #include "base/callback.h" |
| 11 #include "components/infobars/core/confirm_infobar_delegate.h" |
| 12 #include "url/gurl.h" |
| 13 |
| 14 // This is the actual infobar displayed to prompt the user to switch to reader |
| 15 // mode. |
| 16 class ReaderModeInfoBarDelegate : public ConfirmInfoBarDelegate { |
| 17 public: |
| 18 explicit ReaderModeInfoBarDelegate(const base::Closure& callback); |
| 19 ~ReaderModeInfoBarDelegate() override; |
| 20 |
| 21 // InfoBarDelegate methods. |
| 22 InfoBarIdentifier GetIdentifier() const override; |
| 23 |
| 24 // ConfirmInfoBarDelegate methods. |
| 25 base::string16 GetMessageText() const override; |
| 26 bool Accept() override; |
| 27 |
| 28 private: |
| 29 std::string html_; |
| 30 GURL url_; |
| 31 base::Closure callback_; |
| 32 }; |
| 33 |
| 34 #endif // IOS_CHROME_BROWSER_UI_READER_MODE_READER_MODE_INFOBAR_DELEGATE_H_ |
OLD | NEW |