OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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_COCOA_CLEAR_BROWSING_DATA_CONTROLLER_ | 5 #ifndef CHROME_BROWSER_COCOA_CLEAR_BROWSING_DATA_CONTROLLER_ |
6 #define CHROME_BROWSER_COCOA_CLEAR_BROWSING_DATA_CONTROLLER_ | 6 #define CHROME_BROWSER_COCOA_CLEAR_BROWSING_DATA_CONTROLLER_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #import <Cocoa/Cocoa.h> | 9 #import <Cocoa/Cocoa.h> |
10 | 10 |
(...skipping 16 matching lines...) Expand all Loading... |
27 | 27 |
28 @interface ClearBrowsingDataController : NSWindowController { | 28 @interface ClearBrowsingDataController : NSWindowController { |
29 @private | 29 @private |
30 Profile* profile_; // Weak, owned by browser. | 30 Profile* profile_; // Weak, owned by browser. |
31 // If non-null means there is a removal in progress. Member used mainly for | 31 // If non-null means there is a removal in progress. Member used mainly for |
32 // automated tests. The remove deletes itself when it's done, so this is a | 32 // automated tests. The remove deletes itself when it's done, so this is a |
33 // weak reference. | 33 // weak reference. |
34 BrowsingDataRemover* remover_; | 34 BrowsingDataRemover* remover_; |
35 scoped_ptr<ClearBrowsingObserver> observer_; | 35 scoped_ptr<ClearBrowsingObserver> observer_; |
36 BOOL isClearing_; // YES while clearing data is ongoing. | 36 BOOL isClearing_; // YES while clearing data is ongoing. |
| 37 NSString* clearingStatus_; |
| 38 |
| 39 IBOutlet NSTabView* tabView_; |
| 40 IBOutlet NSView* otherDataTab_; |
| 41 IBOutlet NSArray* objectsToVerticallySize_; |
37 | 42 |
38 // Values for checkboxes, kept in sync with bindings. These values get | 43 // Values for checkboxes, kept in sync with bindings. These values get |
39 // persisted into prefs if the user accepts the dialog. | 44 // persisted into prefs if the user accepts the dialog. |
40 BOOL clearBrowsingHistory_; | 45 BOOL clearBrowsingHistory_; |
41 BOOL clearDownloadHistory_; | 46 BOOL clearDownloadHistory_; |
42 BOOL emptyCache_; | 47 BOOL emptyCache_; |
43 BOOL deleteCookies_; | 48 BOOL deleteCookies_; |
44 BOOL clearSavedPasswords_; | 49 BOOL clearSavedPasswords_; |
45 BOOL clearFormData_; | 50 BOOL clearFormData_; |
46 NSInteger timePeriod_; | 51 NSInteger timePeriod_; |
47 } | 52 } |
48 | 53 |
49 // Show the clear browsing data window. Do not use |-initWithProfile:|, | 54 // Show the clear browsing data window. Do not use |-initWithProfile:|, |
50 // go through this instead so we don't end up with multiple instances. | 55 // go through this instead so we don't end up with multiple instances. |
51 // This function does not block, so it can be used from DOMUI calls. | 56 // This function does not block, so it can be used from DOMUI calls. |
52 + (void)showClearBrowsingDialogForProfile:(Profile*)profile; | 57 + (void)showClearBrowsingDialogForProfile:(Profile*)profile; |
53 + (ClearBrowsingDataController*)controllerForProfile:(Profile*)profile; | 58 + (ClearBrowsingDataController*)controllerForProfile:(Profile*)profile; |
54 | 59 |
55 // Run the dialog with an application-modal event loop. If the user accepts, | 60 // Run the dialog with an application-modal event loop. If the user accepts, |
56 // performs the deletion of the selected browsing data. The values of the | 61 // performs the deletion of the selected browsing data. The values of the |
57 // checkboxes will be persisted into prefs for next time. | 62 // checkboxes will be persisted into prefs for next time. |
58 - (void)runModalDialog; | 63 - (void)runModalDialog; |
59 | 64 |
60 // IBActions for the dialog buttons | 65 // IBActions for the dialog buttons |
61 - (IBAction)clearData:(id)sender; | 66 - (IBAction)clearData:(id)sender; |
62 - (IBAction)cancel:(id)sender; | 67 - (IBAction)cancel:(id)sender; |
| 68 |
63 - (IBAction)openFlashPlayerSettings:(id)sender; | 69 - (IBAction)openFlashPlayerSettings:(id)sender; |
| 70 - (IBAction)stopSyncAndDeleteData:(id)sender; |
| 71 - (IBAction)openGoogleDashboard:(id)sender; |
64 | 72 |
65 // Properties for bindings | 73 // Properties for bindings |
66 @property (nonatomic) BOOL clearBrowsingHistory; | 74 @property (nonatomic) BOOL clearBrowsingHistory; |
67 @property (nonatomic) BOOL clearDownloadHistory; | 75 @property (nonatomic) BOOL clearDownloadHistory; |
68 @property (nonatomic) BOOL emptyCache; | 76 @property (nonatomic) BOOL emptyCache; |
69 @property (nonatomic) BOOL deleteCookies; | 77 @property (nonatomic) BOOL deleteCookies; |
70 @property (nonatomic) BOOL clearSavedPasswords; | 78 @property (nonatomic) BOOL clearSavedPasswords; |
71 @property (nonatomic) BOOL clearFormData; | 79 @property (nonatomic) BOOL clearFormData; |
72 @property (nonatomic) NSInteger timePeriod; | 80 @property (nonatomic) NSInteger timePeriod; |
73 @property (nonatomic) BOOL isClearing; | 81 @property (nonatomic) BOOL isClearing; |
| 82 @property (nonatomic, copy) NSString* clearingStatus; |
| 83 @property (readonly, nonatomic) BOOL isSyncEnabled; |
| 84 |
| 85 @property (readonly) NSFont* labelFont; |
74 | 86 |
75 @end | 87 @end |
76 | 88 |
77 | 89 |
78 @interface ClearBrowsingDataController (ExposedForUnitTests) | 90 @interface ClearBrowsingDataController (ExposedForUnitTests) |
79 // Create the controller with the given profile (which must not be NULL). | 91 // Create the controller with the given profile (which must not be NULL). |
80 - (id)initWithProfile:(Profile*)profile; | 92 - (id)initWithProfile:(Profile*)profile; |
81 @property (readonly) int removeMask; | 93 @property (readonly) int removeMask; |
82 - (void)persistToPrefs; | 94 - (void)persistToPrefs; |
83 - (void)closeDialog; | 95 - (void)closeDialog; |
84 - (void)dataRemoverDidFinish; | 96 - (void)dataRemoverDidFinish; |
85 @end | 97 @end |
86 | 98 |
87 #endif // CHROME_BROWSER_COCOA_CLEAR_BROWSING_DATA_CONTROLLER_ | 99 #endif // CHROME_BROWSER_COCOA_CLEAR_BROWSING_DATA_CONTROLLER_ |
OLD | NEW |