| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/tabpose_window.h" | 5 #import "chrome/browser/ui/cocoa/tabpose_window.h" |
| 6 | 6 |
| 7 #import <QuartzCore/QuartzCore.h> | 7 #import <QuartzCore/QuartzCore.h> |
| 8 | 8 |
| 9 #include <algorithm> | 9 #include <algorithm> |
| 10 | 10 |
| (...skipping 1178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1189 // there's a one frame flash of grey at the beginning of the animation | 1189 // there's a one frame flash of grey at the beginning of the animation |
| 1190 // (|bgLayer_| showing through with none of its children visible yet). | 1190 // (|bgLayer_| showing through with none of its children visible yet). |
| 1191 [[self contentView] setLayer:rootLayer_]; | 1191 [[self contentView] setLayer:rootLayer_]; |
| 1192 [[self contentView] setWantsLayer:YES]; | 1192 [[self contentView] setWantsLayer:YES]; |
| 1193 } | 1193 } |
| 1194 | 1194 |
| 1195 - (BOOL)canBecomeKeyWindow { | 1195 - (BOOL)canBecomeKeyWindow { |
| 1196 return YES; | 1196 return YES; |
| 1197 } | 1197 } |
| 1198 | 1198 |
| 1199 // Lets the traffic light buttons on the browser window keep their "active" |
| 1200 // state while an info bubble is open. Only has an effect on 10.7. |
| 1201 - (BOOL)_sharesParentKeyState { |
| 1202 return YES; |
| 1203 } |
| 1204 |
| 1199 // Handle key events that should be executed repeatedly while the key is down. | 1205 // Handle key events that should be executed repeatedly while the key is down. |
| 1200 - (void)keyDown:(NSEvent*)event { | 1206 - (void)keyDown:(NSEvent*)event { |
| 1201 if (state_ == tabpose::kFadingOut) | 1207 if (state_ == tabpose::kFadingOut) |
| 1202 return; | 1208 return; |
| 1203 NSString* characters = [event characters]; | 1209 NSString* characters = [event characters]; |
| 1204 if ([characters length] < 1) | 1210 if ([characters length] < 1) |
| 1205 return; | 1211 return; |
| 1206 | 1212 |
| 1207 unichar character = [characters characterAtIndex:0]; | 1213 unichar character = [characters characterAtIndex:0]; |
| 1208 int newIndex = -1; | 1214 int newIndex = -1; |
| (...skipping 464 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1673 tile.set_tab_contents(contents); | 1679 tile.set_tab_contents(contents); |
| 1674 ThumbnailLayer* thumbLayer = [allThumbnailLayers_ objectAtIndex:index]; | 1680 ThumbnailLayer* thumbLayer = [allThumbnailLayers_ objectAtIndex:index]; |
| 1675 [thumbLayer setTabContents:contents]; | 1681 [thumbLayer setTabContents:contents]; |
| 1676 } | 1682 } |
| 1677 | 1683 |
| 1678 - (void)tabStripModelDeleted { | 1684 - (void)tabStripModelDeleted { |
| 1679 [self close]; | 1685 [self close]; |
| 1680 } | 1686 } |
| 1681 | 1687 |
| 1682 @end | 1688 @end |
| OLD | NEW |