| OLD | NEW |
| 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 NSString* kViewDidBecomeFirstResponder = |
| 8 @"Chromium.kViewDidBecomeFirstResponder"; |
| 9 NSString* kSelectionDirection = @"Chromium.kSelectionDirection"; |
| 10 |
| 7 @implementation BaseView | 11 @implementation BaseView |
| 8 | 12 |
| 9 - (id)initWithFrame:(NSRect)frame { | 13 - (id)initWithFrame:(NSRect)frame { |
| 10 self = [super initWithFrame:frame]; | 14 self = [super initWithFrame:frame]; |
| 11 if (self) { | 15 if (self) { |
| 12 trackingArea_ = | 16 trackingArea_ = |
| 13 [[NSTrackingArea alloc] initWithRect:frame | 17 [[NSTrackingArea alloc] initWithRect:frame |
| 14 options:NSTrackingMouseMoved | | 18 options:NSTrackingMouseMoved | |
| 15 NSTrackingMouseEnteredAndExited | | 19 NSTrackingMouseEnteredAndExited | |
| 16 NSTrackingActiveInActiveApp | | 20 NSTrackingActiveInActiveApp | |
| (...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 134 } | 138 } |
| 135 | 139 |
| 136 - (NSRect)flipRectToNSRect:(gfx::Rect)rect { | 140 - (NSRect)flipRectToNSRect:(gfx::Rect)rect { |
| 137 NSRect new_rect(NSRectFromCGRect(rect.ToCGRect())); | 141 NSRect new_rect(NSRectFromCGRect(rect.ToCGRect())); |
| 138 new_rect.origin.y = | 142 new_rect.origin.y = |
| 139 [self bounds].size.height - new_rect.origin.y - new_rect.size.height; | 143 [self bounds].size.height - new_rect.origin.y - new_rect.size.height; |
| 140 return new_rect; | 144 return new_rect; |
| 141 } | 145 } |
| 142 | 146 |
| 143 @end | 147 @end |
| OLD | NEW |