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

Side by Side Diff: chrome/browser/ui/cocoa/browser_window_controller.h

Issue 11876036: Alternate NTP: Don't hide bookmark bar on instant (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: " Created 7 years, 11 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #ifndef CHROME_BROWSER_UI_COCOA_BROWSER_WINDOW_CONTROLLER_H_ 5 #ifndef CHROME_BROWSER_UI_COCOA_BROWSER_WINDOW_CONTROLLER_H_
6 #define CHROME_BROWSER_UI_COCOA_BROWSER_WINDOW_CONTROLLER_H_ 6 #define CHROME_BROWSER_UI_COCOA_BROWSER_WINDOW_CONTROLLER_H_
7 7
8 // A class acting as the Objective-C controller for the Browser 8 // A class acting as the Objective-C controller for the Browser
9 // object. Handles interactions between Cocoa and the cross-platform 9 // object. Handles interactions between Cocoa and the cross-platform
10 // code. Each window has a single toolbar and, by virtue of being a 10 // code. Each window has a single toolbar and, by virtue of being a
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 // The view controller that manages the incognito badge or the multi-profile 106 // The view controller that manages the incognito badge or the multi-profile
107 // avatar icon. The view is always in the view hierarchy, but will be hidden 107 // avatar icon. The view is always in the view hierarchy, but will be hidden
108 // unless it's appropriate to show it. 108 // unless it's appropriate to show it.
109 scoped_nsobject<AvatarButtonController> avatarButtonController_; 109 scoped_nsobject<AvatarButtonController> avatarButtonController_;
110 110
111 // Lazily created view which draws the background for the floating set of bars 111 // Lazily created view which draws the background for the floating set of bars
112 // in presentation mode (for window types having a floating bar; it remains 112 // in presentation mode (for window types having a floating bar; it remains
113 // nil for those which don't). 113 // nil for those which don't).
114 scoped_nsobject<NSView> floatingBarBackingView_; 114 scoped_nsobject<NSView> floatingBarBackingView_;
115 115
116 // Tracks whether the floating bar is above or below the bookmark bar, in
117 // terms of z-order.
118 BOOL floatingBarAboveBookmarkBar_;
119
120 // The borderless window used in fullscreen mode. Lion reuses the original 116 // The borderless window used in fullscreen mode. Lion reuses the original
121 // window in fullscreen mode, so this is always nil on Lion. 117 // window in fullscreen mode, so this is always nil on Lion.
122 scoped_nsobject<NSWindow> fullscreenWindow_; 118 scoped_nsobject<NSWindow> fullscreenWindow_;
123 119
124 // Tracks whether presentation mode was entered from fullscreen mode or 120 // Tracks whether presentation mode was entered from fullscreen mode or
125 // directly from normal windowed mode. Used to determine what to do when 121 // directly from normal windowed mode. Used to determine what to do when
126 // exiting presentation mode. 122 // exiting presentation mode.
127 BOOL enteredPresentationModeFromFullscreen_; 123 BOOL enteredPresentationModeFromFullscreen_;
128 124
129 // True between -windowWillEnterFullScreen and -windowDidEnterFullScreen. 125 // True between -windowWillEnterFullScreen and -windowDidEnterFullScreen.
(...skipping 25 matching lines...) Expand all
155 151
156 // When going fullscreen for a tab, we need to store the URL and the 152 // When going fullscreen for a tab, we need to store the URL and the
157 // fullscreen type, since we can't show the bubble until 153 // fullscreen type, since we can't show the bubble until
158 // -windowDidEnterFullScreen: gets called. 154 // -windowDidEnterFullScreen: gets called.
159 GURL fullscreenUrl_; 155 GURL fullscreenUrl_;
160 FullscreenExitBubbleType fullscreenBubbleType_; 156 FullscreenExitBubbleType fullscreenBubbleType_;
161 157
162 // The Extension Command Registry used to determine which keyboard events to 158 // The Extension Command Registry used to determine which keyboard events to
163 // handle. 159 // handle.
164 scoped_ptr<ExtensionKeybindingRegistryCocoa> extension_keybinding_registry_; 160 scoped_ptr<ExtensionKeybindingRegistryCocoa> extension_keybinding_registry_;
161
162 // The offset between the bottom of the toolbar and web contents. This is used
163 // to push the web contents below the bookmark bar.
164 CGFloat toolbarToWebContentsOffset_;
165 } 165 }
166 166
167 // A convenience class method which gets the |BrowserWindowController| for a 167 // A convenience class method which gets the |BrowserWindowController| for a
168 // given window. This method returns nil if no window in the chain has a BWC. 168 // given window. This method returns nil if no window in the chain has a BWC.
169 + (BrowserWindowController*)browserWindowControllerForWindow:(NSWindow*)window; 169 + (BrowserWindowController*)browserWindowControllerForWindow:(NSWindow*)window;
170 170
171 // A convenience class method which gets the |BrowserWindowController| for a 171 // A convenience class method which gets the |BrowserWindowController| for a
172 // given view. This is the controller for the window containing |view|, if it 172 // given view. This is the controller for the window containing |view|, if it
173 // is a BWC, or the first controller in the parent-window chain that is a 173 // is a BWC, or the first controller in the parent-window chain that is a
174 // BWC. This method returns nil if no window in the chain has a BWC. 174 // BWC. This method returns nil if no window in the chain has a BWC.
(...skipping 19 matching lines...) Expand all
194 194
195 // Access the C++ bridge between the NSWindow and the rest of Chromium. 195 // Access the C++ bridge between the NSWindow and the rest of Chromium.
196 - (BrowserWindow*)browserWindow; 196 - (BrowserWindow*)browserWindow;
197 197
198 // Return a weak pointer to the toolbar controller. 198 // Return a weak pointer to the toolbar controller.
199 - (ToolbarController*)toolbarController; 199 - (ToolbarController*)toolbarController;
200 200
201 // Return a weak pointer to the tab strip controller. 201 // Return a weak pointer to the tab strip controller.
202 - (TabStripController*)tabStripController; 202 - (TabStripController*)tabStripController;
203 203
204 // Return a weak pointer to the find bar controller.
205 - (FindBarCocoaController*)findBarCocoaController;
206
204 // Access the ObjC controller that contains the infobars. 207 // Access the ObjC controller that contains the infobars.
205 - (InfoBarContainerController*)infoBarContainerController; 208 - (InfoBarContainerController*)infoBarContainerController;
206 209
207 // Access the C++ bridge object representing the status bubble for the window. 210 // Access the C++ bridge object representing the status bubble for the window.
208 - (StatusBubbleMac*)statusBubble; 211 - (StatusBubbleMac*)statusBubble;
209 212
210 // Access the C++ bridge object representing the location bar. 213 // Access the C++ bridge object representing the location bar.
211 - (LocationBarViewMac*)locationBarBridge; 214 - (LocationBarViewMac*)locationBarBridge;
212 215
216 // Returns a weak pointer to the floating bar backing view;
217 - (NSView*)floatingBarBackingView;
218
219 // Returns a weak pointer to the previewable contents controller.
220 - (PreviewableContentsController*)previewableContentsController;
221
213 // Access the Profile object that backs this Browser. 222 // Access the Profile object that backs this Browser.
214 - (Profile*)profile; 223 - (Profile*)profile;
215 224
216 // Access the avatar button controller. 225 // Access the avatar button controller.
217 - (AvatarButtonController*)avatarButtonController; 226 - (AvatarButtonController*)avatarButtonController;
218 227
219 // Updates the toolbar (and transitively the location bar) with the states of 228 // Updates the toolbar (and transitively the location bar) with the states of
220 // the specified |tab|. If |shouldRestore| is true, we're switching 229 // the specified |tab|. If |shouldRestore| is true, we're switching
221 // (back?) to this tab and should restore any previous location bar state 230 // (back?) to this tab and should restore any previous location bar state
222 // (such as user editing) as well. 231 // (such as user editing) as well.
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
323 // Returns the frame, in Cocoa (unflipped) screen coordinates, of the area where 332 // Returns the frame, in Cocoa (unflipped) screen coordinates, of the area where
324 // Instant results are. If Instant is not showing, returns the frame of where 333 // Instant results are. If Instant is not showing, returns the frame of where
325 // it would be. 334 // it would be.
326 - (NSRect)instantFrame; 335 - (NSRect)instantFrame;
327 336
328 // Called when the Add Search Engine dialog is closed. 337 // Called when the Add Search Engine dialog is closed.
329 - (void)sheetDidEnd:(NSWindow*)sheet 338 - (void)sheetDidEnd:(NSWindow*)sheet
330 returnCode:(NSInteger)code 339 returnCode:(NSInteger)code
331 context:(void*)context; 340 context:(void*)context;
332 341
342 - (void)updateBookmarkBarStateForInstantPreview;
Nico 2013/01/23 21:00:04 needs method comment
343
333 @end // @interface BrowserWindowController 344 @end // @interface BrowserWindowController
334 345
335 346
336 // Methods having to do with the window type (normal/popup/app, and whether the 347 // Methods having to do with the window type (normal/popup/app, and whether the
337 // window has various features; fullscreen and presentation mode methods are 348 // window has various features; fullscreen and presentation mode methods are
338 // separate). 349 // separate).
339 @interface BrowserWindowController(WindowType) 350 @interface BrowserWindowController(WindowType)
340 351
341 // Determines whether this controller's window supports a given feature (i.e., 352 // Determines whether this controller's window supports a given feature (i.e.,
342 // whether a given feature is or can be shown in the window). 353 // whether a given feature is or can be shown in the window).
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
471 // |source| rect doesn't fit into |target|. 482 // |source| rect doesn't fit into |target|.
472 - (NSSize)overflowFrom:(NSRect)source 483 - (NSSize)overflowFrom:(NSRect)source
473 to:(NSRect)target; 484 to:(NSRect)target;
474 485
475 // The fullscreen exit bubble controller, or nil if the bubble isn't showing. 486 // The fullscreen exit bubble controller, or nil if the bubble isn't showing.
476 - (FullscreenExitBubbleController*)fullscreenExitBubbleController; 487 - (FullscreenExitBubbleController*)fullscreenExitBubbleController;
477 @end // @interface BrowserWindowController (TestingAPI) 488 @end // @interface BrowserWindowController (TestingAPI)
478 489
479 490
480 #endif // CHROME_BROWSER_UI_COCOA_BROWSER_WINDOW_CONTROLLER_H_ 491 #endif // CHROME_BROWSER_UI_COCOA_BROWSER_WINDOW_CONTROLLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698