OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef CHROME_BROWSER_GARBLED_TEXT_INFOBAR_DELEGATE_H_ |
| 6 #define CHROME_BROWSER_GARBLED_TEXT_INFOBAR_DELEGATE_H_ |
| 7 #pragma once |
| 8 |
| 9 #include "base/callback.h" |
| 10 #include "chrome/browser/tab_contents/confirm_infobar_delegate.h" |
| 11 |
| 12 class InfoBarTabHelper; |
| 13 |
| 14 namespace content { |
| 15 struct LoadCommittedDetails; |
| 16 } |
| 17 |
| 18 class GarbledTextInfoBarDelegate : public ConfirmInfoBarDelegate { |
| 19 public: |
| 20 GarbledTextInfoBarDelegate(InfoBarTabHelper* infobar_helper, |
| 21 const base::Closure& callback); |
| 22 |
| 23 virtual GarbledTextInfoBarDelegate* AsGarbledTextInfoBarDelegate() OVERRIDE; |
| 24 |
| 25 private: |
| 26 friend class GarbledTextHelperTest; |
| 27 |
| 28 virtual ~GarbledTextInfoBarDelegate(); |
| 29 |
| 30 virtual int GetButtons() const OVERRIDE; |
| 31 virtual string16 GetButtonLabel(InfoBarButton button) const OVERRIDE; |
| 32 virtual string16 GetMessageText() const OVERRIDE; |
| 33 virtual bool ShouldExpire( |
| 34 const content::LoadCommittedDetails&) const OVERRIDE; |
| 35 |
| 36 virtual void InfoBarDismissed() OVERRIDE; |
| 37 virtual bool Accept() OVERRIDE; |
| 38 virtual bool Cancel() OVERRIDE; |
| 39 |
| 40 base::Closure callback_; |
| 41 |
| 42 DISALLOW_COPY_AND_ASSIGN(GarbledTextInfoBarDelegate); |
| 43 }; |
| 44 |
| 45 #endif // CHROME_BROWSER_GARBLED_TEXT_INFOBAR_DELEGATE_H_ |
OLD | NEW |