OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #include "base/mac/scoped_nsobject.h" | 7 #include "base/mac/scoped_nsobject.h" |
8 #include "base/strings/string16.h" | 8 #include "base/strings/string16.h" |
| 9 #import "chrome/browser/ui/cocoa/has_weak_browser_pointer.h" |
9 #include "ui/gfx/geometry/point.h" | 10 #include "ui/gfx/geometry/point.h" |
10 | 11 |
11 class Browser; | 12 class Browser; |
12 class FindBarBridge; | 13 class FindBarBridge; |
13 @class FindBarTextField; | 14 @class FindBarTextField; |
14 class FindNotificationDetails; | 15 class FindNotificationDetails; |
15 @class FocusTracker; | 16 @class FocusTracker; |
16 | 17 |
17 // A controller for the find bar in the browser window. Manages | 18 // 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 | 19 // updating the state of the find bar and provides a target for the |
19 // next/previous/close buttons. Certain operations require a pointer | 20 // next/previous/close buttons. Certain operations require a pointer |
20 // to the cross-platform FindBarController, so be sure to call | 21 // to the cross-platform FindBarController, so be sure to call |
21 // setFindBarBridge: after creating this controller. | 22 // setFindBarBridge: after creating this controller. |
22 | 23 |
23 @interface FindBarCocoaController : NSViewController { | 24 @interface FindBarCocoaController : NSViewController<HasWeakBrowserPointer> { |
24 @private | 25 @private |
25 IBOutlet NSView* findBarView_; | 26 IBOutlet NSView* findBarView_; |
26 IBOutlet FindBarTextField* findText_; | 27 IBOutlet FindBarTextField* findText_; |
27 IBOutlet NSButton* nextButton_; | 28 IBOutlet NSButton* nextButton_; |
28 IBOutlet NSButton* previousButton_; | 29 IBOutlet NSButton* previousButton_; |
29 IBOutlet NSButton* closeButton_; | 30 IBOutlet NSButton* closeButton_; |
30 | 31 |
31 // Needed to call methods on FindBarController. | 32 // Needed to call methods on FindBarController. |
32 FindBarBridge* findBarBridge_; // weak | 33 FindBarBridge* findBarBridge_; // weak |
33 | 34 |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
96 - (BOOL)isFindBarAnimating; | 97 - (BOOL)isFindBarAnimating; |
97 | 98 |
98 // Returns the FindBar's position in the superview's coordinates, but with | 99 // Returns the FindBar's position in the superview's coordinates, but with |
99 // the Y coordinate growing down. | 100 // the Y coordinate growing down. |
100 - (gfx::Point)findBarWindowPosition; | 101 - (gfx::Point)findBarWindowPosition; |
101 | 102 |
102 // Returns the width of the FindBar. | 103 // Returns the width of the FindBar. |
103 - (int)findBarWidth; | 104 - (int)findBarWidth; |
104 | 105 |
105 @end | 106 @end |
OLD | NEW |