summaryrefslogtreecommitdiffstats
path: root/chrome/browser/cocoa
diff options
context:
space:
mode:
authorshess@chromium.org <shess@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-06-09 17:48:30 +0000
committershess@chromium.org <shess@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-06-09 17:48:30 +0000
commit08d385de52a5a298266e4073a4e33a1f184c9b02 (patch)
treed05b80e3119f1a9dba963beb261d94f30c765e8c /chrome/browser/cocoa
parente4ef3ba2250a995ec54cf21252b3c398bba334af (diff)
downloadchromium_src-08d385de52a5a298266e4073a4e33a1f184c9b02.zip
chromium_src-08d385de52a5a298266e4073a4e33a1f184c9b02.tar.gz
chromium_src-08d385de52a5a298266e4073a4e33a1f184c9b02.tar.bz2
[Mac] Remove dead underlayImage_ from GradientButtonCell.
AFAICT was being used by the star button, which is now a page action. BUG=none TEST=none Review URL: http://codereview.chromium.org/2675003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@49282 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/cocoa')
-rw-r--r--chrome/browser/cocoa/gradient_button_cell.h7
-rw-r--r--chrome/browser/cocoa/gradient_button_cell.mm31
2 files changed, 2 insertions, 36 deletions
diff --git a/chrome/browser/cocoa/gradient_button_cell.h b/chrome/browser/cocoa/gradient_button_cell.h
index fc79c09..a485f63 100644
--- a/chrome/browser/cocoa/gradient_button_cell.h
+++ b/chrome/browser/cocoa/gradient_button_cell.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2009 The Chromium Authors. All rights reserved.
+// Copyright (c) 2010 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -37,7 +37,6 @@ typedef NSInteger ButtonType;
CGFloat hoverAlpha_; // 0-1. Controls the alpha during mouse hover
NSTimeInterval lastHoverUpdate_;
scoped_nsobject<NSGradient> gradient_;
- scoped_nsobject<NSImage> underlayImage_;
}
// Turn off theming. Temporary work-around.
@@ -53,10 +52,6 @@ typedef NSInteger ButtonType;
cellFrame:(NSRect)cellFrame
defaultGradient:(NSGradient*)defaultGradient;
-// An image to underlay beneath the existing image; not themed. May be nil.
-- (NSImage*)underlayImage;
-- (void)setUnderlayImage:(NSImage*)image;
-
// Let the view know when the mouse moves in and out. A timer will update
// the current hoverAlpha_ based on these events.
- (void)setMouseInside:(BOOL)flag animate:(BOOL)animate;
diff --git a/chrome/browser/cocoa/gradient_button_cell.mm b/chrome/browser/cocoa/gradient_button_cell.mm
index ac71474..15110e8 100644
--- a/chrome/browser/cocoa/gradient_button_cell.mm
+++ b/chrome/browser/cocoa/gradient_button_cell.mm
@@ -1,4 +1,4 @@
-// Copyright (c) 2009 The Chromium Authors. All rights reserved.
+// Copyright (c) 2010 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -14,8 +14,6 @@
@interface GradientButtonCell (Private)
- (void)sharedInit;
-- (void)drawUnderlayImageWithFrame:(NSRect)cellFrame
- inView:(NSView*)controlView;
// Get drawing parameters for a given cell frame in a given view. The inner
// frame is the one required by |-drawInteriorWithFrame:inView:|. The inner and
@@ -122,16 +120,6 @@ static const NSTimeInterval kAnimationHideDuration = 0.4;
shouldTheme_ = shouldTheme;
}
-- (NSImage*)underlayImage {
- return underlayImage_;
-}
-
-- (void)setUnderlayImage:(NSImage*)image {
- underlayImage_.reset([image retain]);
-
- [[self controlView] setNeedsDisplay:YES];
-}
-
- (NSBackgroundStyle)interiorBackgroundStyle {
// Never lower the interior, since that just leads to a weird shadow which can
// often interact badly with the theme.
@@ -410,8 +398,6 @@ static const NSTimeInterval kAnimationHideDuration = 0.4;
[shadow set];
}
- [self drawUnderlayImageWithFrame:cellFrame inView:controlView];
-
CGContextBeginTransparencyLayer(context, 0);
NSRect imageRect = NSZeroRect;
imageRect.size = [[self image] size];
@@ -431,8 +417,6 @@ static const NSTimeInterval kAnimationHideDuration = 0.4;
CGContextEndTransparencyLayer(context);
[NSGraphicsContext restoreGraphicsState];
} else {
- [self drawUnderlayImageWithFrame:cellFrame inView:controlView];
-
// NSCell draws these uncentered for some reason, probably because of the
// of control in the xib
[super drawInteriorWithFrame:NSOffsetRect(cellFrame, 0, 1)
@@ -440,19 +424,6 @@ static const NSTimeInterval kAnimationHideDuration = 0.4;
}
}
-- (void)drawUnderlayImageWithFrame:(NSRect)cellFrame
- inView:(NSView*)controlView {
- if (underlayImage_) {
- NSRect imageRect = NSZeroRect;
- imageRect.size = [underlayImage_ size];
- [underlayImage_ setFlipped:[controlView isFlipped]];
- [underlayImage_ drawInRect:[self imageRectForBounds:cellFrame]
- fromRect:imageRect
- operation:NSCompositeSourceOver
- fraction:[self isEnabled] ? 1.0 : 0.5];
- }
-}
-
- (NSBezierPath*)clipPathForFrame:(NSRect)cellFrame
inView:(NSView*)controlView {
NSBezierPath* boundingPath = nil;