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

Side by Side Diff: chrome/browser/ui/cocoa/hover_button.mm

Issue 12763002: Move CrTrackingArea from chrome/browser/ui/cocoa to ui/base/cocoa. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: test in namespace 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
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 "chrome/browser/ui/cocoa/hover_button.h"
6 6
7 #import "chrome/browser/ui/cocoa/tracking_area.h"
8
9 @implementation HoverButton 7 @implementation HoverButton
10 8
11 @synthesize hoverState = hoverState_; 9 @synthesize hoverState = hoverState_;
12 10
13 - (id)initWithFrame:(NSRect)frameRect { 11 - (id)initWithFrame:(NSRect)frameRect {
14 if ((self = [super initWithFrame:frameRect])) { 12 if ((self = [super initWithFrame:frameRect])) {
15 [self setTrackingEnabled:YES]; 13 [self setTrackingEnabled:YES];
16 hoverState_ = kHoverStateNone; 14 hoverState_ = kHoverStateNone;
17 [self updateTrackingAreas]; 15 [self updateTrackingAreas];
18 } 16 }
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 self.hoverState = NSPointInRect(mouseLoc, [self bounds]) ? 97 self.hoverState = NSPointInRect(mouseLoc, [self bounds]) ?
100 kHoverStateMouseOver : kHoverStateNone; 98 kHoverStateMouseOver : kHoverStateNone;
101 } 99 }
102 100
103 - (void)setHoverState:(HoverState)state { 101 - (void)setHoverState:(HoverState)state {
104 hoverState_ = state; 102 hoverState_ = state;
105 [self setNeedsDisplay:YES]; 103 [self setNeedsDisplay:YES];
106 } 104 }
107 105
108 @end 106 @end
OLDNEW
« no previous file with comments | « chrome/browser/ui/cocoa/hover_button.h ('k') | chrome/browser/ui/cocoa/location_bar/action_box_menu_bubble_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698