OLD | NEW |
1 // Copyright (c) 2010 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_GTK_CLEAR_BROWSING_DATA_DIALOG_GTK_H_ | 5 #ifndef CHROME_BROWSER_GTK_CLEAR_BROWSING_DATA_DIALOG_GTK_H_ |
6 #define CHROME_BROWSER_GTK_CLEAR_BROWSING_DATA_DIALOG_GTK_H_ | 6 #define CHROME_BROWSER_GTK_CLEAR_BROWSING_DATA_DIALOG_GTK_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "app/gtk_signal.h" | 9 #include "chrome/browser/ui/gtk/clear_browsing_data_dialog_gtk.h" |
10 #include "base/basictypes.h" | 10 // TODO(msw): remove this file once all includes have been updated. |
11 #include "base/scoped_ptr.h" | |
12 | |
13 typedef struct _GtkWidget GtkWidget; | |
14 typedef struct _GtkWindow GtkWindow; | |
15 | |
16 class AccessibleWidgetHelper; | |
17 class BrowsingDataRemover; | |
18 class Profile; | |
19 | |
20 class ClearBrowsingDataDialogGtk { | |
21 public: | |
22 // Displays the dialog box to clear browsing data from |profile|. | |
23 static void Show(GtkWindow* parent, Profile* profile); | |
24 | |
25 private: | |
26 ClearBrowsingDataDialogGtk(GtkWindow* parent, Profile* profile); | |
27 ~ClearBrowsingDataDialogGtk(); | |
28 | |
29 // Handler to respond to Ok and Cancel responses from the dialog. | |
30 CHROMEGTK_CALLBACK_1(ClearBrowsingDataDialogGtk, void, OnDialogResponse, int); | |
31 | |
32 // Handler to respond to widget clicked actions from the dialog. | |
33 CHROMEGTK_CALLBACK_0(ClearBrowsingDataDialogGtk, void, OnDialogWidgetClicked); | |
34 | |
35 CHROMEGTK_CALLBACK_0(ClearBrowsingDataDialogGtk, void, OnFlashLinkClicked); | |
36 | |
37 // Enable or disable the dialog buttons depending on the state of the | |
38 // checkboxes. | |
39 void UpdateDialogButtons(); | |
40 | |
41 // Create a bitmask from the checkboxes of the dialog. | |
42 int GetCheckedItems(); | |
43 | |
44 // The dialog window. | |
45 GtkWidget* dialog_; | |
46 | |
47 // UI elements. | |
48 GtkWidget* del_history_checkbox_; | |
49 GtkWidget* del_downloads_checkbox_; | |
50 GtkWidget* del_cache_checkbox_; | |
51 GtkWidget* del_cookies_checkbox_; | |
52 GtkWidget* del_passwords_checkbox_; | |
53 GtkWidget* del_form_data_checkbox_; | |
54 GtkWidget* time_period_combobox_; | |
55 | |
56 // Our current profile. | |
57 Profile* profile_; | |
58 | |
59 // If non-null it means removal is in progress. BrowsingDataRemover takes care | |
60 // of deleting itself when done. | |
61 BrowsingDataRemover* remover_; | |
62 | |
63 // Helper object to manage accessibility metadata. | |
64 scoped_ptr<AccessibleWidgetHelper> accessible_widget_helper_; | |
65 | |
66 DISALLOW_COPY_AND_ASSIGN(ClearBrowsingDataDialogGtk); | |
67 }; | |
68 | |
69 | 11 |
70 #endif // CHROME_BROWSER_GTK_CLEAR_BROWSING_DATA_DIALOG_GTK_H_ | 12 #endif // CHROME_BROWSER_GTK_CLEAR_BROWSING_DATA_DIALOG_GTK_H_ |
OLD | NEW |