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 #include "chrome/browser/ui/cocoa/autofill/autofill_dialog_cocoa.h" | 5 #include "chrome/browser/ui/cocoa/autofill/autofill_dialog_cocoa.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/mac/scoped_nsobject.h" | 8 #include "base/mac/scoped_nsobject.h" |
9 #include "base/message_loop/message_loop.h" | 9 #include "base/message_loop/message_loop.h" |
10 #include "base/strings/sys_string_conversions.h" | 10 #include "base/strings/sys_string_conversions.h" |
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
88 | 88 |
89 void AutofillDialogCocoa::UpdateNotificationArea() { | 89 void AutofillDialogCocoa::UpdateNotificationArea() { |
90 [sheet_delegate_ updateNotificationArea]; | 90 [sheet_delegate_ updateNotificationArea]; |
91 } | 91 } |
92 | 92 |
93 void AutofillDialogCocoa::UpdateSection(DialogSection section) { | 93 void AutofillDialogCocoa::UpdateSection(DialogSection section) { |
94 [sheet_delegate_ updateSection:section]; | 94 [sheet_delegate_ updateSection:section]; |
95 } | 95 } |
96 | 96 |
97 void AutofillDialogCocoa::FillSection(DialogSection section, | 97 void AutofillDialogCocoa::FillSection(DialogSection section, |
98 const DetailInput& originating_input) { | 98 ServerFieldType originating_type) { |
99 [sheet_delegate_ fillSection:section forInput:originating_input]; | 99 [sheet_delegate_ fillSection:section forType:originating_type]; |
100 } | 100 } |
101 | 101 |
102 void AutofillDialogCocoa::GetUserInput(DialogSection section, | 102 void AutofillDialogCocoa::GetUserInput(DialogSection section, |
103 FieldValueMap* output) { | 103 FieldValueMap* output) { |
104 [sheet_delegate_ getInputs:output forSection:section]; | 104 [sheet_delegate_ getInputs:output forSection:section]; |
105 } | 105 } |
106 | 106 |
107 base::string16 AutofillDialogCocoa::GetCvc() { | 107 base::string16 AutofillDialogCocoa::GetCvc() { |
108 return base::SysNSStringToUTF16([sheet_delegate_ getCvc]); | 108 return base::SysNSStringToUTF16([sheet_delegate_ getCvc]); |
109 } | 109 } |
110 | 110 |
111 bool AutofillDialogCocoa::HitTestInput(const DetailInput& input, | 111 bool AutofillDialogCocoa::HitTestInput(ServerFieldType type, |
112 const gfx::Point& screen_point) { | 112 const gfx::Point& screen_point) { |
113 // TODO(dbeam): implement. | 113 // TODO(dbeam): implement. |
114 return false; | 114 return false; |
115 } | 115 } |
116 | 116 |
117 bool AutofillDialogCocoa::SaveDetailsLocally() { | 117 bool AutofillDialogCocoa::SaveDetailsLocally() { |
118 return [sheet_delegate_ saveDetailsLocally]; | 118 return [sheet_delegate_ saveDetailsLocally]; |
119 } | 119 } |
120 | 120 |
121 const content::NavigationController* AutofillDialogCocoa::ShowSignIn() { | 121 const content::NavigationController* AutofillDialogCocoa::ShowSignIn() { |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
198 } | 198 } |
199 | 199 |
200 void AutofillDialogCocoa::OnConstrainedWindowClosed( | 200 void AutofillDialogCocoa::OnConstrainedWindowClosed( |
201 ConstrainedWindowMac* window) { | 201 ConstrainedWindowMac* window) { |
202 constrained_window_.reset(); | 202 constrained_window_.reset(); |
203 // |this| belongs to |delegate_|, so no self-destruction here. | 203 // |this| belongs to |delegate_|, so no self-destruction here. |
204 delegate_->ViewClosed(); | 204 delegate_->ViewClosed(); |
205 } | 205 } |
206 | 206 |
207 } // autofill | 207 } // autofill |
OLD | NEW |