Index: chrome/browser/garbled_text_infobar_delegate.h |
diff --git a/chrome/browser/garbled_text_infobar_delegate.h b/chrome/browser/garbled_text_infobar_delegate.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..c323136e2a1a3c86caa5e4b7e17b6e3e817b5719 |
--- /dev/null |
+++ b/chrome/browser/garbled_text_infobar_delegate.h |
@@ -0,0 +1,45 @@ |
+// Copyright (c) 2012 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#ifndef CHROME_BROWSER_GARBLED_TEXT_INFOBAR_DELEGATE_H_ |
+#define CHROME_BROWSER_GARBLED_TEXT_INFOBAR_DELEGATE_H_ |
+#pragma once |
+ |
+#include "base/callback.h" |
+#include "chrome/browser/tab_contents/confirm_infobar_delegate.h" |
+ |
+class InfoBarTabHelper; |
+ |
+namespace content { |
+struct LoadCommittedDetails; |
+} |
+ |
+class GarbledTextInfoBarDelegate : public ConfirmInfoBarDelegate { |
+ public: |
+ GarbledTextInfoBarDelegate(InfoBarTabHelper* infobar_helper, |
+ const base::Closure& callback); |
+ |
+ virtual GarbledTextInfoBarDelegate* AsGarbledTextInfoBarDelegate() OVERRIDE; |
+ |
+ private: |
+ friend class GarbledTextHelperTest; |
+ |
+ virtual ~GarbledTextInfoBarDelegate(); |
+ |
+ virtual int GetButtons() const OVERRIDE; |
+ virtual string16 GetButtonLabel(InfoBarButton button) const OVERRIDE; |
+ virtual string16 GetMessageText() const OVERRIDE; |
+ virtual bool ShouldExpire( |
+ const content::LoadCommittedDetails&) const OVERRIDE; |
+ |
+ virtual void InfoBarDismissed() OVERRIDE; |
+ virtual bool Accept() OVERRIDE; |
+ virtual bool Cancel() OVERRIDE; |
+ |
+ base::Closure callback_; |
+ |
+ DISALLOW_COPY_AND_ASSIGN(GarbledTextInfoBarDelegate); |
+}; |
+ |
+#endif // CHROME_BROWSER_GARBLED_TEXT_INFOBAR_DELEGATE_H_ |