Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(168)

Side by Side Diff: chrome/browser/cocoa/gradient_button_cell.mm

Issue 3162008: 10.6 SDK compatibility fix for GradientButtonCell following r55906 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 10 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 "chrome/browser/cocoa/gradient_button_cell.h" 5 #include "chrome/browser/cocoa/gradient_button_cell.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #import "base/scoped_nsobject.h" 8 #import "base/scoped_nsobject.h"
9 #import "chrome/browser/browser_theme_provider.h" 9 #import "chrome/browser/browser_theme_provider.h"
10 #import "chrome/browser/cocoa/image_utils.h" 10 #import "chrome/browser/cocoa/image_utils.h"
(...skipping 561 matching lines...) Expand 10 before | Expand all | Expand 10 after
572 572
573 BrowserThemeProvider* themeProvider = static_cast<BrowserThemeProvider*>( 573 BrowserThemeProvider* themeProvider = static_cast<BrowserThemeProvider*>(
574 [[controlView window] themeProvider]); 574 [[controlView window] themeProvider]);
575 NSColor* color = themeProvider ? 575 NSColor* color = themeProvider ?
576 themeProvider->GetNSColorTint(BrowserThemeProvider::TINT_BUTTONS, 576 themeProvider->GetNSColorTint(BrowserThemeProvider::TINT_BUTTONS,
577 true) : 577 true) :
578 [NSColor blackColor]; 578 [NSColor blackColor];
579 579
580 if (isTemplate && themeProvider && themeProvider->UsingDefaultTheme()) { 580 if (isTemplate && themeProvider && themeProvider->UsingDefaultTheme()) {
581 scoped_nsobject<NSShadow> shadow([[NSShadow alloc] init]); 581 scoped_nsobject<NSShadow> shadow([[NSShadow alloc] init]);
582 [shadow setShadowColor:themeProvider->GetNSColor( 582 [shadow.get() setShadowColor:themeProvider->GetNSColor(
583 BrowserThemeProvider::COLOR_TOOLBAR_BEZEL, true)]; 583 BrowserThemeProvider::COLOR_TOOLBAR_BEZEL, true)];
584 [shadow setShadowOffset:NSMakeSize(0.0, -1.0)]; 584 [shadow.get() setShadowOffset:NSMakeSize(0.0, -1.0)];
585 [shadow setShadowBlurRadius:1.0]; 585 [shadow setShadowBlurRadius:1.0];
586 [shadow set]; 586 [shadow set];
587 } 587 }
588 588
589 CGContextBeginTransparencyLayer(context, 0); 589 CGContextBeginTransparencyLayer(context, 0);
590 NSRect imageRect = NSZeroRect; 590 NSRect imageRect = NSZeroRect;
591 imageRect.size = [[self image] size]; 591 imageRect.size = [[self image] size];
592 NSRect drawRect = [self imageRectForBounds:cellFrame]; 592 NSRect drawRect = [self imageRectForBounds:cellFrame];
593 [[self image] drawInRect:drawRect 593 [[self image] drawInRect:drawRect
594 fromRect:imageRect 594 fromRect:imageRect
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
699 NSBezierPath* boundingPath = nil; 699 NSBezierPath* boundingPath = nil;
700 [self getDrawParamsForFrame:cellFrame 700 [self getDrawParamsForFrame:cellFrame
701 inView:controlView 701 inView:controlView
702 innerFrame:NULL 702 innerFrame:NULL
703 innerPath:NULL 703 innerPath:NULL
704 clipPath:&boundingPath]; 704 clipPath:&boundingPath];
705 return boundingPath; 705 return boundingPath;
706 } 706 }
707 707
708 @end 708 @end
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698