Chromium Code Reviews| Index: chrome/browser/ui/webui/options/automatic_settings_reset_handler.h |
| diff --git a/chrome/browser/ui/webui/options/automatic_settings_reset_handler.h b/chrome/browser/ui/webui/options/automatic_settings_reset_handler.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..c9088cad57bd7b2773e3871a93101268fdbf1412 |
| --- /dev/null |
| +++ b/chrome/browser/ui/webui/options/automatic_settings_reset_handler.h |
| @@ -0,0 +1,39 @@ |
| +// Copyright 2014 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef CHROME_BROWSER_UI_WEBUI_OPTIONS_AUTOMATIC_SETTINGS_RESET_HANDLER_H_ |
| +#define CHROME_BROWSER_UI_WEBUI_OPTIONS_AUTOMATIC_SETTINGS_RESET_HANDLER_H_ |
| + |
| +#include "base/memory/weak_ptr.h" |
| +#include "chrome/browser/ui/webui/options/options_ui.h" |
| + |
| +namespace options { |
| + |
| +// Handler for both the banner that displays a settings reset event at the |
|
erikwright (departed)
2014/02/05 15:50:03
"both"?
robertshield
2014/02/06 18:56:50
yes, both the banner and the banner. Also, the ban
|
| +// top of the settings page. |
| +class AutomaticSettingsResetHandler |
| + : public OptionsPageUIHandler, |
| + public base::SupportsWeakPtr<AutomaticSettingsResetHandler> { |
|
gab
2014/02/05 15:23:52
Doesn't seem you use weak ptrs; remove this?
robertshield
2014/02/06 18:56:50
Using them now. See .cc file.
|
| + public: |
| + AutomaticSettingsResetHandler(); |
| + virtual ~AutomaticSettingsResetHandler(); |
| + |
| + // OptionsPageUIHandler implementation. |
| + virtual void GetLocalizedValues( |
| + base::DictionaryValue* localized_strings) OVERRIDE; |
| + virtual void InitializePage() OVERRIDE; |
| + |
| + // WebUIMessageHandler implementation. |
| + virtual void RegisterMessages() OVERRIDE; |
| + |
| + private: |
| + // Called when the user dismisses the automatic settings reset banner. |
| + void OnDismissedAutomaticSettingsResetBanner(const base::ListValue* value); |
| + |
| + DISALLOW_COPY_AND_ASSIGN(AutomaticSettingsResetHandler); |
| +}; |
| + |
| +} // namespace options |
| + |
| +#endif // CHROME_BROWSER_UI_WEBUI_OPTIONS_AUTOMATIC_SETTINGS_RESET_HANDLER_H_ |