OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/autofill/autofill_dialog.h" | 5 #include "chrome/browser/autofill/autofill_dialog.h" |
6 | 6 |
7 #include <gtk/gtk.h> | 7 #include <gtk/gtk.h> |
8 | 8 |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 1048 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1059 // TODO(jhawkins): Set the GtkComboBox widgets. | 1059 // TODO(jhawkins): Set the GtkComboBox widgets. |
1060 | 1060 |
1061 gtk_box_pack_start(GTK_BOX(creditcards_vbox_), credit_card_widget, | 1061 gtk_box_pack_start(GTK_BOX(creditcards_vbox_), credit_card_widget, |
1062 FALSE, FALSE, 0); | 1062 FALSE, FALSE, 0); |
1063 gtk_widget_show_all(credit_card_widget); | 1063 gtk_widget_show_all(credit_card_widget); |
1064 } | 1064 } |
1065 | 1065 |
1066 /////////////////////////////////////////////////////////////////////////////// | 1066 /////////////////////////////////////////////////////////////////////////////// |
1067 // Factory/finder method: | 1067 // Factory/finder method: |
1068 | 1068 |
1069 void ShowAutoFillDialog(gfx::NativeWindow parent, | 1069 // TODO(jhawkins): Need to update implementation to match new interface for |
| 1070 // |imported_profile| and |imported_credit_card| parameters. |
| 1071 // See http://crbug.com/41010 |
| 1072 void ShowAutoFillDialog(gfx::NativeView parent, |
1070 AutoFillDialogObserver* observer, | 1073 AutoFillDialogObserver* observer, |
1071 Profile* profile) { | 1074 Profile* profile, |
| 1075 AutoFillProfile* imported_profile, |
| 1076 CreditCard* imported_credit_card) { |
1072 // It's possible we haven't shown the InfoBar yet, but if the user is in the | 1077 // It's possible we haven't shown the InfoBar yet, but if the user is in the |
1073 // AutoFill dialog, she doesn't need to be asked to enable or disable | 1078 // AutoFill dialog, she doesn't need to be asked to enable or disable |
1074 // AutoFill. | 1079 // AutoFill. |
1075 profile->GetPrefs()->SetBoolean(prefs::kAutoFillInfoBarShown, true); | 1080 profile->GetPrefs()->SetBoolean(prefs::kAutoFillInfoBarShown, true); |
1076 | 1081 |
1077 if (!dialog) { | 1082 if (!dialog) { |
1078 dialog = new AutoFillDialog( | 1083 dialog = new AutoFillDialog( |
1079 profile, | 1084 profile, |
1080 observer, | 1085 observer, |
1081 profile->GetPersonalDataManager()->profiles(), | 1086 profile->GetPersonalDataManager()->profiles(), |
1082 profile->GetPersonalDataManager()->credit_cards()); | 1087 profile->GetPersonalDataManager()->credit_cards()); |
1083 } | 1088 } |
1084 dialog->Show(); | 1089 dialog->Show(); |
1085 } | 1090 } |
OLD | NEW |