| Index: chrome/browser/ui/cocoa/find_bar/find_bar_cocoa_controller.mm
|
| ===================================================================
|
| --- chrome/browser/ui/cocoa/find_bar/find_bar_cocoa_controller.mm (revision 79160)
|
| +++ chrome/browser/ui/cocoa/find_bar/find_bar_cocoa_controller.mm (working copy)
|
| @@ -1,4 +1,4 @@
|
| -// Copyright (c) 2009 The Chromium Authors. All rights reserved.
|
| +// Copyright (c) 2011 The Chromium Authors. All rights reserved.
|
| // Use of this source code is governed by a BSD-style license that can be
|
| // found in the LICENSE file.
|
|
|
| @@ -50,6 +50,9 @@
|
| // current find result.
|
| - (void)moveFindBarIfNecessary:(BOOL)animate;
|
|
|
| +// Sets the hidden status of the FindBarView and its superview.
|
| +- (void)setFindBarViewHidden:(BOOL)hidden;
|
| +
|
| // Optionally stops the current search, puts |text| into the find bar, and
|
| // enables the buttons, but doesn't start a new search for |text|.
|
| - (void)prepopulateText:(NSString*)text stopSearch:(BOOL)stopSearch;
|
| @@ -378,7 +381,7 @@
|
|
|
| // If the find bar is not visible, make it actually hidden, so it'll no longer
|
| // respond to key events.
|
| - [findBarView_ setHidden:![self isFindBarVisible]];
|
| + [self setFindBarViewHidden:![self isFindBarVisible]];
|
| }
|
|
|
| - (gfx::Point)findBarWindowPosition {
|
| @@ -429,14 +432,14 @@
|
|
|
| if (!animate) {
|
| [findBarView_ setFrame:endFrame];
|
| - [findBarView_ setHidden:![self isFindBarVisible]];
|
| + [self setFindBarViewHidden:![self isFindBarVisible]];
|
| showHideAnimation_.reset(nil);
|
| return;
|
| }
|
|
|
| // If animating, ensure that the find bar is not hidden. Hidden status will be
|
| // updated at the end of the animation.
|
| - [findBarView_ setHidden:NO];
|
| + [self setFindBarViewHidden:NO];
|
|
|
| // Reset the frame to what was saved above.
|
| [findBarView_ setFrame:startFrame];
|
| @@ -509,6 +512,13 @@
|
| }
|
| }
|
|
|
| +- (void)setFindBarViewHidden:(BOOL)hidden {
|
| + // Set the hidden status of both the findBarView_ and the NSView
|
| + // of this controller (superview of findBarView_).
|
| + [findBarView_ setHidden:hidden];
|
| + [[self view] setHidden:hidden];
|
| +}
|
| +
|
| - (void)prepopulateText:(NSString*)text stopSearch:(BOOL)stopSearch{
|
| [self setFindText:text];
|
|
|
|
|