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

Unified Diff: chrome/browser/ui/cocoa/find_bar/find_bar_cocoa_controller.mm

Issue 6676094: Fix for "Mouseovers follow the cursor even when there's a find bar in the way" (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: '' Created 9 years, 9 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 side-by-side diff with in-line comments
Download patch
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];

Powered by Google App Engine
This is Rietveld 408576698