Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2081)

Side by Side Diff: chrome/browser/cocoa/clear_browsing_data_controller.h

Issue 112065: Implement Clear Browser Data for Mac as an app modal dialog. Uses the profile... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 11 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
Property Changes:
Name: svn:eol-style
+ LF
OLDNEW
(Empty)
1 // Copyright (c) 2009 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.
4
5 #ifndef CHROME_BROWSER_COCOA_CLEAR_BROWSING_DATA_CONTROLLER_
6 #define CHROME_BROWSER_COCOA_CLEAR_BROWSING_DATA_CONTROLLER_
7
8 #import <Cocoa/Cocoa.h>
9
10 #include "base/scoped_ptr.h"
11
12 class BrowsingDataRemover;
13 class ClearBrowsingObserver;
14 class Profile;
15 @class ThrobberView;
16
17 // A window controller for managing the "Clear Browsing Data" feature. Modally
18 // presents a dialog offering the user a set of choices of what browsing data
19 // to delete and does so if the user chooses.
20
21 @interface ClearBrowsingDataController : NSWindowController {
22 @private
23 Profile* profile_; // Weak, owned by browser.
24 // If non-null means there is a removal in progress. Member used mainly for
25 // automated tests. The remove deletes itself when it's done, so this is a
26 // weak reference.
27 BrowsingDataRemover* remover_;
28 scoped_ptr<ClearBrowsingObserver> observer_;
29 BOOL isClearing_; // YES while clearing data is ongoing.
30 IBOutlet ThrobberView* progress_;
31
32 // Values for checkboxes, kept in sync with bindings. These values get
33 // persisted into prefs if the user accepts the dialog.
34 BOOL clearBrowsingHistory_;
35 BOOL clearDownloadHistory_;
36 BOOL emptyCache_;
37 BOOL deleteCookies_;
38 BOOL clearSavedPasswords_;
39 BOOL clearFormData_;
40 NSInteger timePeriod_;
41 }
42
43 // Create the controller with the given profile (which must not be NULL).
44 - (id)initWithProfile:(Profile*)profile;
45
46 // Run the dialog with an application-modal event loop. If the user accepts,
47 // performs the deletion of the selected browsing data. The values of the
48 // checkboxes will be persisted into prefs for next time.
49 - (void)runModalDialog;
50
51 // IBActions for the dialog buttons
52 - (IBAction)clearData:(id)sender;
53 - (IBAction)cancel:(id)sender;
54
55 // Properties for bindings
56 @property BOOL clearBrowsingHistory;
57 @property BOOL clearDownloadHistory;
58 @property BOOL emptyCache;
59 @property BOOL deleteCookies;
60 @property BOOL clearSavedPasswords;
61 @property BOOL clearFormData;
62 @property NSInteger timePeriod;
63 @property BOOL isClearing;
64
65 @end
66
67 #endif // CHROME_BROWSER_COCOA_CLEAR_BROWSING_DATA_CONTROLLER_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698