Home | History | Annotate | Download | only in autofill
      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> infoBubble_;
     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 the delegate-maintained suggestions model has changed.
     46 - (void)modelChanged;
     47 
     48 // Validate every visible details section.
     49 - (BOOL)validate;
     50 
     51 @end
     52 
     53 #endif  // CHROME_BROWSER_UI_COCOA_AUTOFILL_AUTOFILL_DETAILS_CONTAINER_H_
     54