| 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 #ifndef CHROME_BROWSER_UI_WEBUI_OPTIONS_AUTOFILL_OPTIONS_HANDLER_H_ | 5 #ifndef CHROME_BROWSER_UI_WEBUI_OPTIONS_AUTOFILL_OPTIONS_HANDLER_H_ |
| 6 #define CHROME_BROWSER_UI_WEBUI_OPTIONS_AUTOFILL_OPTIONS_HANDLER_H_ | 6 #define CHROME_BROWSER_UI_WEBUI_OPTIONS_AUTOFILL_OPTIONS_HANDLER_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
| 11 #include "chrome/browser/autofill/personal_data_manager_observer.h" | 11 #include "chrome/browser/autofill/personal_data_manager_observer.h" |
| 12 #include "chrome/browser/ui/webui/options/options_ui.h" | 12 #include "chrome/browser/ui/webui/options/options_ui.h" |
| 13 | 13 |
| 14 class PersonalDataManager; | 14 class PersonalDataManager; |
| 15 | 15 |
| 16 namespace base { | 16 namespace base { |
| 17 class DictionaryValue; | 17 class DictionaryValue; |
| 18 class ListValue; | 18 class ListValue; |
| 19 } | 19 } |
| 20 | 20 |
| 21 class AutofillOptionsHandler : public OptionsPageUIHandler, | 21 class AutofillOptionsHandler : public OptionsPageUIHandler, |
| 22 public PersonalDataManagerObserver { | 22 public PersonalDataManagerObserver { |
| 23 public: | 23 public: |
| 24 AutofillOptionsHandler(); | 24 AutofillOptionsHandler(); |
| 25 virtual ~AutofillOptionsHandler(); | 25 virtual ~AutofillOptionsHandler(); |
| 26 | 26 |
| 27 // OptionsPageUIHandler implementation. | 27 // OptionsPageUIHandler implementation. |
| 28 virtual void GetLocalizedValues(base::DictionaryValue* localized_strings); | 28 virtual void GetLocalizedValues( |
| 29 virtual void Initialize(); | 29 base::DictionaryValue* localized_strings) OVERRIDE; |
| 30 virtual void RegisterMessages(); | 30 virtual void Initialize() OVERRIDE; |
| 31 virtual void RegisterMessages() OVERRIDE; |
| 31 | 32 |
| 32 // PersonalDataManagerObserver implementation. | 33 // PersonalDataManagerObserver implementation. |
| 33 virtual void OnPersonalDataChanged() OVERRIDE; | 34 virtual void OnPersonalDataChanged() OVERRIDE; |
| 34 | 35 |
| 35 private: | 36 private: |
| 36 // Loads the strings for the address and credit card overlays. | 37 // Loads the strings for the address and credit card overlays. |
| 37 void SetAddressOverlayStrings(base::DictionaryValue* localized_strings); | 38 void SetAddressOverlayStrings(base::DictionaryValue* localized_strings); |
| 38 void SetCreditCardOverlayStrings(base::DictionaryValue* localized_strings); | 39 void SetCreditCardOverlayStrings(base::DictionaryValue* localized_strings); |
| 39 | 40 |
| 40 // Loads Autofill addresses and credit cards using the PersonalDataManager. | 41 // Loads Autofill addresses and credit cards using the PersonalDataManager. |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 79 void ValidatePhoneNumbers(const base::ListValue* args); | 80 void ValidatePhoneNumbers(const base::ListValue* args); |
| 80 | 81 |
| 81 // The personal data manager, used to load Autofill profiles and credit cards. | 82 // The personal data manager, used to load Autofill profiles and credit cards. |
| 82 // Unowned pointer, may not be NULL. | 83 // Unowned pointer, may not be NULL. |
| 83 PersonalDataManager* personal_data_; | 84 PersonalDataManager* personal_data_; |
| 84 | 85 |
| 85 DISALLOW_COPY_AND_ASSIGN(AutofillOptionsHandler); | 86 DISALLOW_COPY_AND_ASSIGN(AutofillOptionsHandler); |
| 86 }; | 87 }; |
| 87 | 88 |
| 88 #endif // CHROME_BROWSER_UI_WEBUI_OPTIONS_AUTOFILL_OPTIONS_HANDLER_H_ | 89 #endif // CHROME_BROWSER_UI_WEBUI_OPTIONS_AUTOFILL_OPTIONS_HANDLER_H_ |
| OLD | NEW |