| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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 #ifndef CHROME_BROWSER_UI_COCOA_AUTOFILL_AUTOFILL_DETAILS_CONTAINER_H_ | 5 #ifndef CHROME_BROWSER_UI_COCOA_AUTOFILL_AUTOFILL_DETAILS_CONTAINER_H_ |
| 6 #define CHROME_BROWSER_UI_COCOA_AUTOFILL_AUTOFILL_DETAILS_CONTAINER_H_ | 6 #define CHROME_BROWSER_UI_COCOA_AUTOFILL_AUTOFILL_DETAILS_CONTAINER_H_ |
| 7 | 7 |
| 8 #import <Cocoa/Cocoa.h> | 8 #import <Cocoa/Cocoa.h> |
| 9 | 9 |
| 10 #include "base/mac/scoped_nsobject.h" | 10 #include "base/mac/scoped_nsobject.h" |
| 11 #include "chrome/browser/ui/autofill/autofill_dialog_types.h" | 11 #include "chrome/browser/ui/autofill/autofill_dialog_types.h" |
| 12 #import "chrome/browser/ui/cocoa/autofill/autofill_layout.h" | 12 #import "chrome/browser/ui/cocoa/autofill/autofill_layout.h" |
| 13 #import "chrome/browser/ui/cocoa/autofill/autofill_section_container.h" | 13 #import "chrome/browser/ui/cocoa/autofill/autofill_section_container.h" |
| 14 | 14 |
| 15 | 15 |
| 16 namespace autofill { | 16 namespace autofill { |
| 17 class AutofillDialogController; | 17 class AutofillDialogViewDelegate; |
| 18 } | 18 } |
| 19 | 19 |
| 20 @class InfoBubbleView; | 20 @class InfoBubbleView; |
| 21 | 21 |
| 22 // UI controller for details for current payment instrument. | 22 // UI controller for details for current payment instrument. |
| 23 @interface AutofillDetailsContainer | 23 @interface AutofillDetailsContainer |
| 24 : NSViewController<AutofillLayout, | 24 : NSViewController<AutofillLayout, |
| 25 AutofillValidationDisplay> { | 25 AutofillValidationDisplay> { |
| 26 @private | 26 @private |
| 27 // Scroll view containing all detail sections. | 27 // Scroll view containing all detail sections. |
| 28 base::scoped_nsobject<NSScrollView> scrollView_; | 28 base::scoped_nsobject<NSScrollView> scrollView_; |
| 29 | 29 |
| 30 // The individual detail sections. | 30 // The individual detail sections. |
| 31 base::scoped_nsobject<NSMutableArray> details_; | 31 base::scoped_nsobject<NSMutableArray> details_; |
| 32 | 32 |
| 33 // An info bubble to display validation errors. | 33 // An info bubble to display validation errors. |
| 34 base::scoped_nsobject<InfoBubbleView> infoBubble_; | 34 base::scoped_nsobject<InfoBubbleView> infoBubble_; |
| 35 | 35 |
| 36 autofill::AutofillDialogController* controller_; // Not owned. | 36 autofill::AutofillDialogViewDelegate* delegate_; // Not owned. |
| 37 } | 37 } |
| 38 | 38 |
| 39 // Designated initializer. | 39 // Designated initializer. |
| 40 - (id)initWithController:(autofill::AutofillDialogController*)controller; | 40 - (id)initWithDelegate:(autofill::AutofillDialogViewDelegate*)delegate; |
| 41 | 41 |
| 42 // Retrieve the container for the specified |section|. | 42 // Retrieve the container for the specified |section|. |
| 43 - (AutofillSectionContainer*)sectionForId:(autofill::DialogSection)section; | 43 - (AutofillSectionContainer*)sectionForId:(autofill::DialogSection)section; |
| 44 | 44 |
| 45 // Called when the controller-maintained suggestions model has changed. | 45 // Called when the delegate-maintained suggestions model has changed. |
| 46 - (void)modelChanged; | 46 - (void)modelChanged; |
| 47 | 47 |
| 48 // Validate every visible details section. | 48 // Validate every visible details section. |
| 49 - (BOOL)validate; | 49 - (BOOL)validate; |
| 50 | 50 |
| 51 @end | 51 @end |
| 52 | 52 |
| 53 #endif // CHROME_BROWSER_UI_COCOA_AUTOFILL_AUTOFILL_DETAILS_CONTAINER_H_ | 53 #endif // CHROME_BROWSER_UI_COCOA_AUTOFILL_AUTOFILL_DETAILS_CONTAINER_H_ |
| OLD | NEW |