NaCl: Update revision in DEPS, r12770 -> r12773
[chromium-blink-merge.git] / chrome / browser / ui / webui / options / clear_browser_data_handler.h
blob9972d5244c2c2df270d40257946e296b858233b4
1 // Copyright (c) 2012 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.
5 #ifndef CHROME_BROWSER_UI_WEBUI_OPTIONS_CLEAR_BROWSER_DATA_HANDLER_H_
6 #define CHROME_BROWSER_UI_WEBUI_OPTIONS_CLEAR_BROWSER_DATA_HANDLER_H_
8 #include "base/prefs/pref_member.h"
9 #include "chrome/browser/browsing_data/browsing_data_remover.h"
10 #include "chrome/browser/ui/webui/options/options_ui.h"
12 namespace options {
14 // Clear browser data handler page UI handler.
15 class ClearBrowserDataHandler : public OptionsPageUIHandler,
16 public BrowsingDataRemover::Observer {
17 public:
18 ClearBrowserDataHandler();
19 virtual ~ClearBrowserDataHandler();
21 // OptionsPageUIHandler implementation.
22 virtual void GetLocalizedValues(
23 base::DictionaryValue* localized_strings) OVERRIDE;
24 virtual void InitializeHandler() OVERRIDE;
25 virtual void InitializePage() OVERRIDE;
27 // WebUIMessageHandler implementation.
28 virtual void RegisterMessages() OVERRIDE;
30 void UpdateInfoBannerVisibility();
32 private:
33 // Javascript callback to start clearing data.
34 void HandleClearBrowserData(const base::ListValue* value);
36 // BrowsingDataRemover::Observer implementation.
37 // Closes the dialog once all requested data has been removed.
38 virtual void OnBrowsingDataRemoverDone() OVERRIDE;
40 // Updates UI when the pref to allow clearing history changes.
41 virtual void OnBrowsingHistoryPrefChanged();
43 // If non-null it means removal is in progress. BrowsingDataRemover takes care
44 // of deleting itself when done.
45 BrowsingDataRemover* remover_;
47 // Keeps track of whether clearing LSO data is supported.
48 BooleanPrefMember clear_plugin_lso_data_enabled_;
50 // Keeps track of whether Pepper Flash is enabled and thus Flapper-specific
51 // settings and removal options (e.g. Content Licenses) are available.
52 BooleanPrefMember pepper_flash_settings_enabled_;
54 // Keeps track of whether deleting browsing history and downloads is allowed.
55 BooleanPrefMember allow_deleting_browser_history_;
57 DISALLOW_COPY_AND_ASSIGN(ClearBrowserDataHandler);
60 } // namespace options
62 #endif // CHROME_BROWSER_UI_WEBUI_OPTIONS_CLEAR_BROWSER_DATA_HANDLER_H_