Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 107 // The view controller that manages the incognito badge or the multi-profile | 107 // The view controller that manages the incognito badge or the multi-profile |
| 108 // avatar icon. The view is always in the view hierarchy, but will be hidden | 108 // avatar icon. The view is always in the view hierarchy, but will be hidden |
| 109 // unless it's appropriate to show it. | 109 // unless it's appropriate to show it. |
| 110 scoped_nsobject<AvatarButtonController> avatarButtonController_; | 110 scoped_nsobject<AvatarButtonController> avatarButtonController_; |
| 111 | 111 |
| 112 // Lazily created view which draws the background for the floating set of bars | 112 // Lazily created view which draws the background for the floating set of bars |
| 113 // in presentation mode (for window types having a floating bar; it remains | 113 // in presentation mode (for window types having a floating bar; it remains |
| 114 // nil for those which don't). | 114 // nil for those which don't). |
| 115 scoped_nsobject<NSView> floatingBarBackingView_; | 115 scoped_nsobject<NSView> floatingBarBackingView_; |
| 116 | 116 |
| 117 // Tracks whether the floating bar is above or below the bookmark bar, in | |
| 118 // terms of z-order. | |
| 119 BOOL floatingBarAboveBookmarkBar_; | |
| 120 | |
| 121 // The borderless window used in fullscreen mode. Lion reuses the original | 117 // The borderless window used in fullscreen mode. Lion reuses the original |
| 122 // window in fullscreen mode, so this is always nil on Lion. | 118 // window in fullscreen mode, so this is always nil on Lion. |
| 123 scoped_nsobject<NSWindow> fullscreenWindow_; | 119 scoped_nsobject<NSWindow> fullscreenWindow_; |
| 124 | 120 |
| 125 // Tracks whether presentation mode was entered from fullscreen mode or | 121 // Tracks whether presentation mode was entered from fullscreen mode or |
| 126 // directly from normal windowed mode. Used to determine what to do when | 122 // directly from normal windowed mode. Used to determine what to do when |
| 127 // exiting presentation mode. | 123 // exiting presentation mode. |
| 128 BOOL enteredPresentationModeFromFullscreen_; | 124 BOOL enteredPresentationModeFromFullscreen_; |
| 129 | 125 |
| 130 // True between -windowWillEnterFullScreen and -windowDidEnterFullScreen. | 126 // True between -windowWillEnterFullScreen and -windowDidEnterFullScreen. |
| (...skipping 25 matching lines...) Expand all Loading... | |
| 156 | 152 |
| 157 // When going fullscreen for a tab, we need to store the URL and the | 153 // When going fullscreen for a tab, we need to store the URL and the |
| 158 // fullscreen type, since we can't show the bubble until | 154 // fullscreen type, since we can't show the bubble until |
| 159 // -windowDidEnterFullScreen: gets called. | 155 // -windowDidEnterFullScreen: gets called. |
| 160 GURL fullscreenUrl_; | 156 GURL fullscreenUrl_; |
| 161 FullscreenExitBubbleType fullscreenBubbleType_; | 157 FullscreenExitBubbleType fullscreenBubbleType_; |
| 162 | 158 |
| 163 // The Extension Command Registry used to determine which keyboard events to | 159 // The Extension Command Registry used to determine which keyboard events to |
| 164 // handle. | 160 // handle. |
| 165 scoped_ptr<ExtensionKeybindingRegistryCocoa> extension_keybinding_registry_; | 161 scoped_ptr<ExtensionKeybindingRegistryCocoa> extension_keybinding_registry_; |
| 162 | |
| 163 // The offset between the bottom of the toolbar and web contents. This is used | |
|
kuan
2013/01/17 18:25:51
nit: s/used/used to/
sail
2013/01/17 18:54:55
Done.
| |
| 164 // push the web contents below the bookmark bar. | |
| 165 CGFloat toolbarToWebContentsOffset_; | |
| 166 } | 166 } |
| 167 | 167 |
| 168 // A convenience class method which gets the |BrowserWindowController| for a | 168 // A convenience class method which gets the |BrowserWindowController| for a |
| 169 // given window. This method returns nil if no window in the chain has a BWC. | 169 // given window. This method returns nil if no window in the chain has a BWC. |
| 170 + (BrowserWindowController*)browserWindowControllerForWindow:(NSWindow*)window; | 170 + (BrowserWindowController*)browserWindowControllerForWindow:(NSWindow*)window; |
| 171 | 171 |
| 172 // A convenience class method which gets the |BrowserWindowController| for a | 172 // A convenience class method which gets the |BrowserWindowController| for a |
| 173 // given view. This is the controller for the window containing |view|, if it | 173 // given view. This is the controller for the window containing |view|, if it |
| 174 // is a BWC, or the first controller in the parent-window chain that is a | 174 // is a BWC, or the first controller in the parent-window chain that is a |
| 175 // BWC. This method returns nil if no window in the chain has a BWC. | 175 // BWC. This method returns nil if no window in the chain has a BWC. |
| (...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 318 // Returns the frame, in Cocoa (unflipped) screen coordinates, of the area where | 318 // Returns the frame, in Cocoa (unflipped) screen coordinates, of the area where |
| 319 // Instant results are. If Instant is not showing, returns the frame of where | 319 // Instant results are. If Instant is not showing, returns the frame of where |
| 320 // it would be. | 320 // it would be. |
| 321 - (NSRect)instantFrame; | 321 - (NSRect)instantFrame; |
| 322 | 322 |
| 323 // Called when the Add Search Engine dialog is closed. | 323 // Called when the Add Search Engine dialog is closed. |
| 324 - (void)sheetDidEnd:(NSWindow*)sheet | 324 - (void)sheetDidEnd:(NSWindow*)sheet |
| 325 returnCode:(NSInteger)code | 325 returnCode:(NSInteger)code |
| 326 context:(void*)context; | 326 context:(void*)context; |
| 327 | 327 |
| 328 - (void)updateBookmarkStateForInstantPreview; | |
| 329 | |
| 328 @end // @interface BrowserWindowController | 330 @end // @interface BrowserWindowController |
| 329 | 331 |
| 330 | 332 |
| 331 // Methods having to do with the window type (normal/popup/app, and whether the | 333 // Methods having to do with the window type (normal/popup/app, and whether the |
| 332 // window has various features; fullscreen and presentation mode methods are | 334 // window has various features; fullscreen and presentation mode methods are |
| 333 // separate). | 335 // separate). |
| 334 @interface BrowserWindowController(WindowType) | 336 @interface BrowserWindowController(WindowType) |
| 335 | 337 |
| 336 // Determines whether this controller's window supports a given feature (i.e., | 338 // Determines whether this controller's window supports a given feature (i.e., |
| 337 // whether a given feature is or can be shown in the window). | 339 // whether a given feature is or can be shown in the window). |
| (...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 466 // |source| rect doesn't fit into |target|. | 468 // |source| rect doesn't fit into |target|. |
| 467 - (NSSize)overflowFrom:(NSRect)source | 469 - (NSSize)overflowFrom:(NSRect)source |
| 468 to:(NSRect)target; | 470 to:(NSRect)target; |
| 469 | 471 |
| 470 // The fullscreen exit bubble controller, or nil if the bubble isn't showing. | 472 // The fullscreen exit bubble controller, or nil if the bubble isn't showing. |
| 471 - (FullscreenExitBubbleController*)fullscreenExitBubbleController; | 473 - (FullscreenExitBubbleController*)fullscreenExitBubbleController; |
| 472 @end // @interface BrowserWindowController (TestingAPI) | 474 @end // @interface BrowserWindowController (TestingAPI) |
| 473 | 475 |
| 474 | 476 |
| 475 #endif // CHROME_BROWSER_UI_COCOA_BROWSER_WINDOW_CONTROLLER_H_ | 477 #endif // CHROME_BROWSER_UI_COCOA_BROWSER_WINDOW_CONTROLLER_H_ |
| OLD | NEW |