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

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

Issue 3153039: Fix tabbing into web area not focusing first element.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 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
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 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
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
OLDNEW
« no previous file with comments | « chrome/browser/cocoa/base_view.h ('k') | chrome/browser/renderer_host/render_widget_host_view_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698