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

Unified Diff: ios/chrome/browser/ui/qr_scanner/qr_scanner_alerts.h

Issue 2589803002: Upstream Chrome on iOS source code [6/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/qr_scanner/qr_scanner_alerts.h
diff --git a/ios/chrome/browser/ui/qr_scanner/qr_scanner_alerts.h b/ios/chrome/browser/ui/qr_scanner/qr_scanner_alerts.h
new file mode 100644
index 0000000000000000000000000000000000000000..0b9585da60be083f5010d6ae19f914cce7609ff2
--- /dev/null
+++ b/ios/chrome/browser/ui/qr_scanner/qr_scanner_alerts.h
@@ -0,0 +1,27 @@
+// Copyright 2016 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_QR_SCANNER_QR_SCANNER_ALERTS_H_
+#define IOS_CHROME_BROWSER_UI_QR_SCANNER_QR_SCANNER_ALERTS_H_
+
+#include "ios/chrome/browser/ui/qr_scanner/camera_controller.h"
+
+@class UIAlertAction;
+@class UIAlertController;
+
+namespace qr_scanner {
+
+// Block type that takes a UIAlertAction. Blocks of this type will be called
+// when the Cancel button of a UIAlertView is pressed.
+typedef void (^CancelAlertAction)(UIAlertAction* alertAction);
+
+// Returns a dialog to be displayed when the camera state is |state|.
+// |cancelBlock| is executed when the button to close the dialog is tapped. If
+// |cancelBlock| is nil, the dialog is dismissed on cancel.
+UIAlertController* DialogForCameraState(CameraState state,
+ CancelAlertAction cancelBlock);
+
+} // namespace qr_scanner
+
+#endif // IOS_CHROME_BROWSER_UI_QR_SCANNER_QR_SCANNER_ALERTS_H_
« no previous file with comments | « ios/chrome/browser/ui/qr_scanner/camera_controller.mm ('k') | ios/chrome/browser/ui/qr_scanner/qr_scanner_alerts.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698