| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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_COCOA_BROWSER_WINDOW_CONTROLLER_H_ | 5 #ifndef CHROME_BROWSER_COCOA_BROWSER_WINDOW_CONTROLLER_H_ |
| 6 #define CHROME_BROWSER_COCOA_BROWSER_WINDOW_CONTROLLER_H_ | 6 #define CHROME_BROWSER_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 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 115 // Various UI elements/events may want to ensure that the floating bar is | 115 // Various UI elements/events may want to ensure that the floating bar is |
| 116 // visible (in fullscreen mode), e.g., because of where the mouse is or where | 116 // visible (in fullscreen mode), e.g., because of where the mouse is or where |
| 117 // keyboard focus is. Whenever an object requires bar visibility, it has | 117 // keyboard focus is. Whenever an object requires bar visibility, it has |
| 118 // itself added to |barVisibilityLocks_|. When it no longer requires bar | 118 // itself added to |barVisibilityLocks_|. When it no longer requires bar |
| 119 // visibility, it has itself removed. | 119 // visibility, it has itself removed. |
| 120 scoped_nsobject<NSMutableSet> barVisibilityLocks_; | 120 scoped_nsobject<NSMutableSet> barVisibilityLocks_; |
| 121 | 121 |
| 122 // Bar visibility locks and releases only result (when appropriate) in changes | 122 // Bar visibility locks and releases only result (when appropriate) in changes |
| 123 // in visible state when the following is |YES|. | 123 // in visible state when the following is |YES|. |
| 124 BOOL barVisibilityUpdatesEnabled_; | 124 BOOL barVisibilityUpdatesEnabled_; |
| 125 | |
| 126 // Whether the toolbar is collapsed. Currently used only by extension apps. | |
| 127 BOOL toolbarCollapsed_; | |
| 128 } | 125 } |
| 129 | 126 |
| 130 // A convenience class method which gets the |BrowserWindowController| for a | 127 // A convenience class method which gets the |BrowserWindowController| for a |
| 131 // given window. This method returns nil if no window in the chain has a BWC. | 128 // given window. This method returns nil if no window in the chain has a BWC. |
| 132 + (BrowserWindowController*)browserWindowControllerForWindow:(NSWindow*)window; | 129 + (BrowserWindowController*)browserWindowControllerForWindow:(NSWindow*)window; |
| 133 | 130 |
| 134 // A convenience class method which gets the |BrowserWindowController| for a | 131 // A convenience class method which gets the |BrowserWindowController| for a |
| 135 // given view. This is the controller for the window containing |view|, if it | 132 // given view. This is the controller for the window containing |view|, if it |
| 136 // is a BWC, or the first controller in the parent-window chain that is a | 133 // is a BWC, or the first controller in the parent-window chain that is a |
| 137 // BWC. This method returns nil if no window in the chain has a BWC. | 134 // BWC. This method returns nil if no window in the chain has a BWC. |
| (...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 250 - (NSPoint)themePatternPhase; | 247 - (NSPoint)themePatternPhase; |
| 251 | 248 |
| 252 // Return the point to which a bubble window's arrow should point. | 249 // Return the point to which a bubble window's arrow should point. |
| 253 - (NSPoint)bookmarkBubblePoint; | 250 - (NSPoint)bookmarkBubblePoint; |
| 254 | 251 |
| 255 // Call when the user changes the tab strip display mode, enabling or | 252 // Call when the user changes the tab strip display mode, enabling or |
| 256 // disabling vertical tabs for this browser. Re-flows the contents of the | 253 // disabling vertical tabs for this browser. Re-flows the contents of the |
| 257 // browser. | 254 // browser. |
| 258 - (void)toggleTabStripDisplayMode; | 255 - (void)toggleTabStripDisplayMode; |
| 259 | 256 |
| 260 // Called when the toolbar is to be hidden or shown. Right now this only occurs | |
| 261 // when extension apps don't want the toolbar to be shown. | |
| 262 - (void)setToolbarCollapsedMode:(BOOL)collapsed; | |
| 263 | |
| 264 // Called when the Add Search Engine dialog is closed. | 257 // Called when the Add Search Engine dialog is closed. |
| 265 - (void)sheetDidEnd:(NSWindow*)sheet | 258 - (void)sheetDidEnd:(NSWindow*)sheet |
| 266 returnCode:(NSInteger)code | 259 returnCode:(NSInteger)code |
| 267 context:(void*)context; | 260 context:(void*)context; |
| 268 | 261 |
| 269 @end // @interface BrowserWindowController | 262 @end // @interface BrowserWindowController |
| 270 | 263 |
| 271 | 264 |
| 272 // Methods having to do with the window type (normal/popup/app, and whether the | 265 // Methods having to do with the window type (normal/popup/app, and whether the |
| 273 // window has various features; fullscreen methods are separate). | 266 // window has various features; fullscreen methods are separate). |
| (...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 372 - (NSWindow*)createFullscreenWindow; | 365 - (NSWindow*)createFullscreenWindow; |
| 373 | 366 |
| 374 // Resets any saved state about window growth (due to showing the bookmark bar | 367 // Resets any saved state about window growth (due to showing the bookmark bar |
| 375 // or the download shelf), so that future shrinking will occur from the bottom. | 368 // or the download shelf), so that future shrinking will occur from the bottom. |
| 376 - (void)resetWindowGrowthState; | 369 - (void)resetWindowGrowthState; |
| 377 | 370 |
| 378 @end // @interface BrowserWindowController(TestingAPI) | 371 @end // @interface BrowserWindowController(TestingAPI) |
| 379 | 372 |
| 380 | 373 |
| 381 #endif // CHROME_BROWSER_COCOA_BROWSER_WINDOW_CONTROLLER_H_ | 374 #endif // CHROME_BROWSER_COCOA_BROWSER_WINDOW_CONTROLLER_H_ |
| OLD | NEW |