summaryrefslogtreecommitdiffstats
path: root/chrome/browser/cocoa/cookies_window_controller.mm
diff options
context:
space:
mode:
authorrsesek@chromium.org <rsesek@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-01-26 20:10:08 +0000
committerrsesek@chromium.org <rsesek@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-01-26 20:10:08 +0000
commit62299d40f271bfaae651f8dcfea4da8170a7bc14 (patch)
tree2552bfb2f99cebdc467128434d1b27580a32bf07 /chrome/browser/cocoa/cookies_window_controller.mm
parent4b25d8a0e3954038eea0ffbb4c79ff06fac68384 (diff)
downloadchromium_src-62299d40f271bfaae651f8dcfea4da8170a7bc14.zip
chromium_src-62299d40f271bfaae651f8dcfea4da8170a7bc14.tar.gz
chromium_src-62299d40f271bfaae651f8dcfea4da8170a7bc14.tar.bz2
[Mac] Give the cookies manager a search field.
XIB changes: * Add an NSSearchField and adjust window size. * Add an outlet for the NSOutlineView so we can clear the delegate to avoid potential crashes during sheet closing. * Change the control size of the NSOutlineView to small (looks better). BUG=32328 TEST=Chromium-->Preferences-->Under the Hood-->Show cookies... Enter a domain or domain substring and, without hitting enter, results should be filtered. Review URL: http://codereview.chromium.org/557002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@37139 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/cocoa/cookies_window_controller.mm')
-rw-r--r--chrome/browser/cocoa/cookies_window_controller.mm8
1 files changed, 8 insertions, 0 deletions
diff --git a/chrome/browser/cocoa/cookies_window_controller.mm b/chrome/browser/cocoa/cookies_window_controller.mm
index 998edf4..a8a7a31 100644
--- a/chrome/browser/cocoa/cookies_window_controller.mm
+++ b/chrome/browser/cocoa/cookies_window_controller.mm
@@ -167,6 +167,8 @@ CocoaCookieTreeNode* CookiesTreeModelObserverBridge::FindCocoaNode(
}
- (void)windowWillClose:(NSNotification*)notif {
+ [searchField_ setTarget:nil];
+ [outlineView_ setDelegate:nil];
[self autorelease];
}
@@ -185,6 +187,12 @@ CocoaCookieTreeNode* CookiesTreeModelObserverBridge::FindCocoaNode(
[sheet orderOut:self];
}
+- (IBAction)updateFilter:(id)sender {
+ DCHECK([sender isKindOfClass:[NSSearchField class]]);
+ NSString* string = [sender stringValue];
+ treeModel_->UpdateSearchResults(base::SysNSStringToWide(string));
+}
+
- (IBAction)deleteCookie:(id)sender {
NSIndexPath* selectionPath = [treeController_ selectionIndexPath];
// N.B.: I suspect that |-selectedObjects| does not retain/autorelease the