OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef CHROME_BROWSER_UI_WEBUI_OPTIONS_RESET_PROFILE_SETTINGS_HANDLER_H_ |
| 6 #define CHROME_BROWSER_UI_WEBUI_OPTIONS_RESET_PROFILE_SETTINGS_HANDLER_H_ |
| 7 |
| 8 #include "base/compiler_specific.h" |
| 9 #include "base/memory/weak_ptr.h" |
| 10 #include "chrome/browser/ui/webui/options/options_ui.h" |
| 11 |
| 12 namespace base { |
| 13 class DictionaryValue; |
| 14 class ListValue; |
| 15 } // namespace base |
| 16 |
| 17 class ProfileResetter; |
| 18 |
| 19 namespace options { |
| 20 |
| 21 // Reset Profile Settings handler page UI handler. |
| 22 class ResetProfileSettingsHandler |
| 23 : public OptionsPageUIHandler, |
| 24 public base::SupportsWeakPtr<ResetProfileSettingsHandler> { |
| 25 public: |
| 26 ResetProfileSettingsHandler(); |
| 27 virtual ~ResetProfileSettingsHandler(); |
| 28 |
| 29 // OptionsPageUIHandler implementation. |
| 30 virtual void GetLocalizedValues( |
| 31 base::DictionaryValue* localized_strings) OVERRIDE; |
| 32 virtual void InitializeHandler() OVERRIDE; |
| 33 |
| 34 // WebUIMessageHandler implementation. |
| 35 virtual void RegisterMessages() OVERRIDE; |
| 36 |
| 37 private: |
| 38 // Javascript callback to start clearing data. |
| 39 void HandleResetProfileSettings(const base::ListValue* value); |
| 40 |
| 41 // Closes the dialog once all requested settings has been reset. |
| 42 void OnResetProfileSettingsDone(); |
| 43 |
| 44 scoped_ptr<ProfileResetter> resetter_; |
| 45 |
| 46 DISALLOW_COPY_AND_ASSIGN(ResetProfileSettingsHandler); |
| 47 }; |
| 48 |
| 49 } // namespace options |
| 50 |
| 51 #endif // CHROME_BROWSER_UI_WEBUI_OPTIONS_RESET_PROFILE_SETTINGS_HANDLER_H_ |
OLD | NEW |