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

Side by Side Diff: chrome/browser/cocoa/base_view.mm

Issue 337016: Mac: Make status bubbles pop properly when mouse leaves content area. (Closed)
Patch Set: Created 11 years, 2 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
« no previous file with comments | « no previous file | 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) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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 #include "chrome/browser/cocoa/base_view.h" 5 #include "chrome/browser/cocoa/base_view.h"
6 6
7 @implementation BaseView 7 @implementation BaseView
8 8
9 - (id)initWithFrame:(NSRect)frame { 9 - (id)initWithFrame:(NSRect)frame {
10 self = [super initWithFrame:frame]; 10 self = [super initWithFrame:frame];
11 if (self) { 11 if (self) {
12 trackingArea_ = 12 trackingArea_ =
13 [[NSTrackingArea alloc] initWithRect:frame 13 [[NSTrackingArea alloc] initWithRect:frame
14 options:NSTrackingMouseMoved | 14 options:NSTrackingMouseEnteredAndExited |
15 NSTrackingMouseMoved |
15 NSTrackingActiveInActiveApp | 16 NSTrackingActiveInActiveApp |
16 NSTrackingInVisibleRect 17 NSTrackingInVisibleRect
17 owner:self 18 owner:self
18 userInfo:nil]; 19 userInfo:nil];
19 [self addTrackingArea:trackingArea_]; 20 [self addTrackingArea:trackingArea_];
20 } 21 }
21 return self; 22 return self;
22 } 23 }
23 24
24 - (void)dealloc { 25 - (void)dealloc {
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 } 104 }
104 105
105 - (NSRect)RectToNSRect:(gfx::Rect)rect { 106 - (NSRect)RectToNSRect:(gfx::Rect)rect {
106 NSRect new_rect(NSRectFromCGRect(rect.ToCGRect())); 107 NSRect new_rect(NSRectFromCGRect(rect.ToCGRect()));
107 new_rect.origin.y = 108 new_rect.origin.y =
108 [self bounds].size.height - new_rect.origin.y - new_rect.size.height; 109 [self bounds].size.height - new_rect.origin.y - new_rect.size.height;
109 return new_rect; 110 return new_rect;
110 } 111 }
111 112
112 @end 113 @end
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698