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

Side by Side Diff: chrome/browser/ui/cocoa/find_bar/find_bar_cocoa_controller.h

Issue 1221173003: [Mac] Inform reference counted objects that hold a weak Browser* when the Browser is being destroye… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add HasWeakBrowserPointer protocol. Allow -dealloc without preceding -browserWillBeDestroyed. Created 5 years, 5 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
OLDNEW
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698