OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/webui/options/autofill_options_handler.h" | 5 #include "chrome/browser/ui/webui/options/autofill_options_handler.h" |
6 | 6 |
7 #include <vector> | 7 #include <vector> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/bind_helpers.h" | 10 #include "base/bind_helpers.h" |
11 #include "base/logging.h" | 11 #include "base/logging.h" |
12 #include "base/string16.h" | 12 #include "base/string16.h" |
13 #include "base/string_number_conversions.h" | 13 #include "base/string_number_conversions.h" |
14 #include "base/utf_string_conversions.h" | 14 #include "base/utf_string_conversions.h" |
15 #include "base/values.h" | 15 #include "base/values.h" |
16 #include "chrome/browser/autofill/autofill_country.h" | 16 #include "chrome/browser/autofill/autofill_country.h" |
17 #include "chrome/browser/autofill/autofill_profile.h" | 17 #include "chrome/browser/autofill/autofill_profile.h" |
18 #include "chrome/browser/autofill/credit_card.h" | 18 #include "chrome/browser/autofill/credit_card.h" |
19 #include "chrome/browser/autofill/personal_data_manager.h" | 19 #include "chrome/browser/autofill/personal_data_manager.h" |
20 #include "chrome/browser/autofill/personal_data_manager_factory.h" | 20 #include "chrome/browser/autofill/personal_data_manager_factory.h" |
21 #include "chrome/browser/autofill/phone_number_i18n.h" | 21 #include "chrome/browser/autofill/phone_number_i18n.h" |
22 #include "chrome/browser/profiles/profile.h" | 22 #include "chrome/browser/profiles/profile.h" |
23 #include "chrome/browser/ui/webui/web_ui_util.h" | 23 #include "chrome/browser/ui/webui/web_ui_util.h" |
24 #include "chrome/common/guid.h" | 24 #include "chrome/common/guid.h" |
| 25 #include "content/browser/webui/web_ui.h" |
25 #include "grit/generated_resources.h" | 26 #include "grit/generated_resources.h" |
26 #include "grit/webkit_resources.h" | 27 #include "grit/webkit_resources.h" |
27 #include "ui/base/l10n/l10n_util.h" | 28 #include "ui/base/l10n/l10n_util.h" |
28 | 29 |
29 namespace { | 30 namespace { |
30 | 31 |
31 // Converts a credit card type to the appropriate resource ID of the CC icon. | 32 // Converts a credit card type to the appropriate resource ID of the CC icon. |
32 int CreditCardTypeToResourceID(const std::string& type) { | 33 int CreditCardTypeToResourceID(const std::string& type) { |
33 if (type == kAmericanExpressCard) | 34 if (type == kAmericanExpressCard) |
34 return IDR_AUTOFILL_CC_AMEX; | 35 return IDR_AUTOFILL_CC_AMEX; |
(...skipping 571 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
606 void AutofillOptionsHandler::ValidatePhoneNumbers(const ListValue* args) { | 607 void AutofillOptionsHandler::ValidatePhoneNumbers(const ListValue* args) { |
607 if (!personal_data_->IsDataLoaded()) | 608 if (!personal_data_->IsDataLoaded()) |
608 return; | 609 return; |
609 | 610 |
610 ListValue* list_value = NULL; | 611 ListValue* list_value = NULL; |
611 ValidatePhoneArguments(args, &list_value); | 612 ValidatePhoneArguments(args, &list_value); |
612 | 613 |
613 web_ui()->CallJavascriptFunction( | 614 web_ui()->CallJavascriptFunction( |
614 "AutofillEditAddressOverlay.setValidatedPhoneNumbers", *list_value); | 615 "AutofillEditAddressOverlay.setValidatedPhoneNumbers", *list_value); |
615 } | 616 } |
OLD | NEW |