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

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

Issue 2944017: Putting the findbar into a child window. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 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 | 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" 9 #include "base/scoped_nsobject.h"
10 #include "base/string16.h" 10 #include "base/string16.h"
(...skipping 22 matching lines...) Expand all
33 33
34 scoped_nsobject<FocusTracker> focusTracker_; 34 scoped_nsobject<FocusTracker> focusTracker_;
35 35
36 // The currently-running animation. This is defined to be non-nil if an 36 // The currently-running animation. This is defined to be non-nil if an
37 // animation is running, and is always nil otherwise. The 37 // animation is running, and is always nil otherwise. The
38 // FindBarCocoaController should not be deallocated while an animation is 38 // FindBarCocoaController should not be deallocated while an animation is
39 // running (stopAnimation is currently called before the last tab in a 39 // running (stopAnimation is currently called before the last tab in a
40 // window is removed). 40 // window is removed).
41 scoped_nsobject<NSViewAnimation> currentAnimation_; 41 scoped_nsobject<NSViewAnimation> currentAnimation_;
42 42
43 // The borderless window that contains this findbar. This window will be
44 // added as a child window of the browser window.
45 scoped_nsobject<NSWindow> window_;
46
43 // If YES, do nothing as a result of find pasteboard update notifications. 47 // If YES, do nothing as a result of find pasteboard update notifications.
44 BOOL suppressPboardUpdateActions_; 48 BOOL suppressPboardUpdateActions_;
45 }; 49 };
46 50
47 // Initializes a new FindBarCocoaController. 51 // Initializes a new FindBarCocoaController.
48 - (id)init; 52 - (id)init;
49 53
54 - (NSWindow*)window;
55
50 - (void)setFindBarBridge:(FindBarBridge*)findBar; 56 - (void)setFindBarBridge:(FindBarBridge*)findBar;
51 57
52 - (IBAction)close:(id)sender; 58 - (IBAction)close:(id)sender;
53 59
54 - (IBAction)nextResult:(id)sender; 60 - (IBAction)nextResult:(id)sender;
55 61
56 - (IBAction)previousResult:(id)sender; 62 - (IBAction)previousResult:(id)sender;
57 63
58 // Position the find bar at the given maximum y-coordinate (the min-y of the 64 // Position the find bar at the given maximum y-coordinate (the min-y of the
59 // bar -- toolbar + possibly bookmark bar, but not including the infobars) with 65 // bar -- toolbar + possibly bookmark bar, but not including the infobars) with
60 // the given maximum width (i.e., the find bar should fit between 0 and 66 // the given maximum width (i.e., the find bar should fit between 0 and
61 // |maxWidth|). 67 // |maxWidth|).
62 - (void)positionFindBarViewAtMaxY:(CGFloat)maxY maxWidth:(CGFloat)maxWidth; 68 - (void)positionFindBarViewAtMaxY:(CGFloat)maxY maxWidth:(CGFloat)maxWidth;
63 69
64 // Methods called from FindBarBridge. 70 // Methods called from FindBarBridge.
65 - (void)showFindBar:(BOOL)animate; 71 - (void)showFindBar:(BOOL)animate;
66 - (void)hideFindBar:(BOOL)animate; 72 - (void)hideFindBar:(BOOL)animate;
67 - (void)stopAnimation; 73 - (void)stopAnimation;
68 - (void)setFocusAndSelection; 74 - (void)setFocusAndSelection;
69 - (void)restoreSavedFocus; 75 - (void)restoreSavedFocus;
70 - (void)setFindText:(NSString*)findText; 76 - (void)setFindText:(NSString*)findText;
71 77
72 - (void)clearResults:(const FindNotificationDetails&)results; 78 - (void)clearResults:(const FindNotificationDetails&)results;
73 - (void)updateUIForFindResult:(const FindNotificationDetails&)results 79 - (void)updateUIForFindResult:(const FindNotificationDetails&)results
74 withText:(const string16&)findText; 80 withText:(const string16&)findText;
75 - (BOOL)isFindBarVisible; 81 - (BOOL)isFindBarVisible;
76 - (BOOL)isFindBarAnimating; 82 - (BOOL)isFindBarAnimating;
77 83
78 @end 84 @end
OLDNEW
« no previous file with comments | « chrome/browser/cocoa/browser_window_controller.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