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
3 // found in the LICENSE file.
5 #ifndef CHROME_BROWSER_UI_COCOA_AUTOFILL_AUTOFILL_DETAILS_CONTAINER_H_
6 #define CHROME_BROWSER_UI_COCOA_AUTOFILL_AUTOFILL_DETAILS_CONTAINER_H_
8 #import <Cocoa/Cocoa.h>
10 #include "base/mac/scoped_nsobject.h"
11 #include "chrome/browser/ui/autofill/autofill_dialog_types.h"
12 #import "chrome/browser/ui/cocoa/autofill/autofill_layout.h"
13 #import "chrome/browser/ui/cocoa/autofill/autofill_section_container.h"
17 class AutofillDialogViewDelegate;
20 @class InfoBubbleView;
22 // UI controller for details for current payment instrument.
23 @interface AutofillDetailsContainer
24 : NSViewController<AutofillLayout,
25 AutofillValidationDisplay> {
27 // Scroll view containing all detail sections.
28 base::scoped_nsobject<NSScrollView> scrollView_;
30 // The individual detail sections.
31 base::scoped_nsobject<NSMutableArray> details_;
33 // An info bubble to display validation errors.
34 base::scoped_nsobject<InfoBubbleView> errorBubble_;
36 autofill::AutofillDialogViewDelegate* delegate_; // Not owned.
39 // Designated initializer.
40 - (id)initWithDelegate:(autofill::AutofillDialogViewDelegate*)delegate;
42 // Retrieve the container for the specified |section|.
43 - (AutofillSectionContainer*)sectionForId:(autofill::DialogSection)section;
45 // Called when |errorBubble_| needs to be updated.
46 - (void)updateErrorBubble;
48 // Called when the delegate-maintained suggestions model has changed.
51 // Validate every visible details section.
56 #endif // CHROME_BROWSER_UI_COCOA_AUTOFILL_AUTOFILL_DETAILS_CONTAINER_H_