Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(997)

Unified Diff: chrome/browser/garbled_text_infobar_delegate.h

Issue 9235004: [Garbled Text][Infobar] Adding infobar to suggest turning on encoding detection. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: rebase Created 8 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/garbled_text_helper_unittest.cc ('k') | chrome/browser/garbled_text_infobar_delegate.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_
« no previous file with comments | « chrome/browser/garbled_text_helper_unittest.cc ('k') | chrome/browser/garbled_text_infobar_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698