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

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

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.mm
diff --git a/ios/chrome/browser/ui/reader_mode/reader_mode_infobar_delegate.mm b/ios/chrome/browser/ui/reader_mode/reader_mode_infobar_delegate.mm
new file mode 100644
index 0000000000000000000000000000000000000000..fd65a49bb9b6b76c91092714b723242f1f6f3772
--- /dev/null
+++ b/ios/chrome/browser/ui/reader_mode/reader_mode_infobar_delegate.mm
@@ -0,0 +1,28 @@
+// 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.
+
+#import "ios/chrome/browser/ui/reader_mode/reader_mode_infobar_delegate.h"
+
+#include "base/strings/utf_string_conversions.h"
+
+ReaderModeInfoBarDelegate::ReaderModeInfoBarDelegate(
+ const base::Closure& callback)
+ : callback_(callback) {}
+
+ReaderModeInfoBarDelegate::~ReaderModeInfoBarDelegate() {}
+
+infobars::InfoBarDelegate::InfoBarIdentifier
+ReaderModeInfoBarDelegate::GetIdentifier() const {
+ return READER_MODE_INFOBAR_DELEGATE_IOS;
+}
+
+base::string16 ReaderModeInfoBarDelegate::GetMessageText() const {
+ // TODO(noyau): Waiting for text to put here.
+ return base::ASCIIToUTF16("Open in reader mode");
+}
+
+bool ReaderModeInfoBarDelegate::Accept() {
+ callback_.Run();
+ return true;
+}
« no previous file with comments | « ios/chrome/browser/ui/reader_mode/reader_mode_infobar_delegate.h ('k') | ios/chrome/browser/ui/reader_mode/reader_mode_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698