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 |
11 #include "app/gfx/gtk_util.h" | 11 #include "app/gfx/gtk_util.h" |
12 #include "app/l10n_util.h" | 12 #include "app/l10n_util.h" |
13 #include "base/logging.h" | 13 #include "base/logging.h" |
14 #include "base/message_loop.h" | 14 #include "base/message_loop.h" |
15 #include "chrome/browser/autofill/autofill_profile.h" | 15 #include "chrome/browser/autofill/autofill_profile.h" |
16 #include "chrome/browser/autofill/credit_card.h" | 16 #include "chrome/browser/autofill/credit_card.h" |
17 #include "chrome/browser/autofill/form_group.h" | 17 #include "chrome/browser/autofill/form_group.h" |
18 #include "chrome/browser/gtk/gtk_util.h" | 18 #include "chrome/browser/gtk/gtk_util.h" |
19 #include "chrome/browser/gtk/options/options_layout_gtk.h" | 19 #include "chrome/browser/gtk/options/options_layout_gtk.h" |
| 20 #include "chrome/browser/profile.h" |
20 #include "grit/chromium_strings.h" | 21 #include "grit/chromium_strings.h" |
21 #include "grit/generated_resources.h" | 22 #include "grit/generated_resources.h" |
22 #include "grit/locale_settings.h" | 23 #include "grit/locale_settings.h" |
23 | 24 |
24 namespace { | 25 namespace { |
25 | 26 |
26 // The name of the object property used to store an entry widget pointer on | 27 // The name of the object property used to store an entry widget pointer on |
27 // another widget. | 28 // another widget. |
28 const char kButtonDataKey[] = "label-entry"; | 29 const char kButtonDataKey[] = "label-entry"; |
29 | 30 |
(...skipping 856 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
886 gtk_box_pack_start(GTK_BOX(creditcards_vbox_), credit_card_widget, | 887 gtk_box_pack_start(GTK_BOX(creditcards_vbox_), credit_card_widget, |
887 FALSE, FALSE, 0); | 888 FALSE, FALSE, 0); |
888 gtk_widget_show_all(credit_card_widget); | 889 gtk_widget_show_all(credit_card_widget); |
889 } | 890 } |
890 | 891 |
891 /////////////////////////////////////////////////////////////////////////////// | 892 /////////////////////////////////////////////////////////////////////////////// |
892 // Factory/finder method: | 893 // Factory/finder method: |
893 | 894 |
894 void ShowAutoFillDialog(AutoFillDialogObserver* observer, | 895 void ShowAutoFillDialog(AutoFillDialogObserver* observer, |
895 const std::vector<AutoFillProfile*>& profiles, | 896 const std::vector<AutoFillProfile*>& profiles, |
896 const std::vector<CreditCard*>& credit_cards) { | 897 const std::vector<CreditCard*>& credit_cards, |
| 898 Profile *profile) { |
897 if (!dialog) { | 899 if (!dialog) { |
898 dialog = new AutoFillDialog(observer, profiles, credit_cards); | 900 dialog = new AutoFillDialog(observer, profiles, credit_cards); |
899 } | 901 } |
900 dialog->Show(); | 902 dialog->Show(); |
901 } | 903 } |
OLD | NEW |