| 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 "chrome/browser/ui/cocoa/tabs/tab_controller.h" | 5 #import "chrome/browser/ui/cocoa/tabs/tab_controller.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <cmath> | 8 #include <cmath> |
| 9 | 9 |
| 10 #include "base/i18n/rtl.h" | 10 #include "base/i18n/rtl.h" |
| (...skipping 472 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 483 return [[self target] performSelector:@selector(inRapidClosureMode)] ? | 483 return [[self target] performSelector:@selector(inRapidClosureMode)] ? |
| 484 YES : NO; | 484 YES : NO; |
| 485 } | 485 } |
| 486 return NO; | 486 return NO; |
| 487 } | 487 } |
| 488 | 488 |
| 489 - (void)maybeStartDrag:(NSEvent*)event forTab:(TabController*)tab { | 489 - (void)maybeStartDrag:(NSEvent*)event forTab:(TabController*)tab { |
| 490 [[target_ dragController] maybeStartDrag:event forTab:tab]; | 490 [[target_ dragController] maybeStartDrag:event forTab:tab]; |
| 491 } | 491 } |
| 492 | 492 |
| 493 - (void)keyUp:(NSEvent*)event { |
| 494 unichar keyChar = [[event characters] characterAtIndex:0]; |
| 495 if (keyChar == '\r' || keyChar == '\n') |
| 496 [self selectTab:self]; |
| 497 } |
| 498 |
| 493 @end | 499 @end |
| OLD | NEW |