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

Unified Diff: ios/chrome/browser/ui/reader_mode/reader_mode_infobar_delegate.h

Issue 2589583003: Upstream Chrome on iOS source code [7/11]. (Closed)
Patch Set: Created 4 years 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
Index: ios/chrome/browser/ui/reader_mode/reader_mode_infobar_delegate.h
diff --git a/ios/chrome/browser/ui/reader_mode/reader_mode_infobar_delegate.h b/ios/chrome/browser/ui/reader_mode/reader_mode_infobar_delegate.h
new file mode 100644
index 0000000000000000000000000000000000000000..eb6edd8ba6682b7de19e30eabb3bc357d6113f43
--- /dev/null
+++ b/ios/chrome/browser/ui/reader_mode/reader_mode_infobar_delegate.h
@@ -0,0 +1,34 @@
+// Copyright 2015 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 IOS_CHROME_BROWSER_UI_READER_MODE_READER_MODE_INFOBAR_DELEGATE_H_
+#define IOS_CHROME_BROWSER_UI_READER_MODE_READER_MODE_INFOBAR_DELEGATE_H_
+
+#include <string>
+
+#include "base/callback.h"
+#include "components/infobars/core/confirm_infobar_delegate.h"
+#include "url/gurl.h"
+
+// This is the actual infobar displayed to prompt the user to switch to reader
+// mode.
+class ReaderModeInfoBarDelegate : public ConfirmInfoBarDelegate {
+ public:
+ explicit ReaderModeInfoBarDelegate(const base::Closure& callback);
+ ~ReaderModeInfoBarDelegate() override;
+
+ // InfoBarDelegate methods.
+ InfoBarIdentifier GetIdentifier() const override;
+
+ // ConfirmInfoBarDelegate methods.
+ base::string16 GetMessageText() const override;
+ bool Accept() override;
+
+ private:
+ std::string html_;
+ GURL url_;
+ base::Closure callback_;
+};
+
+#endif // IOS_CHROME_BROWSER_UI_READER_MODE_READER_MODE_INFOBAR_DELEGATE_H_

Powered by Google App Engine
This is Rietveld 408576698