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

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

Issue 10807052: mac: Remove code that was only needed on 10.5 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: kill workspaceIDCache_ Created 8 years, 5 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
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" 7 #import "chrome/browser/ui/cocoa/tracking_area.h"
8 8
9 @implementation HoverButton 9 @implementation HoverButton
10 10
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 // http://crbug.com/31279 54 // http://crbug.com/31279
55 [self checkImageState]; 55 [self checkImageState];
56 } 56 }
57 57
58 - (void)setTrackingEnabled:(BOOL)enabled { 58 - (void)setTrackingEnabled:(BOOL)enabled {
59 if (enabled) { 59 if (enabled) {
60 trackingArea_.reset( 60 trackingArea_.reset(
61 [[CrTrackingArea alloc] initWithRect:[self bounds] 61 [[CrTrackingArea alloc] initWithRect:[self bounds]
62 options:NSTrackingMouseEnteredAndExited | 62 options:NSTrackingMouseEnteredAndExited |
63 NSTrackingActiveAlways 63 NSTrackingActiveAlways
64 proxiedOwner:self 64 owner:self
65 userInfo:nil]); 65 userInfo:nil]);
66 [self addTrackingArea:trackingArea_.get()]; 66 [self addTrackingArea:trackingArea_.get()];
67 67
68 // If you have a separate window that overlaps the close button, and you 68 // If you have a separate window that overlaps the close button, and you
69 // move the mouse directly over the close button without entering another 69 // move the mouse directly over the close button without entering another
70 // part of the tab strip, we don't get any mouseEntered event since the 70 // part of the tab strip, we don't get any mouseEntered event since the
71 // tracking area was disabled when we entered. 71 // tracking area was disabled when we entered.
72 // Done with a delay of 0 because sometimes an event appears to be missed 72 // Done with a delay of 0 because sometimes an event appears to be missed
73 // between the activation of the tracking area and the call to 73 // between the activation of the tracking area and the call to
74 // checkImageState resulting in the button state being incorrect. 74 // checkImageState resulting in the button state being incorrect.
(...skipping 23 matching lines...) Expand all
98 self.hoverState = NSPointInRect(mouseLoc, [self bounds]) ? 98 self.hoverState = NSPointInRect(mouseLoc, [self bounds]) ?
99 kHoverStateMouseOver : kHoverStateNone; 99 kHoverStateMouseOver : kHoverStateNone;
100 } 100 }
101 101
102 - (void)setHoverState:(HoverState)state { 102 - (void)setHoverState:(HoverState)state {
103 hoverState_ = state; 103 hoverState_ = state;
104 [self setNeedsDisplay:YES]; 104 [self setNeedsDisplay:YES];
105 } 105 }
106 106
107 @end 107 @end
OLDNEW
« no previous file with comments | « chrome/browser/ui/cocoa/browser/avatar_menu_bubble_controller.mm ('k') | chrome/browser/ui/cocoa/tabs/tab_strip_controller.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698