OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 #include <Carbon/Carbon.h> | 5 #include <Carbon/Carbon.h> |
6 | 6 |
7 #include "base/mac_util.h" | 7 #include "base/mac_util.h" |
8 #include "base/scoped_nsdisable_screen_updates.h" | 8 #include "base/scoped_nsdisable_screen_updates.h" |
9 #import "base/scoped_nsobject.h" | 9 #import "base/scoped_nsobject.h" |
10 #include "base/sys_string_conversions.h" | 10 #include "base/sys_string_conversions.h" |
(...skipping 1068 matching lines...) Loading... |
1079 NSRect incognitoFrame = tabFrame; | 1079 NSRect incognitoFrame = tabFrame; |
1080 incognitoFrame.origin.x = NSMaxX(incognitoFrame) - imageSize.width - | 1080 incognitoFrame.origin.x = NSMaxX(incognitoFrame) - imageSize.width - |
1081 kOffset; | 1081 kOffset; |
1082 incognitoFrame.size = imageSize; | 1082 incognitoFrame.size = imageSize; |
1083 scoped_nsobject<NSImageView> incognitoView( | 1083 scoped_nsobject<NSImageView> incognitoView( |
1084 [[NSImageView alloc] initWithFrame:incognitoFrame]); | 1084 [[NSImageView alloc] initWithFrame:incognitoFrame]); |
1085 [incognitoView setImage:incognitoImage.get()]; | 1085 [incognitoView setImage:incognitoImage.get()]; |
1086 [incognitoView setWantsLayer:YES]; | 1086 [incognitoView setWantsLayer:YES]; |
1087 [incognitoView setAutoresizingMask:NSViewMinXMargin | NSViewMinYMargin]; | 1087 [incognitoView setAutoresizingMask:NSViewMinXMargin | NSViewMinYMargin]; |
1088 scoped_nsobject<NSShadow> shadow([[NSShadow alloc] init]); | 1088 scoped_nsobject<NSShadow> shadow([[NSShadow alloc] init]); |
1089 [shadow setShadowColor:[NSColor colorWithCalibratedWhite:0.0 alpha:0.5]]; | 1089 [shadow.get() setShadowColor:[NSColor colorWithCalibratedWhite:0.0 |
1090 [shadow setShadowOffset:NSMakeSize(0, -1)]; | 1090 alpha:0.5]]; |
| 1091 [shadow.get() setShadowOffset:NSMakeSize(0, -1)]; |
1091 [shadow setShadowBlurRadius:2.0]; | 1092 [shadow setShadowBlurRadius:2.0]; |
1092 [incognitoView setShadow:shadow]; | 1093 [incognitoView setShadow:shadow]; |
1093 | 1094 |
1094 // Shrink the tab strip's width so there's no overlap and install the | 1095 // Shrink the tab strip's width so there's no overlap and install the |
1095 // view. | 1096 // view. |
1096 tabFrame.size.width -= incognitoFrame.size.width + kOffset; | 1097 tabFrame.size.width -= incognitoFrame.size.width + kOffset; |
1097 [[self tabStripView] setFrame:tabFrame]; | 1098 [[self tabStripView] setFrame:tabFrame]; |
1098 [[[[self window] contentView] superview] addSubview:incognitoView.get()]; | 1099 [[[[self window] contentView] superview] addSubview:incognitoView.get()]; |
1099 } | 1100 } |
1100 | 1101 |
(...skipping 291 matching lines...) Loading... |
1392 provider->GetNSColor(BrowserThemeProvider::COLOR_TOOLBAR); | 1393 provider->GetNSColor(BrowserThemeProvider::COLOR_TOOLBAR); |
1393 [theme setValue:toolbarBackgroundColor | 1394 [theme setValue:toolbarBackgroundColor |
1394 forAttribute:@"backgroundColor" | 1395 forAttribute:@"backgroundColor" |
1395 style:GTMThemeStyleToolBar | 1396 style:GTMThemeStyleToolBar |
1396 state:GTMThemeStateActiveWindow]; | 1397 state:GTMThemeStateActiveWindow]; |
1397 | 1398 |
1398 return theme; | 1399 return theme; |
1399 } | 1400 } |
1400 @end | 1401 @end |
1401 | 1402 |
OLD | NEW |