Index: chrome/browser/cocoa/find_bar_cocoa_controller.mm |
=================================================================== |
--- chrome/browser/cocoa/find_bar_cocoa_controller.mm (revision 42265) |
+++ chrome/browser/cocoa/find_bar_cocoa_controller.mm (working copy) |
@@ -147,6 +147,7 @@ |
textView:(NSTextView*)textView |
doCommandBySelector:(SEL)command { |
if (command == @selector(insertNewline:)) { |
+ // Pressing Return |
NSEvent* event = [NSApp currentEvent]; |
if ([event modifierFlags] & NSShiftKeyMask) |
@@ -155,6 +156,13 @@ |
[nextButton_ performClick:nil]; |
return YES; |
+ } else if (command == @selector(insertLineBreak:)) { |
+ // Pressing Ctrl-Return |
+ if (findBarBridge_) { |
+ findBarBridge_->GetFindBarController()->EndFindSession( |
+ FindBarController::kActivateSelection); |
+ } |
+ return YES; |
} else if (command == @selector(pageUp:) || |
command == @selector(pageUpAndModifySelection:) || |
command == @selector(scrollPageUp:) || |
@@ -291,6 +299,10 @@ |
return NSIntersectsRect([[self view] bounds], [findBarView_ frame]); |
} |
+- (BOOL)isFindBarAnimating { |
+ return (currentAnimation_.get() != nil); |
+} |
+ |
// NSAnimation delegate methods. |
- (void)animationDidEnd:(NSAnimation*)animation { |
// Autorelease the animation (cannot use release because the animation object |