| 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_section_container.h" | 5 #import "chrome/browser/ui/cocoa/autofill/autofill_section_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 "base/strings/sys_string_conversions.h" | 10 #include "base/strings/sys_string_conversions.h" |
| 11 #include "base/strings/utf_string_conversions.h" | 11 #include "base/strings/utf_string_conversions.h" |
| 12 #include "chrome/browser/ui/autofill/autofill_dialog_controller.h" | 12 #include "chrome/browser/ui/autofill/autofill_dialog_view_delegate.h" |
| 13 #import "chrome/browser/ui/cocoa/autofill/autofill_pop_up_button.h" | 13 #import "chrome/browser/ui/cocoa/autofill/autofill_pop_up_button.h" |
| 14 #import "chrome/browser/ui/cocoa/autofill/autofill_section_view.h" | 14 #import "chrome/browser/ui/cocoa/autofill/autofill_section_view.h" |
| 15 #import "chrome/browser/ui/cocoa/autofill/autofill_suggestion_container.h" | 15 #import "chrome/browser/ui/cocoa/autofill/autofill_suggestion_container.h" |
| 16 #import "chrome/browser/ui/cocoa/autofill/autofill_textfield.h" | 16 #import "chrome/browser/ui/cocoa/autofill/autofill_textfield.h" |
| 17 #import "chrome/browser/ui/cocoa/autofill/layout_view.h" | 17 #import "chrome/browser/ui/cocoa/autofill/layout_view.h" |
| 18 #include "chrome/browser/ui/cocoa/autofill/simple_grid_layout.h" | 18 #include "chrome/browser/ui/cocoa/autofill/simple_grid_layout.h" |
| 19 #import "chrome/browser/ui/cocoa/image_button_cell.h" | 19 #import "chrome/browser/ui/cocoa/image_button_cell.h" |
| 20 #import "chrome/browser/ui/cocoa/menu_button.h" | 20 #import "chrome/browser/ui/cocoa/menu_button.h" |
| 21 #include "components/autofill/core/browser/autofill_type.h" | 21 #include "components/autofill/core/browser/autofill_type.h" |
| 22 #include "grit/theme_resources.h" | 22 #include "grit/theme_resources.h" |
| (...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 128 // Create a view with all inputs requested by |controller_|. Autoreleased. | 128 // Create a view with all inputs requested by |controller_|. Autoreleased. |
| 129 - (LayoutView*)makeInputControls; | 129 - (LayoutView*)makeInputControls; |
| 130 | 130 |
| 131 @end | 131 @end |
| 132 | 132 |
| 133 @implementation AutofillSectionContainer | 133 @implementation AutofillSectionContainer |
| 134 | 134 |
| 135 @synthesize section = section_; | 135 @synthesize section = section_; |
| 136 @synthesize validationDelegate = validationDelegate_; | 136 @synthesize validationDelegate = validationDelegate_; |
| 137 | 137 |
| 138 - (id)initWithController:(autofill::AutofillDialogController*)controller | 138 - (id)initWithController:(autofill::AutofillDialogViewDelegate*)controller |
| 139 forSection:(autofill::DialogSection)section { | 139 forSection:(autofill::DialogSection)section { |
| 140 if (self = [super init]) { | 140 if (self = [super init]) { |
| 141 section_ = section; | 141 section_ = section; |
| 142 controller_ = controller; | 142 controller_ = controller; |
| 143 } | 143 } |
| 144 return self; | 144 return self; |
| 145 } | 145 } |
| 146 | 146 |
| 147 - (void)getInputs:(autofill::DetailOutputMap*)output { | 147 - (void)getInputs:(autofill::DetailOutputMap*)output { |
| 148 [self fillDetailOutputs:output fromControls:[inputs_ subviews]]; | 148 [self fillDetailOutputs:output fromControls:[inputs_ subviews]]; |
| (...skipping 475 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 624 | 624 |
| 625 - (void)activateFieldForInput:(const autofill::DetailInput&)input { | 625 - (void)activateFieldForInput:(const autofill::DetailInput&)input { |
| 626 if ([self detailInputForType:input.type] != &input) | 626 if ([self detailInputForType:input.type] != &input) |
| 627 return; | 627 return; |
| 628 | 628 |
| 629 NSControl<AutofillInputField>* field = [inputs_ viewWithTag:input.type]; | 629 NSControl<AutofillInputField>* field = [inputs_ viewWithTag:input.type]; |
| 630 [[field window] makeFirstResponder:field]; | 630 [[field window] makeFirstResponder:field]; |
| 631 } | 631 } |
| 632 | 632 |
| 633 @end | 633 @end |
| OLD | NEW |