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

Unified Diff: chrome/browser/ui/cocoa/hover_image_button.mm

Issue 12937008: Move HoverButton and HoverImageButton from chrome/browser/ui/cocoa/ to ui/base/cocoa. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: '' Created 7 years, 9 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/cocoa/hover_image_button.mm
diff --git a/chrome/browser/ui/cocoa/hover_image_button.mm b/chrome/browser/ui/cocoa/hover_image_button.mm
deleted file mode 100644
index 95352d35436ea1637f2588714f18eb45e2059446..0000000000000000000000000000000000000000
--- a/chrome/browser/ui/cocoa/hover_image_button.mm
+++ /dev/null
@@ -1,52 +0,0 @@
-// Copyright (c) 2011 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.
-
-#import "chrome/browser/ui/cocoa/hover_image_button.h"
-
-#include "base/memory/scoped_nsobject.h"
-#include "grit/generated_resources.h"
-#include "ui/base/l10n/l10n_util.h"
-
-@implementation HoverImageButton
-
-- (void)drawRect:(NSRect)rect {
- if (hoverState_ == kHoverStateMouseDown && pressedImage_) {
- [super setImage:pressedImage_.get()];
- [super setAlphaValue:pressedOpacity_];
- } else if (hoverState_ == kHoverStateMouseOver && hoverImage_) {
- [super setImage:hoverImage_.get()];
- [super setAlphaValue:hoverOpacity_];
- } else {
- [super setImage:defaultImage_.get()];
- [super setAlphaValue:defaultOpacity_];
- }
-
- [super drawRect:rect];
-}
-
-- (void)setDefaultImage:(NSImage*)image {
- defaultImage_.reset([image retain]);
-}
-
-- (void)setDefaultOpacity:(float)opacity {
- defaultOpacity_ = opacity;
-}
-
-- (void)setHoverImage:(NSImage*)image {
- hoverImage_.reset([image retain]);
-}
-
-- (void)setHoverOpacity:(float)opacity {
- hoverOpacity_ = opacity;
-}
-
-- (void)setPressedImage:(NSImage*)image {
- pressedImage_.reset([image retain]);
-}
-
-- (void)setPressedOpacity:(float)opacity {
- pressedOpacity_ = opacity;
-}
-
-@end
« no previous file with comments | « chrome/browser/ui/cocoa/hover_image_button.h ('k') | chrome/browser/ui/cocoa/hover_image_button_unittest.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698