- add sources.
[platform/framework/web/crosswalk.git] / src / chrome / browser / ui / cocoa / autofill / autofill_details_container.h
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.
4
5 #ifndef CHROME_BROWSER_UI_COCOA_AUTOFILL_AUTOFILL_DETAILS_CONTAINER_H_
6 #define CHROME_BROWSER_UI_COCOA_AUTOFILL_AUTOFILL_DETAILS_CONTAINER_H_
7
8 #import <Cocoa/Cocoa.h>
9
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"
14
15
16 namespace autofill {
17 class AutofillDialogViewDelegate;
18 }
19
20 @class InfoBubbleView;
21
22 // UI controller for details for current payment instrument.
23 @interface AutofillDetailsContainer
24     : NSViewController<AutofillLayout,
25                        AutofillValidationDisplay> {
26  @private
27   // Scroll view containing all detail sections.
28   base::scoped_nsobject<NSScrollView> scrollView_;
29
30   // The individual detail sections.
31   base::scoped_nsobject<NSMutableArray> details_;
32
33   // An info bubble to display validation errors.
34   base::scoped_nsobject<InfoBubbleView> errorBubble_;
35
36   autofill::AutofillDialogViewDelegate* delegate_;  // Not owned.
37 }
38
39 // Designated initializer.
40 - (id)initWithDelegate:(autofill::AutofillDialogViewDelegate*)delegate;
41
42 // Retrieve the container for the specified |section|.
43 - (AutofillSectionContainer*)sectionForId:(autofill::DialogSection)section;
44
45 // Called when |errorBubble_| needs to be updated.
46 - (void)updateErrorBubble;
47
48 // Called when the delegate-maintained suggestions model has changed.
49 - (void)modelChanged;
50
51 // Validate every visible details section.
52 - (BOOL)validate;
53
54 @end
55
56 #endif  // CHROME_BROWSER_UI_COCOA_AUTOFILL_AUTOFILL_DETAILS_CONTAINER_H_