OLD | NEW |
---|---|
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 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_CLEAR_BROWSER_DATA_HANDLER_H_ | 5 #ifndef CHROME_BROWSER_UI_WEBUI_OPTIONS_CLEAR_BROWSER_DATA_HANDLER_H_ |
6 #define CHROME_BROWSER_UI_WEBUI_OPTIONS_CLEAR_BROWSER_DATA_HANDLER_H_ | 6 #define CHROME_BROWSER_UI_WEBUI_OPTIONS_CLEAR_BROWSER_DATA_HANDLER_H_ |
7 | 7 |
8 #include "base/prefs/public/pref_member.h" | 8 #include "base/prefs/public/pref_member.h" |
9 #include "chrome/browser/browsing_data/browsing_data_remover.h" | 9 #include "chrome/browser/browsing_data/browsing_data_remover.h" |
10 #include "chrome/browser/ui/webui/options/options_ui.h" | 10 #include "chrome/browser/ui/webui/options/options_ui.h" |
11 | 11 |
12 namespace options { | 12 namespace options { |
13 | 13 |
14 // Clear browser data handler page UI handler. | 14 // Clear browser data handler page UI handler. |
15 class ClearBrowserDataHandler : public OptionsPageUIHandler, | 15 class ClearBrowserDataHandler : public OptionsPageUIHandler, |
16 public BrowsingDataRemover::Observer { | 16 public BrowsingDataRemover::Observer { |
17 public: | 17 public: |
18 ClearBrowserDataHandler(); | 18 ClearBrowserDataHandler(); |
19 virtual ~ClearBrowserDataHandler(); | 19 virtual ~ClearBrowserDataHandler(); |
20 | 20 |
21 void UpdateInfoBannerVisibility(); | |
James Hawkins
2013/02/01 17:42:02
Optional nit: Move non-inherited methods below the
markusheintz_
2013/02/01 18:43:17
Done.
| |
22 | |
21 // OptionsPageUIHandler implementation. | 23 // OptionsPageUIHandler implementation. |
22 virtual void GetLocalizedValues(DictionaryValue* localized_strings) OVERRIDE; | 24 virtual void GetLocalizedValues(DictionaryValue* localized_strings) OVERRIDE; |
23 virtual void InitializeHandler() OVERRIDE; | 25 virtual void InitializeHandler() OVERRIDE; |
26 virtual void InitializePage() OVERRIDE; | |
24 | 27 |
25 // WebUIMessageHandler implementation. | 28 // WebUIMessageHandler implementation. |
26 virtual void RegisterMessages() OVERRIDE; | 29 virtual void RegisterMessages() OVERRIDE; |
27 | 30 |
28 private: | 31 private: |
29 // Javascript callback to start clearing data. | 32 // Javascript callback to start clearing data. |
30 void HandleClearBrowserData(const ListValue* value); | 33 void HandleClearBrowserData(const ListValue* value); |
31 | 34 |
32 // BrowsingDataRemover::Observer implementation. | 35 // BrowsingDataRemover::Observer implementation. |
33 // Closes the dialog once all requested data has been removed. | 36 // Closes the dialog once all requested data has been removed. |
34 virtual void OnBrowsingDataRemoverDone() OVERRIDE; | 37 virtual void OnBrowsingDataRemoverDone() OVERRIDE; |
35 | 38 |
36 // If non-null it means removal is in progress. BrowsingDataRemover takes care | 39 // If non-null it means removal is in progress. BrowsingDataRemover takes care |
37 // of deleting itself when done. | 40 // of deleting itself when done. |
38 BrowsingDataRemover* remover_; | 41 BrowsingDataRemover* remover_; |
39 | 42 |
40 // Keeps track of whether clearing LSO data is supported. | 43 // Keeps track of whether clearing LSO data is supported. |
41 BooleanPrefMember clear_plugin_lso_data_enabled_; | 44 BooleanPrefMember clear_plugin_lso_data_enabled_; |
42 | 45 |
43 // Keeps track of whether Pepper Flash is enabled and thus Flapper-specific | 46 // Keeps track of whether Pepper Flash is enabled and thus Flapper-specific |
44 // settings and removal options (e.g. Content Licenses) are available. | 47 // settings and removal options (e.g. Content Licenses) are available. |
45 BooleanPrefMember pepper_flash_settings_enabled_; | 48 BooleanPrefMember pepper_flash_settings_enabled_; |
46 | 49 |
47 DISALLOW_COPY_AND_ASSIGN(ClearBrowserDataHandler); | 50 DISALLOW_COPY_AND_ASSIGN(ClearBrowserDataHandler); |
48 }; | 51 }; |
49 | 52 |
50 } // namespace options | 53 } // namespace options |
51 | 54 |
52 #endif // CHROME_BROWSER_UI_WEBUI_OPTIONS_CLEAR_BROWSER_DATA_HANDLER_H_ | 55 #endif // CHROME_BROWSER_UI_WEBUI_OPTIONS_CLEAR_BROWSER_DATA_HANDLER_H_ |
OLD | NEW |