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

Side by Side Diff: ui/base/cocoa/hover_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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ui/base/cocoa/hover_button.h ('k') | ui/base/cocoa/hover_image_button.h » ('j') | 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 #import "chrome/browser/ui/cocoa/hover_button.h" 5 #import "ui/base/cocoa/hover_button.h"
6 6
7 @implementation HoverButton 7 @implementation HoverButton
8 8
9 @synthesize hoverState = hoverState_; 9 @synthesize hoverState = hoverState_;
10 10
11 - (id)initWithFrame:(NSRect)frameRect { 11 - (id)initWithFrame:(NSRect)frameRect {
12 if ((self = [super initWithFrame:frameRect])) { 12 if ((self = [super initWithFrame:frameRect])) {
13 [self setTrackingEnabled:YES]; 13 [self setTrackingEnabled:YES];
14 hoverState_ = kHoverStateNone; 14 hoverState_ = kHoverStateNone;
15 [self updateTrackingAreas]; 15 [self updateTrackingAreas];
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 self.hoverState = NSPointInRect(mouseLoc, [self bounds]) ? 97 self.hoverState = NSPointInRect(mouseLoc, [self bounds]) ?
98 kHoverStateMouseOver : kHoverStateNone; 98 kHoverStateMouseOver : kHoverStateNone;
99 } 99 }
100 100
101 - (void)setHoverState:(HoverState)state { 101 - (void)setHoverState:(HoverState)state {
102 hoverState_ = state; 102 hoverState_ = state;
103 [self setNeedsDisplay:YES]; 103 [self setNeedsDisplay:YES];
104 } 104 }
105 105
106 @end 106 @end
OLDNEW
« no previous file with comments | « ui/base/cocoa/hover_button.h ('k') | ui/base/cocoa/hover_image_button.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698