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

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

Issue 6969058: Fix hover state in wrench menu (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed review comments Created 9 years, 7 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 | « chrome/browser/ui/cocoa/nsview_additions.h ('k') | no next file » | 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/nsview_additions.h" 5 #import "chrome/browser/ui/cocoa/nsview_additions.h"
6 6
7 @implementation NSView (ChromeAdditions) 7 @implementation NSView (ChromeAdditions)
8 8
9 - (CGFloat)cr_lineWidth { 9 - (CGFloat)cr_lineWidth {
10 return 1.0 / [self convertSizeToBase:NSMakeSize(1, 1)].width; 10 return 1.0 / [self convertSizeToBase:NSMakeSize(1, 1)].width;
11 } 11 }
12 12
13 - (BOOL)cr_isMouseInView {
14 NSPoint mouseLoc = [[self window] mouseLocationOutsideOfEventStream];
15 mouseLoc = [[self superview] convertPoint:mouseLoc fromView:nil];
16 return [self hitTest:mouseLoc] == self;
17 }
18
13 @end 19 @end
OLDNEW
« no previous file with comments | « chrome/browser/ui/cocoa/nsview_additions.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698