OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_RESET_PROFILE_SETTINGS_HANDLER_H_ | 5 #ifndef CHROME_BROWSER_UI_WEBUI_OPTIONS_RESET_PROFILE_SETTINGS_HANDLER_H_ |
6 #define CHROME_BROWSER_UI_WEBUI_OPTIONS_RESET_PROFILE_SETTINGS_HANDLER_H_ | 6 #define CHROME_BROWSER_UI_WEBUI_OPTIONS_RESET_PROFILE_SETTINGS_HANDLER_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
(...skipping 13 matching lines...) Expand all Loading... |
24 | 24 |
25 namespace options { | 25 namespace options { |
26 | 26 |
27 // Handler for both the 'Reset Profile Settings' overlay page and also the | 27 // Handler for both the 'Reset Profile Settings' overlay page and also the |
28 // corresponding banner that is shown at the top of the options page. | 28 // corresponding banner that is shown at the top of the options page. |
29 class ResetProfileSettingsHandler | 29 class ResetProfileSettingsHandler |
30 : public OptionsPageUIHandler, | 30 : public OptionsPageUIHandler, |
31 public base::SupportsWeakPtr<ResetProfileSettingsHandler> { | 31 public base::SupportsWeakPtr<ResetProfileSettingsHandler> { |
32 public: | 32 public: |
33 ResetProfileSettingsHandler(); | 33 ResetProfileSettingsHandler(); |
34 virtual ~ResetProfileSettingsHandler(); | 34 ~ResetProfileSettingsHandler() override; |
35 | 35 |
36 // OptionsPageUIHandler implementation. | 36 // OptionsPageUIHandler implementation. |
37 virtual void GetLocalizedValues( | 37 void GetLocalizedValues(base::DictionaryValue* localized_strings) override; |
38 base::DictionaryValue* localized_strings) override; | 38 void InitializeHandler() override; |
39 virtual void InitializeHandler() override; | 39 void InitializePage() override; |
40 virtual void InitializePage() override; | 40 void Uninitialize() override; |
41 virtual void Uninitialize() override; | |
42 | 41 |
43 // WebUIMessageHandler implementation. | 42 // WebUIMessageHandler implementation. |
44 virtual void RegisterMessages() override; | 43 void RegisterMessages() override; |
45 | 44 |
46 private: | 45 private: |
47 // Javascript callback to start clearing data. | 46 // Javascript callback to start clearing data. |
48 void HandleResetProfileSettings(const base::ListValue* value); | 47 void HandleResetProfileSettings(const base::ListValue* value); |
49 | 48 |
50 // Closes the dialog once all requested settings has been reset. | 49 // Closes the dialog once all requested settings has been reset. |
51 void OnResetProfileSettingsDone(bool send_feedback); | 50 void OnResetProfileSettingsDone(bool send_feedback); |
52 | 51 |
53 // Called when the confirmation box appears. | 52 // Called when the confirmation box appears. |
54 void OnShowResetProfileDialog(const base::ListValue* value); | 53 void OnShowResetProfileDialog(const base::ListValue* value); |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
86 | 85 |
87 // Contains Chrome brand code; empty for organic Chrome. | 86 // Contains Chrome brand code; empty for organic Chrome. |
88 std::string brandcode_; | 87 std::string brandcode_; |
89 | 88 |
90 DISALLOW_COPY_AND_ASSIGN(ResetProfileSettingsHandler); | 89 DISALLOW_COPY_AND_ASSIGN(ResetProfileSettingsHandler); |
91 }; | 90 }; |
92 | 91 |
93 } // namespace options | 92 } // namespace options |
94 | 93 |
95 #endif // CHROME_BROWSER_UI_WEBUI_OPTIONS_RESET_PROFILE_SETTINGS_HANDLER_H_ | 94 #endif // CHROME_BROWSER_UI_WEBUI_OPTIONS_RESET_PROFILE_SETTINGS_HANDLER_H_ |
OLD | NEW |