OLD | NEW |
1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 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/chrome/browser/payments/payment_request_error_view_controller.h" | 5 #import "ios/chrome/browser/payments/payment_request_error_view_controller.h" |
6 | 6 |
7 #include "base/mac/foundation_util.h" | 7 #include "base/mac/foundation_util.h" |
8 #include "components/strings/grit/components_strings.h" | 8 #include "components/strings/grit/components_strings.h" |
9 #import "ios/chrome/browser/payments/cells/payments_text_item.h" | 9 #import "ios/chrome/browser/payments/cells/payments_text_item.h" |
10 #import "ios/chrome/browser/payments/payment_request_error_view_controller_actio
ns.h" | 10 #import "ios/chrome/browser/payments/payment_request_error_view_controller_actio
ns.h" |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
44 | 44 |
45 @end | 45 @end |
46 | 46 |
47 @implementation PaymentRequestErrorViewController | 47 @implementation PaymentRequestErrorViewController |
48 | 48 |
49 @synthesize errorMessage = _errorMessage; | 49 @synthesize errorMessage = _errorMessage; |
50 @synthesize delegate = _delegate; | 50 @synthesize delegate = _delegate; |
51 | 51 |
52 - (instancetype)init { | 52 - (instancetype)init { |
53 if ((self = [super initWithStyle:CollectionViewControllerStyleAppBar])) { | 53 if ((self = [super initWithStyle:CollectionViewControllerStyleAppBar])) { |
54 [self setTitle:l10n_util::GetNSString(IDS_IOS_PAYMENT_REQUEST_TITLE)]; | 54 [self setTitle:l10n_util::GetNSString(IDS_PAYMENTS_TITLE)]; |
55 | 55 |
56 // Set up trailing (ok) button. | 56 // Set up trailing (ok) button. |
57 _okButton = | 57 _okButton = |
58 [[UIBarButtonItem alloc] initWithTitle:l10n_util::GetNSString(IDS_OK) | 58 [[UIBarButtonItem alloc] initWithTitle:l10n_util::GetNSString(IDS_OK) |
59 style:UIBarButtonItemStylePlain | 59 style:UIBarButtonItemStylePlain |
60 target:nil | 60 target:nil |
61 action:@selector(onOk)]; | 61 action:@selector(onOk)]; |
62 [_okButton setTitleTextAttributes:@{ | 62 [_okButton setTitleTextAttributes:@{ |
63 NSForegroundColorAttributeName : [UIColor lightGrayColor] | 63 NSForegroundColorAttributeName : [UIColor lightGrayColor] |
64 } | 64 } |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
131 return [MDCCollectionViewCell | 131 return [MDCCollectionViewCell |
132 cr_preferredHeightForWidth:CGRectGetWidth(collectionView.bounds) | 132 cr_preferredHeightForWidth:CGRectGetWidth(collectionView.bounds) |
133 forItem:item]; | 133 forItem:item]; |
134 default: | 134 default: |
135 NOTREACHED(); | 135 NOTREACHED(); |
136 return MDCCellDefaultOneLineHeight; | 136 return MDCCellDefaultOneLineHeight; |
137 } | 137 } |
138 } | 138 } |
139 | 139 |
140 @end | 140 @end |
OLD | NEW |