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

Side by Side Diff: chrome/browser/cocoa/find_bar_cocoa_controller.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
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 #import <Cocoa/Cocoa.h> 5 #import <Cocoa/Cocoa.h>
6 6
7 #import "chrome/browser/cocoa/find_bar_cocoa_controller.h" 7 #import "chrome/browser/cocoa/find_bar_cocoa_controller.h"
8 8
9 #include "base/scoped_nsobject.h"
10 #include "base/string16.h" 9 #include "base/string16.h"
11 10
12 class BrowserWindowCocoa; 11 class BrowserWindowCocoa;
13 class FindBarBridge; 12 class FindBarBridge;
14 class FindNotificationDetails; 13 class FindNotificationDetails;
15 @class FocusTracker;
16 14
17 // A controller for the find bar in the browser window. Manages 15 // A controller for the find bar in the browser window. Manages
18 // updating the state of the find bar and provides a target for the 16 // updating the state of the find bar and provides a target for the
19 // next/previous/close buttons. Certain operations require a pointer 17 // next/previous/close buttons. Certain operations require a pointer
20 // to the cross-platform FindBarController, so be sure to call 18 // to the cross-platform FindBarController, so be sure to call
21 // setFindBarBridge: after creating this controller. 19 // setFindBarBridge: after creating this controller.
22 20
23 @interface FindBarCocoaController : NSViewController { 21 @interface FindBarCocoaController : NSViewController {
24 @private 22 @private
25 IBOutlet NSTextField* findText_; 23 IBOutlet NSTextField* findText_;
26 IBOutlet NSTextField* resultsLabel_; 24 IBOutlet NSTextField* resultsLabel_;
27 IBOutlet NSButton* nextButton_; 25 IBOutlet NSButton* nextButton_;
28 IBOutlet NSButton* previousButton_; 26 IBOutlet NSButton* previousButton_;
29 27
30 // Needed to call methods on FindBarController. 28 // Needed to call methods on FindBarController.
31 FindBarBridge* findBarBridge_; // weak 29 FindBarBridge* findBarBridge_; // weak
32
33 scoped_nsobject<FocusTracker> focusTracker_;
34 }; 30 };
35 31
36 // Initializes a new FindBarCocoaController. 32 // Initializes a new FindBarCocoaController.
37 - (id)init; 33 - (id)init;
38 34
39 - (void)setFindBarBridge:(FindBarBridge*)findBar; 35 - (void)setFindBarBridge:(FindBarBridge*)findBar;
40 36
41 - (IBAction)close:(id)sender; 37 - (IBAction)close:(id)sender;
42 38
43 - (IBAction)nextResult:(id)sender; 39 - (IBAction)nextResult:(id)sender;
44 40
45 - (IBAction)previousResult:(id)sender; 41 - (IBAction)previousResult:(id)sender;
46 42
47 // Positions the find bar based on the location of the infobar container. 43 // Positions the find bar based on the location of the infobar container.
48 // TODO(rohitrao): Move this logic into BrowserWindowController. 44 // TODO(rohitrao): Move this logic into BrowserWindowController.
49 - (void)positionFindBarView:(NSView*)infoBarContainerView; 45 - (void)positionFindBarView:(NSView*)infoBarContainerView;
50 46
51 // Methods called from FindBarBridge. 47 // Methods called from FindBarBridge.
52 - (void)showFindBar; 48 - (void)showFindBar;
53 - (void)hideFindBar; 49 - (void)hideFindBar;
54 - (void)setFocusAndSelection; 50 - (void)setFocusAndSelection;
55 - (void)restoreSavedFocus;
56 - (void)setFindText:(const string16&)findText; 51 - (void)setFindText:(const string16&)findText;
57 52
58 - (void)clearResults:(const FindNotificationDetails&)results; 53 - (void)clearResults:(const FindNotificationDetails&)results;
59 - (void)updateUIForFindResult:(const FindNotificationDetails&)results 54 - (void)updateUIForFindResult:(const FindNotificationDetails&)results
60 withText:(const string16&)findText; 55 withText:(const string16&)findText;
61 - (BOOL)isFindBarVisible; 56 - (BOOL)isFindBarVisible;
62 57
63 @end 58 @end
OLDNEW
« no previous file with comments | « chrome/browser/cocoa/find_bar_bridge.mm ('k') | chrome/browser/cocoa/find_bar_cocoa_controller.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698