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 #import "chrome/browser/ui/cocoa/autofill/autofill_details_container.h" | 5 #import "chrome/browser/ui/cocoa/autofill/autofill_details_container.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "base/mac/foundation_util.h" | 9 #include "base/mac/foundation_util.h" |
10 #include "chrome/browser/ui/autofill/autofill_dialog_view_delegate.h" | 10 #include "chrome/browser/ui/autofill/autofill_dialog_view_delegate.h" |
(...skipping 26 matching lines...) Expand all Loading... |
37 base::scoped_nsobject<AutofillSectionContainer> sectionContainer( | 37 base::scoped_nsobject<AutofillSectionContainer> sectionContainer( |
38 [[AutofillSectionContainer alloc] initWithDelegate:delegate_ | 38 [[AutofillSectionContainer alloc] initWithDelegate:delegate_ |
39 forSection:section]); | 39 forSection:section]); |
40 [sectionContainer setValidationDelegate:self]; | 40 [sectionContainer setValidationDelegate:self]; |
41 [details_ addObject:sectionContainer]; | 41 [details_ addObject:sectionContainer]; |
42 } | 42 } |
43 | 43 |
44 - (void)loadView { | 44 - (void)loadView { |
45 details_.reset([[NSMutableArray alloc] init]); | 45 details_.reset([[NSMutableArray alloc] init]); |
46 | 46 |
47 [self addSection:autofill::SECTION_EMAIL]; | |
48 [self addSection:autofill::SECTION_CC]; | 47 [self addSection:autofill::SECTION_CC]; |
49 [self addSection:autofill::SECTION_BILLING]; | 48 [self addSection:autofill::SECTION_BILLING]; |
50 [self addSection:autofill::SECTION_CC_BILLING]; | 49 [self addSection:autofill::SECTION_CC_BILLING]; |
51 [self addSection:autofill::SECTION_SHIPPING]; | 50 [self addSection:autofill::SECTION_SHIPPING]; |
52 | 51 |
53 scrollView_.reset([[NSScrollView alloc] initWithFrame:NSZeroRect]); | 52 scrollView_.reset([[NSScrollView alloc] initWithFrame:NSZeroRect]); |
54 [scrollView_ setHasVerticalScroller:YES]; | 53 [scrollView_ setHasVerticalScroller:YES]; |
55 [scrollView_ setHasHorizontalScroller:NO]; | 54 [scrollView_ setHasHorizontalScroller:NO]; |
56 [scrollView_ setBorderType:NSNoBorder]; | 55 [scrollView_ setBorderType:NSNoBorder]; |
57 [scrollView_ setAutohidesScrollers:YES]; | 56 [scrollView_ setAutohidesScrollers:YES]; |
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
165 [infoBubble_ setFrameSize:bubbleSize]; | 164 [infoBubble_ setFrameSize:bubbleSize]; |
166 [label setFrameOrigin:NSMakePoint(labelInset, labelInset)]; | 165 [label setFrameOrigin:NSMakePoint(labelInset, labelInset)]; |
167 [infoBubble_ setFrameOrigin:[self originFromAnchorView:field]]; | 166 [infoBubble_ setFrameOrigin:[self originFromAnchorView:field]]; |
168 [infoBubble_ setHidden:NO]; | 167 [infoBubble_ setHidden:NO]; |
169 } else { | 168 } else { |
170 [infoBubble_ setHidden:YES]; | 169 [infoBubble_ setHidden:YES]; |
171 } | 170 } |
172 } | 171 } |
173 | 172 |
174 @end | 173 @end |
OLD | NEW |