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 #import "ios/public/provider/chrome/browser/signin/chrome_identity_interaction_m
anager.h" | 5 #import "ios/public/provider/chrome/browser/signin/chrome_identity_interaction_m
anager.h" |
6 | 6 |
7 #import "base/ios/weak_nsobject.h" | |
8 #include "base/logging.h" | 7 #include "base/logging.h" |
9 | 8 |
10 @interface ChromeIdentityInteractionManager () { | 9 #if !defined(__has_feature) || !__has_feature(objc_arc) |
11 base::WeakNSProtocol<id<ChromeIdentityInteractionManagerDelegate>> _delegate; | 10 #error "This file requires ARC support." |
12 } | 11 #endif |
13 @end | |
14 | 12 |
15 @implementation ChromeIdentityInteractionManager | 13 @implementation ChromeIdentityInteractionManager |
16 | 14 @synthesize delegate = _delegate; |
17 - (id<ChromeIdentityInteractionManagerDelegate>)delegate { | |
18 return _delegate; | |
19 } | |
20 | |
21 - (void)setDelegate:(id<ChromeIdentityInteractionManagerDelegate>)delegate { | |
22 _delegate.reset(delegate); | |
23 } | |
24 | 15 |
25 - (BOOL)isCanceling { | 16 - (BOOL)isCanceling { |
26 return NO; | 17 return NO; |
27 } | 18 } |
28 | 19 |
29 - (void)addAccountWithCompletion:(SigninCompletionCallback)completion { | 20 - (void)addAccountWithCompletion:(SigninCompletionCallback)completion { |
30 NOTREACHED() << "Subclasses must override this"; | 21 NOTREACHED() << "Subclasses must override this"; |
31 completion(nil, nil); | 22 completion(nil, nil); |
32 } | 23 } |
33 | 24 |
34 - (void)reauthenticateUserWithID:(NSString*)userID | 25 - (void)reauthenticateUserWithID:(NSString*)userID |
35 email:(NSString*)userEmail | 26 email:(NSString*)userEmail |
36 completion:(SigninCompletionCallback)completion { | 27 completion:(SigninCompletionCallback)completion { |
37 NOTREACHED() << "Subclasses must override this"; | 28 NOTREACHED() << "Subclasses must override this"; |
38 completion(nil, nil); | 29 completion(nil, nil); |
39 } | 30 } |
40 | 31 |
41 - (void)cancelAndDismissAnimated:(BOOL)animated { | 32 - (void)cancelAndDismissAnimated:(BOOL)animated { |
42 NOTREACHED() << "Subclasses must override this"; | 33 NOTREACHED() << "Subclasses must override this"; |
43 } | 34 } |
44 | 35 |
45 @end | 36 @end |
OLD | NEW |