blob: 13837defdf4284beb342c6fe0dfdf94fc9919429 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
|
// Copyright (c) 2009 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#import <Cocoa/Cocoa.h>
#import "chrome/browser/cocoa/find_bar_cocoa_controller.h"
#include "base/string16.h"
class BrowserWindowCocoa;
class FindBarBridge;
class FindNotificationDetails;
// A controller for the find bar in the browser window. Manages
// updating the state of the find bar and provides a target for the
// next/previous/close buttons. Certain operations require a pointer
// to the cross-platform FindBarController, so be sure to call
// setFindBarBridge: after creating this controller.
@interface FindBarCocoaController : NSViewController {
@private
IBOutlet NSTextField* findText_;
IBOutlet NSTextField* resultsLabel_;
IBOutlet NSButton* nextButton_;
IBOutlet NSButton* previousButton_;
// Needed to call methods on FindBarController.
FindBarBridge* findBarBridge_; // weak
};
// Initializes a new FindBarCocoaController.
- (id)init;
- (void)setFindBarBridge:(FindBarBridge*)findBar;
- (IBAction)close:(id)sender;
- (IBAction)nextResult:(id)sender;
- (IBAction)previousResult:(id)sender;
// Positions the find bar based on the location of the infobar container.
// TODO(rohitrao): Move this logic into BrowserWindowController.
- (void)positionFindBarView:(NSView*)infoBarContainerView;
// Methods called from FindBarBridge.
- (void)showFindBar;
- (void)hideFindBar;
- (void)setFocusAndSelection;
- (void)setFindText:(const string16&)findText;
- (void)clearResults:(const FindNotificationDetails&)results;
- (void)updateUIForFindResult:(const FindNotificationDetails&)results
withText:(const string16&)findText;
- (BOOL)isFindBarVisible;
@end
|