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

Side by Side Diff: ui/base/cocoa/focus_tracker.mm

Issue 9309042: Move FocusTracker to ui/. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 10 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 | « ui/base/cocoa/focus_tracker.h ('k') | ui/base/cocoa/focus_tracker_unittest.mm » ('j') | 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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/focus_tracker.h" 5 #import "ui/base/cocoa/focus_tracker.h"
6 6
7 #include "base/basictypes.h" 7 #include "base/basictypes.h"
8 8
9 @implementation FocusTracker 9 @implementation FocusTracker
10 10
11 - (id)initWithWindow:(NSWindow*)window { 11 - (id)initWithWindow:(NSWindow*)window {
12 if ((self = [super init])) { 12 if ((self = [super init])) {
13 NSResponder* current_focus = [window firstResponder]; 13 NSResponder* current_focus = [window firstResponder];
14 14
15 // Special case NSTextViews, because they are removed from the 15 // Special case NSTextViews, because they are removed from the
(...skipping 21 matching lines...) Expand all
37 if (!focusedView_.get()) 37 if (!focusedView_.get())
38 return NO; 38 return NO;
39 39
40 if ([focusedView_ window] && [focusedView_ window] == window) 40 if ([focusedView_ window] && [focusedView_ window] == window)
41 return [window makeFirstResponder:focusedView_.get()]; 41 return [window makeFirstResponder:focusedView_.get()];
42 42
43 return NO; 43 return NO;
44 } 44 }
45 45
46 @end 46 @end
OLDNEW
« no previous file with comments | « ui/base/cocoa/focus_tracker.h ('k') | ui/base/cocoa/focus_tracker_unittest.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698