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/fake_chrome_identity_interact
ion_manager.h" | 5 #import "ios/public/provider/chrome/browser/signin/fake_chrome_identity_interact
ion_manager.h" |
6 | 6 |
7 #include "base/mac/scoped_block.h" | 7 #include "base/mac/scoped_block.h" |
8 #include "base/mac/scoped_nsobject.h" | 8 #include "base/mac/scoped_nsobject.h" |
9 #import "ios/public/provider/chrome/browser/chrome_browser_provider.h" | 9 #import "ios/public/provider/chrome/browser/chrome_browser_provider.h" |
10 #import "ios/public/provider/chrome/browser/signin/fake_chrome_identity_service.
h" | 10 #import "ios/public/provider/chrome/browser/signin/fake_chrome_identity_service.
h" |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
58 | 58 |
59 _signInButton.reset([[UIButton buttonWithType:UIButtonTypeCustom] retain]); | 59 _signInButton.reset([[UIButton buttonWithType:UIButtonTypeCustom] retain]); |
60 [_signInButton setTitle:@"Sign in" forState:UIControlStateNormal]; | 60 [_signInButton setTitle:@"Sign in" forState:UIControlStateNormal]; |
61 [_signInButton addTarget:self | 61 [_signInButton addTarget:self |
62 action:@selector(didTapSignIn:) | 62 action:@selector(didTapSignIn:) |
63 forControlEvents:UIControlEventTouchUpInside]; | 63 forControlEvents:UIControlEventTouchUpInside]; |
64 [self.view addSubview:_signInButton]; | 64 [self.view addSubview:_signInButton]; |
65 | 65 |
66 _cancelButton.reset([[UIButton buttonWithType:UIButtonTypeCustom] retain]); | 66 _cancelButton.reset([[UIButton buttonWithType:UIButtonTypeCustom] retain]); |
67 [_cancelButton setTitle:@"Cancel" forState:UIControlStateNormal]; | 67 [_cancelButton setTitle:@"Cancel" forState:UIControlStateNormal]; |
| 68 [_cancelButton setAccessibilityIdentifier:@"cancel"]; |
68 [_cancelButton addTarget:self | 69 [_cancelButton addTarget:self |
69 action:@selector(didTapCancel:) | 70 action:@selector(didTapCancel:) |
70 forControlEvents:UIControlEventTouchUpInside]; | 71 forControlEvents:UIControlEventTouchUpInside]; |
71 [self.view addSubview:_cancelButton]; | 72 [self.view addSubview:_cancelButton]; |
72 } | 73 } |
73 | 74 |
74 - (void)viewWillLayoutSubviews { | 75 - (void)viewWillLayoutSubviews { |
75 [super viewWillLayoutSubviews]; | 76 [super viewWillLayoutSubviews]; |
76 | 77 |
77 CGRect bounds = self.view.bounds; | 78 CGRect bounds = self.view.bounds; |
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
163 | 164 |
164 - (NSError*)canceledError { | 165 - (NSError*)canceledError { |
165 ios::SigninErrorProvider* provider = | 166 ios::SigninErrorProvider* provider = |
166 ios::GetChromeBrowserProvider()->GetSigninErrorProvider(); | 167 ios::GetChromeBrowserProvider()->GetSigninErrorProvider(); |
167 return [NSError errorWithDomain:provider->GetSigninErrorDomain() | 168 return [NSError errorWithDomain:provider->GetSigninErrorDomain() |
168 code:provider->GetCode(ios::SigninError::CANCELED) | 169 code:provider->GetCode(ios::SigninError::CANCELED) |
169 userInfo:nil]; | 170 userInfo:nil]; |
170 } | 171 } |
171 | 172 |
172 @end | 173 @end |
OLD | NEW |