| OLD | NEW |
| 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_PUBLIC_PROVIDER_CHROME_BROWSER_SIGNIN_CHROME_IDENTITY_INTERACTION_MA
NAGER_H_ | 5 #ifndef IOS_PUBLIC_PROVIDER_CHROME_BROWSER_SIGNIN_CHROME_IDENTITY_INTERACTION_MA
NAGER_H_ |
| 6 #define IOS_PUBLIC_PROVIDER_CHROME_BROWSER_SIGNIN_CHROME_IDENTITY_INTERACTION_MA
NAGER_H_ | 6 #define IOS_PUBLIC_PROVIDER_CHROME_BROWSER_SIGNIN_CHROME_IDENTITY_INTERACTION_MA
NAGER_H_ |
| 7 | 7 |
| 8 #import <UIKit/UIKit.h> | 8 #import <UIKit/UIKit.h> |
| 9 | 9 |
| 10 #import "base/ios/block_types.h" | 10 #import "base/ios/block_types.h" |
| (...skipping 12 matching lines...) Expand all Loading... |
| 23 // * |identity| is the identity that was added/reauthenticated. | 23 // * |identity| is the identity that was added/reauthenticated. |
| 24 // * |error| is nil unless there was an error during the operation. | 24 // * |error| is nil unless there was an error during the operation. |
| 25 typedef void (^SigninCompletionCallback)(ChromeIdentity* identity, | 25 typedef void (^SigninCompletionCallback)(ChromeIdentity* identity, |
| 26 NSError* error); | 26 NSError* error); |
| 27 | 27 |
| 28 // ChromeIdentityInteractionManager abstracts the interaction to add identities | 28 // ChromeIdentityInteractionManager abstracts the interaction to add identities |
| 29 // on iOS. | 29 // on iOS. |
| 30 @interface ChromeIdentityInteractionManager : NSObject | 30 @interface ChromeIdentityInteractionManager : NSObject |
| 31 | 31 |
| 32 // Delegate used to present and dismiss the view controllers. | 32 // Delegate used to present and dismiss the view controllers. |
| 33 @property(nonatomic, assign) id<ChromeIdentityInteractionManagerDelegate> | 33 @property(nonatomic, weak) id<ChromeIdentityInteractionManagerDelegate> |
| 34 delegate; | 34 delegate; |
| 35 | 35 |
| 36 // Whether the manager is currently being canceled. Delegates may inquire if the | 36 // Whether the manager is currently being canceled. Delegates may inquire if the |
| 37 // dismissal is due to sign-in being canceled. | 37 // dismissal is due to sign-in being canceled. |
| 38 @property(nonatomic, readonly) BOOL isCanceling; | 38 @property(nonatomic, readonly) BOOL isCanceling; |
| 39 | 39 |
| 40 // Starts the add account operation for a user. Presents user with the screen to | 40 // Starts the add account operation for a user. Presents user with the screen to |
| 41 // enter credentials. | 41 // enter credentials. |
| 42 // Note: Calling this method will fail and the completion will be called with a | 42 // Note: Calling this method will fail and the completion will be called with a |
| 43 // CHROME_IDENTITY_OPERATION_ONGOING error if there is already another add | 43 // CHROME_IDENTITY_OPERATION_ONGOING error if there is already another add |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 87 // animation. | 87 // animation. |
| 88 // * |completion| is the completion block to call once the dismissal operation | 88 // * |completion| is the completion block to call once the dismissal operation |
| 89 // is finished. | 89 // is finished. |
| 90 - (void)interactionManager:(ChromeIdentityInteractionManager*)interactionManager | 90 - (void)interactionManager:(ChromeIdentityInteractionManager*)interactionManager |
| 91 dismissViewControllerAnimated:(BOOL)animated | 91 dismissViewControllerAnimated:(BOOL)animated |
| 92 completion:(ProceduralBlock)completion; | 92 completion:(ProceduralBlock)completion; |
| 93 | 93 |
| 94 @end | 94 @end |
| 95 | 95 |
| 96 #endif // IOS_PUBLIC_PROVIDER_CHROME_BROWSER_SIGNIN_CHROME_IDENTITY_INTERACTION
_MANAGER_H_ | 96 #endif // IOS_PUBLIC_PROVIDER_CHROME_BROWSER_SIGNIN_CHROME_IDENTITY_INTERACTION
_MANAGER_H_ |
| OLD | NEW |