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

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

Issue 3674005: [Mac] Update Clear Browsing dialog for proper functioning from incognito wind... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 10 years, 2 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
OLDNEW
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
11 #include "base/scoped_ptr.h" 11 #include "base/scoped_ptr.h"
12 12
13 class BrowsingDataRemover; 13 class BrowsingDataRemover;
14 class ClearBrowsingObserver; 14 class ClearBrowsingObserver;
15 class Profile; 15 class Profile;
16 class ProfileSyncService;
16 @class ThrobberView; 17 @class ThrobberView;
17 18
18 // Name of notification that is called when data is cleared. 19 // Name of notification that is called when data is cleared.
19 extern NSString* const kClearBrowsingDataControllerDidDelete; 20 extern NSString* const kClearBrowsingDataControllerDidDelete;
20 // A key in the above notification's userInfo. Contains a NSNumber with the 21 // A key in the above notification's userInfo. Contains a NSNumber with the
21 // logically-ored constants defined in BrowsingDataRemover for the removal. 22 // logically-ored constants defined in BrowsingDataRemover for the removal.
22 extern NSString* const kClearBrowsingDataControllerRemoveMask; 23 extern NSString* const kClearBrowsingDataControllerRemoveMask;
23 24
24 // A window controller for managing the "Clear Browsing Data" feature. Modally 25 // A window controller for managing the "Clear Browsing Data" feature. Modally
25 // presents a dialog offering the user a set of choices of what browsing data 26 // presents a dialog offering the user a set of choices of what browsing data
26 // to delete and does so if the user chooses. 27 // to delete and does so if the user chooses.
27 28
28 @interface ClearBrowsingDataController : NSWindowController { 29 @interface ClearBrowsingDataController : NSWindowController {
29 @private 30 @private
30 Profile* profile_; // Weak, owned by browser. 31 Profile* profile_; // Weak, owned by browser.
31 // If non-null means there is a removal in progress. Member used mainly for 32 // 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 33 // automated tests. The remove deletes itself when it's done, so this is a
33 // weak reference. 34 // weak reference.
34 BrowsingDataRemover* remover_; 35 BrowsingDataRemover* remover_;
36 ProfileSyncService* sync_service_;
35 scoped_ptr<ClearBrowsingObserver> observer_; 37 scoped_ptr<ClearBrowsingObserver> observer_;
36 BOOL isClearing_; // YES while clearing data is ongoing. 38 BOOL isClearing_; // YES while clearing data is ongoing.
37 NSString* clearingStatus_; 39 NSString* clearingStatus_;
38 40
39 IBOutlet NSTabView* tabView_; 41 IBOutlet NSTabView* tabView_;
40 IBOutlet NSView* otherDataTab_; 42 IBOutlet NSView* otherDataTab_;
41 IBOutlet NSArray* objectsToVerticallySize_; 43 IBOutlet NSArray* objectsToVerticallySize_;
42 44
43 // Values for checkboxes, kept in sync with bindings. These values get 45 // Values for checkboxes, kept in sync with bindings. These values get
44 // persisted into prefs if the user accepts the dialog. 46 // persisted into prefs if the user accepts the dialog.
(...skipping 28 matching lines...) Expand all
73 // Properties for bindings 75 // Properties for bindings
74 @property (nonatomic) BOOL clearBrowsingHistory; 76 @property (nonatomic) BOOL clearBrowsingHistory;
75 @property (nonatomic) BOOL clearDownloadHistory; 77 @property (nonatomic) BOOL clearDownloadHistory;
76 @property (nonatomic) BOOL emptyCache; 78 @property (nonatomic) BOOL emptyCache;
77 @property (nonatomic) BOOL deleteCookies; 79 @property (nonatomic) BOOL deleteCookies;
78 @property (nonatomic) BOOL clearSavedPasswords; 80 @property (nonatomic) BOOL clearSavedPasswords;
79 @property (nonatomic) BOOL clearFormData; 81 @property (nonatomic) BOOL clearFormData;
80 @property (nonatomic) NSInteger timePeriod; 82 @property (nonatomic) NSInteger timePeriod;
81 @property (nonatomic) BOOL isClearing; 83 @property (nonatomic) BOOL isClearing;
82 @property (nonatomic, copy) NSString* clearingStatus; 84 @property (nonatomic, copy) NSString* clearingStatus;
85 @property (readonly, nonatomic) BOOL isSyncVisible;
83 @property (readonly, nonatomic) BOOL isSyncEnabled; 86 @property (readonly, nonatomic) BOOL isSyncEnabled;
84 87
85 @property (readonly) NSFont* labelFont; 88 @property (readonly) NSFont* labelFont;
86 89
87 @end 90 @end
88 91
89 92
90 @interface ClearBrowsingDataController (ExposedForUnitTests) 93 @interface ClearBrowsingDataController (ExposedForUnitTests)
91 // Create the controller with the given profile (which must not be NULL). 94 // Create the controller with the given profile (which must not be NULL).
92 - (id)initWithProfile:(Profile*)profile; 95 - (id)initWithProfile:(Profile*)profile;
93 @property (readonly) int removeMask; 96 @property (readonly) int removeMask;
94 - (void)persistToPrefs; 97 - (void)persistToPrefs;
95 - (void)closeDialog; 98 - (void)closeDialog;
96 - (void)dataRemoverDidFinish; 99 - (void)dataRemoverDidFinish;
97 @end 100 @end
98 101
99 #endif // CHROME_BROWSER_COCOA_CLEAR_BROWSING_DATA_CONTROLLER_ 102 #endif // CHROME_BROWSER_COCOA_CLEAR_BROWSING_DATA_CONTROLLER_
OLDNEW
« no previous file with comments | « chrome/app/nibs/ClearBrowsingData.xib ('k') | chrome/browser/cocoa/clear_browsing_data_controller.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698