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

Side by Side Diff: ios/chrome/browser/ui/qr_scanner/qr_scanner_view_controller.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 unified diff | Download patch
« no previous file with comments | « ios/chrome/browser/ui/qr_scanner/qr_scanner_view.mm ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef IOS_CHROME_BROWSER_UI_QR_SCANNER_QR_SCANNER_VIEW_CONTROLLER_H_
6 #define IOS_CHROME_BROWSER_UI_QR_SCANNER_QR_SCANNER_VIEW_CONTROLLER_H_
7
8 #import <UIKit/UIKit.h>
9
10 #include "ios/chrome/browser/ui/qr_scanner/camera_controller.h"
11
12 @protocol QRScannerViewControllerDelegate
13
14 // Called when the scanner detects a valid code. Camera recording is stopped
15 // when a result is scanned and the QRScannerViewController is dismissed. This
16 // function is called when the dismissal completes. A valid code is any
17 // non-empty string. If |load| is YES, the scanned code was of a type which can
18 // only encode digits, and the delegate can load the result immediately, instead
19 // of prompting the user to confirm the result.
20 - (void)receiveQRScannerResult:(NSString*)qrScannerResult
21 loadImmediately:(BOOL)load;
22
23 @end
24
25 @interface QRScannerViewController : UIViewController<CameraControllerDelegate>
26
27 // The delegate which receives the scanned result after the view controller is
28 // dismissed.
29 @property(nonatomic, assign) id<QRScannerViewControllerDelegate> delegate;
30
31 - (instancetype)initWithDelegate:(id<QRScannerViewControllerDelegate>)delegate
32 NS_DESIGNATED_INITIALIZER;
33
34 - (instancetype)initWithNibName:(NSString*)name
35 bundle:(NSBundle*)bundle NS_UNAVAILABLE;
36
37 - (instancetype)initWithCoder:(NSCoder*)coder NS_UNAVAILABLE;
38
39 // Returns a view controller to be presented based on the camera state. Returns
40 // |self| if the camera is available or an appropriate UIAlertController if
41 // there was an error loading the camera.
42 - (UIViewController*)getViewControllerToPresent;
43
44 @end
45
46 #endif // IOS_CHROME_BROWSER_UI_QR_SCANNER_QR_SCANNER_VIEW_CONTROLLER_H_
OLDNEW
« no previous file with comments | « ios/chrome/browser/ui/qr_scanner/qr_scanner_view.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698