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 - (BOOL)_sharesParentKeyState { | |
Robert Sesek
2011/08/05 19:19:43
ditto
| |
1200 return YES; | |
1201 } | |
1202 | |
1199 // Handle key events that should be executed repeatedly while the key is down. | 1203 // Handle key events that should be executed repeatedly while the key is down. |
1200 - (void)keyDown:(NSEvent*)event { | 1204 - (void)keyDown:(NSEvent*)event { |
1201 if (state_ == tabpose::kFadingOut) | 1205 if (state_ == tabpose::kFadingOut) |
1202 return; | 1206 return; |
1203 NSString* characters = [event characters]; | 1207 NSString* characters = [event characters]; |
1204 if ([characters length] < 1) | 1208 if ([characters length] < 1) |
1205 return; | 1209 return; |
1206 | 1210 |
1207 unichar character = [characters characterAtIndex:0]; | 1211 unichar character = [characters characterAtIndex:0]; |
1208 int newIndex = -1; | 1212 int newIndex = -1; |
(...skipping 464 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1673 tile.set_tab_contents(contents); | 1677 tile.set_tab_contents(contents); |
1674 ThumbnailLayer* thumbLayer = [allThumbnailLayers_ objectAtIndex:index]; | 1678 ThumbnailLayer* thumbLayer = [allThumbnailLayers_ objectAtIndex:index]; |
1675 [thumbLayer setTabContents:contents]; | 1679 [thumbLayer setTabContents:contents]; |
1676 } | 1680 } |
1677 | 1681 |
1678 - (void)tabStripModelDeleted { | 1682 - (void)tabStripModelDeleted { |
1679 [self close]; | 1683 [self close]; |
1680 } | 1684 } |
1681 | 1685 |
1682 @end | 1686 @end |
OLD | NEW |