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

Side by Side Diff: chrome/browser/cocoa/focus_tracker.h

Issue 201116: Reverting 26214. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 11 years, 3 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
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #import <Cocoa/Cocoa.h>
6
7 #include "base/scoped_nsobject.h"
8
9 // A class that handles saving and restoring focus. An instance of
10 // this class snapshots the currently focused view when it is
11 // constructed, and callers can use restoreFocus to return focus to
12 // that view. FocusTracker will not restore focus to views that are
13 // no longer in the view hierarchy or are not in the correct window.
14
15 @interface FocusTracker : NSObject {
16 @private
17 scoped_nsobject<NSView> focusedView_;
18 }
19
20 // |window| is the window that we are saving focus for. This
21 // method snapshots the currently focused view.
22 - (id)initWithWindow:(NSWindow*)window;
23
24 // Attempts to restore focus to the snapshotted view. Returns YES if
25 // focus was restored. Will not restore focus if the view is no
26 // longer in the view hierarchy under |window|.
27 - (BOOL)restoreFocusInWindow:(NSWindow*)window;
28 @end
OLDNEW
« no previous file with comments | « chrome/browser/cocoa/find_bar_cocoa_controller.mm ('k') | chrome/browser/cocoa/focus_tracker.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698