| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 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 | 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 #import <Cocoa/Cocoa.h> | 5 #import <Cocoa/Cocoa.h> |
| 6 | 6 |
| 7 #include "app/tree_model.h" | 7 #include "app/tree_model.h" |
| 8 #include "base/cocoa_protocols_mac.h" | 8 #include "base/cocoa_protocols_mac.h" |
| 9 #include "base/scoped_nsobject.h" | 9 #include "base/scoped_nsobject.h" |
| 10 #include "base/scoped_ptr.h" | 10 #include "base/scoped_ptr.h" |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 80 | 80 |
| 81 // Our Cocoa copy of the model. | 81 // Our Cocoa copy of the model. |
| 82 scoped_nsobject<CocoaCookieTreeNode> cocoaTreeModel_; | 82 scoped_nsobject<CocoaCookieTreeNode> cocoaTreeModel_; |
| 83 | 83 |
| 84 // A flag indicating whether or not the "Remove" button should be enabled. | 84 // A flag indicating whether or not the "Remove" button should be enabled. |
| 85 BOOL removeButtonEnabled_; | 85 BOOL removeButtonEnabled_; |
| 86 | 86 |
| 87 IBOutlet NSTreeController* treeController_; | 87 IBOutlet NSTreeController* treeController_; |
| 88 | 88 |
| 89 Profile* profile_; // weak | 89 Profile* profile_; // weak |
| 90 BrowsingDataLocalStorageHelper* storageHelper_; // weak |
| 90 } | 91 } |
| 91 @property (assign, nonatomic) BOOL removeButtonEnabled; | 92 @property (assign, nonatomic) BOOL removeButtonEnabled; |
| 92 @property (readonly, nonatomic) NSTreeController* treeController; | 93 @property (readonly, nonatomic) NSTreeController* treeController; |
| 93 | 94 |
| 94 // Designated initializer. Profile cannot be NULL. | 95 // Designated initializer. Profile cannot be NULL. |
| 95 - (id)initWithProfile:(Profile*)profile; | 96 - (id)initWithProfile:(Profile*)profile |
| 97 storageHelper:(BrowsingDataLocalStorageHelper*)storageHelper; |
| 96 | 98 |
| 97 // Shows the cookies window as a modal sheet attached to |window|. | 99 // Shows the cookies window as a modal sheet attached to |window|. |
| 98 - (void)attachSheetTo:(NSWindow*)window; | 100 - (void)attachSheetTo:(NSWindow*)window; |
| 99 | 101 |
| 100 // Delete cookie actions. | 102 // Delete cookie actions. |
| 101 - (IBAction)deleteCookie:(id)sender; | 103 - (IBAction)deleteCookie:(id)sender; |
| 102 - (IBAction)deleteAllCookies:(id)sender; | 104 - (IBAction)deleteAllCookies:(id)sender; |
| 103 | 105 |
| 104 // Closes the sheet and ends the modal loop. This will also cleanup the memory. | 106 // Closes the sheet and ends the modal loop. This will also cleanup the memory. |
| 105 - (IBAction)closeSheet:(id)sender; | 107 - (IBAction)closeSheet:(id)sender; |
| 106 | 108 |
| 107 // Returns the cocoaTreeModel_. | 109 // Returns the cocoaTreeModel_. |
| 108 - (CocoaCookieTreeNode*)cocoaTreeModel; | 110 - (CocoaCookieTreeNode*)cocoaTreeModel; |
| 109 - (void)setCocoaTreeModel:(CocoaCookieTreeNode*)model; | 111 - (void)setCocoaTreeModel:(CocoaCookieTreeNode*)model; |
| 110 | 112 |
| 111 // Returns the treeModel_. | 113 // Returns the treeModel_. |
| 112 - (CookiesTreeModel*)treeModel; | 114 - (CookiesTreeModel*)treeModel; |
| 113 | 115 |
| 114 @end | 116 @end |
| 115 | 117 |
| 116 @interface CookiesWindowController (UnitTesting) | 118 @interface CookiesWindowController (UnitTesting) |
| 117 - (void)clearBrowsingDataNotification:(NSNotification*)notif; | 119 - (void)clearBrowsingDataNotification:(NSNotification*)notif; |
| 118 - (CookiesTreeModelObserverBridge*)modelObserver; | 120 - (CookiesTreeModelObserverBridge*)modelObserver; |
| 119 - (NSArray*)icons; | 121 - (NSArray*)icons; |
| 120 - (void)loadTreeModelFromProfile; | 122 - (void)loadTreeModelFromProfile; |
| 121 @end | 123 @end |
| OLD | NEW |