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

Side by Side Diff: ios/chrome/browser/ui/qr_scanner/camera_controller.h

Issue 2912373002: [iOS] Stop swizzling the |init| method of CameraController. (Closed)
Patch Set: Created 3 years, 6 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 unified diff | Download patch
« no previous file with comments | « no previous file | ios/chrome/browser/ui/qr_scanner/camera_controller.mm » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef IOS_CHROME_BROWSER_UI_QR_SCANNER_CAMERA_CONTROLLER_H_ 5 #ifndef IOS_CHROME_BROWSER_UI_QR_SCANNER_CAMERA_CONTROLLER_H_
6 #define IOS_CHROME_BROWSER_UI_QR_SCANNER_CAMERA_CONTROLLER_H_ 6 #define IOS_CHROME_BROWSER_UI_QR_SCANNER_CAMERA_CONTROLLER_H_
7 7
8 #import <AVFoundation/AVFoundation.h> 8 #import <AVFoundation/AVFoundation.h>
9 #import <UIKit/UIKit.h> 9 #import <UIKit/UIKit.h>
10 10
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 60
61 // The CameraController manages the AVCaptureSession, its inputs, outputs, and 61 // The CameraController manages the AVCaptureSession, its inputs, outputs, and
62 // notifications for the QRScannerViewController. 62 // notifications for the QRScannerViewController.
63 @interface CameraController : NSObject 63 @interface CameraController : NSObject
64 64
65 // The current state of the torch. 65 // The current state of the torch.
66 @property(nonatomic, readonly, assign, getter=isTorchActive) BOOL torchActive; 66 @property(nonatomic, readonly, assign, getter=isTorchActive) BOOL torchActive;
67 67
68 - (instancetype)init NS_UNAVAILABLE; 68 - (instancetype)init NS_UNAVAILABLE;
69 69
70 // Initializes the controller with the |delegate|. 70 // Returns a new controller with the |delegate|.
71 - (instancetype)initWithDelegate:(id<CameraControllerDelegate>)delegate 71 + (instancetype)cameraControllerWithDelegate:
72 NS_DESIGNATED_INITIALIZER; 72 (id<CameraControllerDelegate>)delegate;
73 73
74 // Returns the app's authorization in regards to the camera. 74 // Returns the app's authorization in regards to the camera.
75 - (AVAuthorizationStatus)getAuthorizationStatus; 75 - (AVAuthorizationStatus)getAuthorizationStatus;
76 76
77 // Asks the user to grant the authorization to access the camera. 77 // Asks the user to grant the authorization to access the camera.
78 // Should only be called when the current authorization status is 78 // Should only be called when the current authorization status is
79 // AVAuthorizationStatusNotDetermined. 79 // AVAuthorizationStatusNotDetermined.
80 - (void)requestAuthorizationAndLoadCaptureSession: 80 - (void)requestAuthorizationAndLoadCaptureSession:
81 (AVCaptureVideoPreviewLayer*)previewLayer; 81 (AVCaptureVideoPreviewLayer*)previewLayer;
82 82
(...skipping 18 matching lines...) Expand all
101 // available. 101 // available.
102 - (void)stopRecording; 102 - (void)stopRecording;
103 103
104 // Sets the camera's torch mode to |mode|. Does nothing if the camera is not 104 // Sets the camera's torch mode to |mode|. Does nothing if the camera is not
105 // available or the torch mode is not supported. 105 // available or the torch mode is not supported.
106 - (void)setTorchMode:(AVCaptureTorchMode)mode; 106 - (void)setTorchMode:(AVCaptureTorchMode)mode;
107 107
108 @end 108 @end
109 109
110 #endif // IOS_CHROME_BROWSER_UI_QR_SCANNER_CAMERA_CONTROLLER_H_ 110 #endif // IOS_CHROME_BROWSER_UI_QR_SCANNER_CAMERA_CONTROLLER_H_
OLDNEW
« no previous file with comments | « no previous file | ios/chrome/browser/ui/qr_scanner/camera_controller.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698