| 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_UI_COCOA_CLEAR_BROWSING_DATA_CONTROLLER_ | 5 #ifndef CHROME_BROWSER_UI_COCOA_CLEAR_BROWSING_DATA_CONTROLLER_ |
| 6 #define CHROME_BROWSER_UI_COCOA_CLEAR_BROWSING_DATA_CONTROLLER_ | 6 #define CHROME_BROWSER_UI_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 28 matching lines...) Expand all Loading... |
| 39 // persisted into prefs if the user accepts the dialog. | 39 // persisted into prefs if the user accepts the dialog. |
| 40 BOOL clearBrowsingHistory_; | 40 BOOL clearBrowsingHistory_; |
| 41 BOOL clearDownloadHistory_; | 41 BOOL clearDownloadHistory_; |
| 42 BOOL emptyCache_; | 42 BOOL emptyCache_; |
| 43 BOOL deleteCookies_; | 43 BOOL deleteCookies_; |
| 44 BOOL clearSavedPasswords_; | 44 BOOL clearSavedPasswords_; |
| 45 BOOL clearFormData_; | 45 BOOL clearFormData_; |
| 46 NSInteger timePeriod_; | 46 NSInteger timePeriod_; |
| 47 } | 47 } |
| 48 | 48 |
| 49 // Properties for bindings |
| 50 @property(nonatomic) BOOL clearBrowsingHistory; |
| 51 @property(nonatomic) BOOL clearDownloadHistory; |
| 52 @property(nonatomic) BOOL emptyCache; |
| 53 @property(nonatomic) BOOL deleteCookies; |
| 54 @property(nonatomic) BOOL clearSavedPasswords; |
| 55 @property(nonatomic) BOOL clearFormData; |
| 56 @property(nonatomic) NSInteger timePeriod; |
| 57 @property(nonatomic) BOOL isClearing; |
| 58 |
| 49 // Show the clear browsing data window. Do not use |-initWithProfile:|, | 59 // Show the clear browsing data window. Do not use |-initWithProfile:|, |
| 50 // go through this instead so we don't end up with multiple instances. | 60 // 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. | 61 // This function does not block, so it can be used from DOMUI calls. |
| 52 + (void)showClearBrowsingDialogForProfile:(Profile*)profile; | 62 + (void)showClearBrowsingDialogForProfile:(Profile*)profile; |
| 53 + (ClearBrowsingDataController*)controllerForProfile:(Profile*)profile; | 63 + (ClearBrowsingDataController*)controllerForProfile:(Profile*)profile; |
| 54 | 64 |
| 55 // Run the dialog with an application-modal event loop. If the user accepts, | 65 // 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 | 66 // performs the deletion of the selected browsing data. The values of the |
| 57 // checkboxes will be persisted into prefs for next time. | 67 // checkboxes will be persisted into prefs for next time. |
| 58 - (void)runModalDialog; | 68 - (void)runModalDialog; |
| 59 | 69 |
| 60 // IBActions for the dialog buttons | 70 // IBActions for the dialog buttons |
| 61 - (IBAction)clearData:(id)sender; | 71 - (IBAction)clearData:(id)sender; |
| 62 - (IBAction)cancel:(id)sender; | 72 - (IBAction)cancel:(id)sender; |
| 63 - (IBAction)openFlashPlayerSettings:(id)sender; | 73 - (IBAction)openFlashPlayerSettings:(id)sender; |
| 64 | 74 |
| 65 // Properties for bindings | |
| 66 @property (nonatomic) BOOL clearBrowsingHistory; | |
| 67 @property (nonatomic) BOOL clearDownloadHistory; | |
| 68 @property (nonatomic) BOOL emptyCache; | |
| 69 @property (nonatomic) BOOL deleteCookies; | |
| 70 @property (nonatomic) BOOL clearSavedPasswords; | |
| 71 @property (nonatomic) BOOL clearFormData; | |
| 72 @property (nonatomic) NSInteger timePeriod; | |
| 73 @property (nonatomic) BOOL isClearing; | |
| 74 | |
| 75 @end | 75 @end |
| 76 | 76 |
| 77 | 77 |
| 78 @interface ClearBrowsingDataController (ExposedForUnitTests) | 78 @interface ClearBrowsingDataController (ExposedForUnitTests) |
| 79 @property(readonly) int removeMask; |
| 80 |
| 79 // Create the controller with the given profile (which must not be NULL). | 81 // Create the controller with the given profile (which must not be NULL). |
| 80 - (id)initWithProfile:(Profile*)profile; | 82 - (id)initWithProfile:(Profile*)profile; |
| 81 @property (readonly) int removeMask; | |
| 82 - (void)persistToPrefs; | 83 - (void)persistToPrefs; |
| 83 - (void)closeDialog; | 84 - (void)closeDialog; |
| 84 - (void)dataRemoverDidFinish; | 85 - (void)dataRemoverDidFinish; |
| 85 @end | 86 @end |
| 86 | 87 |
| 87 #endif // CHROME_BROWSER_UI_COCOA_CLEAR_BROWSING_DATA_CONTROLLER_ | 88 #endif // CHROME_BROWSER_UI_COCOA_CLEAR_BROWSING_DATA_CONTROLLER_ |
| OLD | NEW |