Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(372)

Side by Side Diff: chrome/browser/ui/webui/options/autofill_options_handler.h

Issue 7541065: autofill: Refactor PersonalDataManager::Observer into its own header file. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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.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;
15
14 namespace base { 16 namespace base {
15 class DictionaryValue; 17 class DictionaryValue;
16 class ListValue; 18 class ListValue;
17 } 19 }
18 20
19 class AutofillOptionsHandler : public OptionsPageUIHandler, 21 class AutofillOptionsHandler : public OptionsPageUIHandler,
20 public PersonalDataManager::Observer { 22 public PersonalDataManagerObserver {
21 public: 23 public:
22 AutofillOptionsHandler(); 24 AutofillOptionsHandler();
23 virtual ~AutofillOptionsHandler(); 25 virtual ~AutofillOptionsHandler();
24 26
25 // OptionsPageUIHandler implementation. 27 // OptionsPageUIHandler implementation.
26 virtual void GetLocalizedValues(base::DictionaryValue* localized_strings); 28 virtual void GetLocalizedValues(base::DictionaryValue* localized_strings);
27 virtual void Initialize(); 29 virtual void Initialize();
28 virtual void RegisterMessages(); 30 virtual void RegisterMessages();
29 31
30 // PersonalDataManager::Observer implementation. 32 // PersonalDataManagerObserver implementation.
31 virtual void OnPersonalDataChanged() OVERRIDE; 33 virtual void OnPersonalDataChanged() OVERRIDE;
32 34
33 private: 35 private:
34 // Loads the strings for the address and credit card overlays. 36 // Loads the strings for the address and credit card overlays.
35 void SetAddressOverlayStrings(base::DictionaryValue* localized_strings); 37 void SetAddressOverlayStrings(base::DictionaryValue* localized_strings);
36 void SetCreditCardOverlayStrings(base::DictionaryValue* localized_strings); 38 void SetCreditCardOverlayStrings(base::DictionaryValue* localized_strings);
37 39
38 // Loads Autofill addresses and credit cards using the PersonalDataManager. 40 // Loads Autofill addresses and credit cards using the PersonalDataManager.
39 void LoadAutofillData(); 41 void LoadAutofillData();
40 42
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 void ValidateFaxNumbers(const base::ListValue* args); 80 void ValidateFaxNumbers(const base::ListValue* args);
79 81
80 // 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.
81 // Unowned pointer, may not be NULL. 83 // Unowned pointer, may not be NULL.
82 PersonalDataManager* personal_data_; 84 PersonalDataManager* personal_data_;
83 85
84 DISALLOW_COPY_AND_ASSIGN(AutofillOptionsHandler); 86 DISALLOW_COPY_AND_ASSIGN(AutofillOptionsHandler);
85 }; 87 };
86 88
87 #endif // CHROME_BROWSER_UI_WEBUI_OPTIONS_AUTOFILL_OPTIONS_HANDLER_H_ 89 #endif // CHROME_BROWSER_UI_WEBUI_OPTIONS_AUTOFILL_OPTIONS_HANDLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698