OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "chrome/browser/browsing_data_remover.h" | 9 #include "chrome/browser/browsing_data_remover.h" |
10 #include "chrome/browser/prefs/pref_member.h" | 10 #include "chrome/browser/prefs/pref_member.h" |
11 #include "chrome/browser/ui/webui/options/options_ui.h" | 11 #include "chrome/browser/ui/webui/options/options_ui.h" |
12 | 12 |
13 // Clear browser data handler page UI handler. | 13 // Clear browser data handler page UI handler. |
14 class ClearBrowserDataHandler : public OptionsPageUIHandler, | 14 class ClearBrowserDataHandler : public OptionsPageUIHandler, |
15 public BrowsingDataRemover::Observer { | 15 public BrowsingDataRemover::Observer { |
16 public: | 16 public: |
17 ClearBrowserDataHandler(); | 17 ClearBrowserDataHandler(); |
18 virtual ~ClearBrowserDataHandler(); | 18 virtual ~ClearBrowserDataHandler(); |
19 | 19 |
20 // OptionsPageUIHandler implementation. | 20 // OptionsPageUIHandler implementation. |
21 virtual void Initialize() OVERRIDE; | 21 virtual void InitializeHandler() OVERRIDE; |
22 | 22 |
23 virtual void GetLocalizedValues(DictionaryValue* localized_strings) OVERRIDE; | 23 virtual void GetLocalizedValues(DictionaryValue* localized_strings) OVERRIDE; |
24 | 24 |
25 // WebUIMessageHandler implementation. | 25 // WebUIMessageHandler implementation. |
26 virtual void RegisterMessages() OVERRIDE; | 26 virtual void RegisterMessages() OVERRIDE; |
27 | 27 |
28 private: | 28 private: |
29 // Javascript callback to start clearing data. | 29 // Javascript callback to start clearing data. |
30 void HandleClearBrowserData(const ListValue* value); | 30 void HandleClearBrowserData(const ListValue* value); |
31 | 31 |
32 // Callback from BrowsingDataRemover. Closes the dialog. | 32 // Callback from BrowsingDataRemover. Closes the dialog. |
33 virtual void OnBrowsingDataRemoverDone() OVERRIDE; | 33 virtual void OnBrowsingDataRemoverDone() OVERRIDE; |
34 | 34 |
35 // If non-null it means removal is in progress. BrowsingDataRemover takes care | 35 // If non-null it means removal is in progress. BrowsingDataRemover takes care |
36 // of deleting itself when done. | 36 // of deleting itself when done. |
37 BrowsingDataRemover* remover_; | 37 BrowsingDataRemover* remover_; |
38 | 38 |
39 // Keeps track of whether clearing LSO data is supported. | 39 // Keeps track of whether clearing LSO data is supported. |
40 BooleanPrefMember clear_plugin_lso_data_enabled_; | 40 BooleanPrefMember clear_plugin_lso_data_enabled_; |
41 | 41 |
42 DISALLOW_COPY_AND_ASSIGN(ClearBrowserDataHandler); | 42 DISALLOW_COPY_AND_ASSIGN(ClearBrowserDataHandler); |
43 }; | 43 }; |
44 | 44 |
45 #endif // CHROME_BROWSER_UI_WEBUI_OPTIONS_CLEAR_BROWSER_DATA_HANDLER_H_ | 45 #endif // CHROME_BROWSER_UI_WEBUI_OPTIONS_CLEAR_BROWSER_DATA_HANDLER_H_ |
OLD | NEW |