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

Side by Side Diff: ios/chrome/browser/payments/payment_request_error_coordinator.mm

Issue 2701923003: [Payment Request] Error message screen (Closed)
Patch Set: ARCified Created 3 years, 9 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
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #import "ios/chrome/browser/payments/payment_request_error_coordinator.h"
6
7 #include "components/strings/grit/components_strings.h"
8 #include "ui/base/l10n/l10n_util.h"
9
10 #if !defined(__has_feature) || !__has_feature(objc_arc)
11 #error "This file requires ARC support."
12 #endif
13
14 @interface PaymentRequestErrorCoordinator () {
15 PaymentRequestErrorViewController* _viewController;
16 }
17
18 @end
19
20 @implementation PaymentRequestErrorCoordinator
21
22 @synthesize callback = _callback;
23 @synthesize delegate = _delegate;
24
25 - (void)start {
26 _viewController = [[PaymentRequestErrorViewController alloc] init];
27 [_viewController
28 setErrorMessage:l10n_util::GetNSString(IDS_PAYMENTS_ERROR_MESSAGE)];
29 [_viewController setDelegate:self];
30 [_viewController loadModel];
31
32 [[self baseViewController] presentViewController:_viewController
33 animated:YES
34 completion:nil];
35 }
36
37 - (void)stop {
38 [[_viewController presentingViewController]
39 dismissViewControllerAnimated:YES
40 completion:nil];
41 _viewController = nil;
42 }
43
44 #pragma mark - PaymentRequestErrorViewControllerDelegate
45
46 - (void)paymentRequestErrorViewControllerDidDismiss:
47 (PaymentRequestErrorViewController*)controller {
48 [_delegate paymentRequestErrorCoordinatorDidDismiss:self];
49 }
50
51 @end
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698