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

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

Issue 367001: Back out r30033 which broke drag scrolling in web pages until we have a bette... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 11 years, 1 month 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 | « 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:NSTrackingMouseEnteredAndExited | 14 options:NSTrackingMouseMoved |
15 NSTrackingMouseMoved |
16 NSTrackingActiveInActiveApp | 15 NSTrackingActiveInActiveApp |
17 NSTrackingInVisibleRect 16 NSTrackingInVisibleRect
18 owner:self 17 owner:self
19 userInfo:nil]; 18 userInfo:nil];
20 [self addTrackingArea:trackingArea_]; 19 [self addTrackingArea:trackingArea_];
21 } 20 }
22 return self; 21 return self;
23 } 22 }
24 23
25 - (void)dealloc { 24 - (void)dealloc {
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 } 103 }
105 104
106 - (NSRect)RectToNSRect:(gfx::Rect)rect { 105 - (NSRect)RectToNSRect:(gfx::Rect)rect {
107 NSRect new_rect(NSRectFromCGRect(rect.ToCGRect())); 106 NSRect new_rect(NSRectFromCGRect(rect.ToCGRect()));
108 new_rect.origin.y = 107 new_rect.origin.y =
109 [self bounds].size.height - new_rect.origin.y - new_rect.size.height; 108 [self bounds].size.height - new_rect.origin.y - new_rect.size.height;
110 return new_rect; 109 return new_rect;
111 } 110 }
112 111
113 @end 112 @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