| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #import <Cocoa/Cocoa.h> | 5 #import <Cocoa/Cocoa.h> |
| 6 | 6 |
| 7 #include "base/auto_reset.h" | 7 #include "base/auto_reset.h" |
| 8 #include "base/mac/bundle_locations.h" | 8 #include "base/mac/bundle_locations.h" |
| 9 #include "base/strings/sys_string_conversions.h" | 9 #include "base/strings/sys_string_conversions.h" |
| 10 #include "chrome/browser/ui/browser_finder.h" | 10 #include "chrome/browser/ui/browser_finder.h" |
| (...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 260 | 260 |
| 261 return YES; | 261 return YES; |
| 262 } else if (command == @selector(insertLineBreak:)) { | 262 } else if (command == @selector(insertLineBreak:)) { |
| 263 // Pressing Ctrl-Return | 263 // Pressing Ctrl-Return |
| 264 if (findBarBridge_) { | 264 if (findBarBridge_) { |
| 265 findBarBridge_->GetFindBarController()->EndFindSession( | 265 findBarBridge_->GetFindBarController()->EndFindSession( |
| 266 FindBarController::kActivateSelectionOnPage, | 266 FindBarController::kActivateSelectionOnPage, |
| 267 FindBarController::kClearResultsInFindBox); | 267 FindBarController::kClearResultsInFindBox); |
| 268 } | 268 } |
| 269 return YES; | 269 return YES; |
| 270 } else if (command == @selector(cancelOperation:)) { |
| 271 // Pressing ESC. |
| 272 [closeButton_ performClick:nil]; |
| 273 return YES; |
| 270 } else if (command == @selector(pageUp:) || | 274 } else if (command == @selector(pageUp:) || |
| 271 command == @selector(pageUpAndModifySelection:) || | 275 command == @selector(pageUpAndModifySelection:) || |
| 272 command == @selector(scrollPageUp:) || | 276 command == @selector(scrollPageUp:) || |
| 273 command == @selector(pageDown:) || | 277 command == @selector(pageDown:) || |
| 274 command == @selector(pageDownAndModifySelection:) || | 278 command == @selector(pageDownAndModifySelection:) || |
| 275 command == @selector(scrollPageDown:) || | 279 command == @selector(scrollPageDown:) || |
| 276 command == @selector(scrollToBeginningOfDocument:) || | 280 command == @selector(scrollToBeginningOfDocument:) || |
| 277 command == @selector(scrollToEndOfDocument:) || | 281 command == @selector(scrollToEndOfDocument:) || |
| 278 command == @selector(moveUp:) || | 282 command == @selector(moveUp:) || |
| 279 command == @selector(moveDown:)) { | 283 command == @selector(moveDown:)) { |
| (...skipping 372 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 652 } | 656 } |
| 653 | 657 |
| 654 - (BrowserWindowController*)browserWindowController { | 658 - (BrowserWindowController*)browserWindowController { |
| 655 if (!browser_) | 659 if (!browser_) |
| 656 return nil; | 660 return nil; |
| 657 return [BrowserWindowController | 661 return [BrowserWindowController |
| 658 browserWindowControllerForWindow:browser_->window()->GetNativeWindow()]; | 662 browserWindowControllerForWindow:browser_->window()->GetNativeWindow()]; |
| 659 } | 663 } |
| 660 | 664 |
| 661 @end | 665 @end |
| OLD | NEW |