summaryrefslogtreecommitdiffstats
path: root/chrome/browser/cocoa/find_bar_cocoa_controller.mm
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser/cocoa/find_bar_cocoa_controller.mm')
-rw-r--r--chrome/browser/cocoa/find_bar_cocoa_controller.mm12
1 files changed, 12 insertions, 0 deletions
diff --git a/chrome/browser/cocoa/find_bar_cocoa_controller.mm b/chrome/browser/cocoa/find_bar_cocoa_controller.mm
index 569455f..a0eb5f3 100644
--- a/chrome/browser/cocoa/find_bar_cocoa_controller.mm
+++ b/chrome/browser/cocoa/find_bar_cocoa_controller.mm
@@ -147,6 +147,7 @@ const float kFindBarCloseDuration = 0.15;
textView:(NSTextView*)textView
doCommandBySelector:(SEL)command {
if (command == @selector(insertNewline:)) {
+ // Pressing Return
NSEvent* event = [NSApp currentEvent];
if ([event modifierFlags] & NSShiftKeyMask)
@@ -155,6 +156,13 @@ const float kFindBarCloseDuration = 0.15;
[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 @@ const float kFindBarCloseDuration = 0.15;
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