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

Side by Side Diff: ios/chrome/browser/ui/payments/payment_request_selector_view_controller.mm

Issue 2945303003: [Payment Request] Fixes the behavior of selector coordinators in edit mode. (Closed)
Patch Set: initial Created 3 years, 6 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
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/ui/payments/payment_request_selector_view_controller .h" 5 #import "ios/chrome/browser/ui/payments/payment_request_selector_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/ui/autofill/cells/status_item.h" 9 #import "ios/chrome/browser/ui/autofill/cells/status_item.h"
10 #import "ios/chrome/browser/ui/collection_view/cells/MDCCollectionViewCell+Chrom e.h" 10 #import "ios/chrome/browser/ui/collection_view/cells/MDCCollectionViewCell+Chrom e.h"
(...skipping 30 matching lines...) Expand all
41 ItemTypeSelectableItem, // This is a repeated item type. 41 ItemTypeSelectableItem, // This is a repeated item type.
42 ItemTypeSpinner, 42 ItemTypeSpinner,
43 ItemTypeAddItem, 43 ItemTypeAddItem,
44 }; 44 };
45 45
46 } // namespace 46 } // namespace
47 47
48 @interface PaymentRequestSelectorViewController ()< 48 @interface PaymentRequestSelectorViewController ()<
49 PaymentRequestSelectorViewControllerActions> 49 PaymentRequestSelectorViewControllerActions>
50 50
51 // Whether or not the editor is in the editing mode.
52 @property(nonatomic, assign, getter=isEditing) BOOL editing;
53
54 @end 51 @end
55 52
56 @implementation PaymentRequestSelectorViewController 53 @implementation PaymentRequestSelectorViewController
57 54
58 @synthesize delegate = _delegate; 55 @synthesize delegate = _delegate;
59 @synthesize dataSource = _dataSource; 56 @synthesize dataSource = _dataSource;
60 @synthesize editing = _editing; 57 @synthesize editing = _editing;
61 58
62 - (instancetype)init { 59 - (instancetype)init {
63 if ((self = [super initWithStyle:CollectionViewControllerStyleAppBar])) { 60 if ((self = [super initWithStyle:CollectionViewControllerStyleAppBar])) {
(...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after
322 hidesInkViewAtIndexPath:(NSIndexPath*)indexPath { 319 hidesInkViewAtIndexPath:(NSIndexPath*)indexPath {
323 NSInteger type = [self.collectionViewModel itemTypeForIndexPath:indexPath]; 320 NSInteger type = [self.collectionViewModel itemTypeForIndexPath:indexPath];
324 if (type == ItemTypeHeader) { 321 if (type == ItemTypeHeader) {
325 return YES; 322 return YES;
326 } else { 323 } else {
327 return NO; 324 return NO;
328 } 325 }
329 } 326 }
330 327
331 @end 328 @end
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698