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 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
155 GURL fullscreenUrl_; | 155 GURL fullscreenUrl_; |
156 FullscreenExitBubbleType fullscreenBubbleType_; | 156 FullscreenExitBubbleType fullscreenBubbleType_; |
157 | 157 |
158 // The Extension Command Registry used to determine which keyboard events to | 158 // The Extension Command Registry used to determine which keyboard events to |
159 // handle. | 159 // handle. |
160 scoped_ptr<ExtensionKeybindingRegistryCocoa> extension_keybinding_registry_; | 160 scoped_ptr<ExtensionKeybindingRegistryCocoa> extension_keybinding_registry_; |
161 | 161 |
162 // The offset between the bottom of the toolbar and web contents. This is used | 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. | 163 // to push the web contents below the bookmark bar. |
164 CGFloat toolbarToWebContentsOffset_; | 164 CGFloat toolbarToWebContentsOffset_; |
| 165 |
| 166 // The number of history overlay views being shown. |
| 167 NSUInteger historyOverlayCount_; |
165 } | 168 } |
166 | 169 |
167 // A convenience class method which gets the |BrowserWindowController| for a | 170 // 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. | 171 // given window. This method returns nil if no window in the chain has a BWC. |
169 + (BrowserWindowController*)browserWindowControllerForWindow:(NSWindow*)window; | 172 + (BrowserWindowController*)browserWindowControllerForWindow:(NSWindow*)window; |
170 | 173 |
171 // A convenience class method which gets the |BrowserWindowController| for a | 174 // A convenience class method which gets the |BrowserWindowController| for a |
172 // given view. This is the controller for the window containing |view|, if it | 175 // 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 | 176 // 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. | 177 // BWC. This method returns nil if no window in the chain has a BWC. |
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
334 // Returns the frame, in Cocoa (unflipped) screen coordinates, of the area where | 337 // Returns the frame, in Cocoa (unflipped) screen coordinates, of the area where |
335 // Instant results are. If Instant is not showing, returns the frame of where | 338 // Instant results are. If Instant is not showing, returns the frame of where |
336 // it would be. | 339 // it would be. |
337 - (NSRect)instantFrame; | 340 - (NSRect)instantFrame; |
338 | 341 |
339 // Called when the Add Search Engine dialog is closed. | 342 // Called when the Add Search Engine dialog is closed. |
340 - (void)sheetDidEnd:(NSWindow*)sheet | 343 - (void)sheetDidEnd:(NSWindow*)sheet |
341 returnCode:(NSInteger)code | 344 returnCode:(NSInteger)code |
342 context:(void*)context; | 345 context:(void*)context; |
343 | 346 |
| 347 // Updates the bookmark bar visibility based on the instant overlay state. |
344 - (void)updateBookmarkBarStateForInstantOverlay; | 348 - (void)updateBookmarkBarStateForInstantOverlay; |
345 | 349 |
| 350 // Called when the find bar visibility changes. This is used to update the |
| 351 // allowOverlappingViews state. |
346 - (void)onFindBarVisibilityChanged; | 352 - (void)onFindBarVisibilityChanged; |
347 | 353 |
| 354 // Called when a history overlay is shown. This is used to update the |
| 355 // allowOverlappingViews state. |
| 356 - (void)onHistoryOverlayShown; |
| 357 |
| 358 // Called when a history overlay is hidden. This is used to update the |
| 359 // allowOverlappingViews state. |
| 360 - (void)onHistoryOverlayHidden; |
| 361 |
348 @end // @interface BrowserWindowController | 362 @end // @interface BrowserWindowController |
349 | 363 |
350 | 364 |
351 // Methods having to do with the window type (normal/popup/app, and whether the | 365 // Methods having to do with the window type (normal/popup/app, and whether the |
352 // window has various features; fullscreen and presentation mode methods are | 366 // window has various features; fullscreen and presentation mode methods are |
353 // separate). | 367 // separate). |
354 @interface BrowserWindowController(WindowType) | 368 @interface BrowserWindowController(WindowType) |
355 | 369 |
356 // Determines whether this controller's window supports a given feature (i.e., | 370 // Determines whether this controller's window supports a given feature (i.e., |
357 // whether a given feature is or can be shown in the window). | 371 // whether a given feature is or can be shown in the window). |
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
485 // |source| rect doesn't fit into |target|. | 499 // |source| rect doesn't fit into |target|. |
486 - (NSSize)overflowFrom:(NSRect)source | 500 - (NSSize)overflowFrom:(NSRect)source |
487 to:(NSRect)target; | 501 to:(NSRect)target; |
488 | 502 |
489 // The fullscreen exit bubble controller, or nil if the bubble isn't showing. | 503 // The fullscreen exit bubble controller, or nil if the bubble isn't showing. |
490 - (FullscreenExitBubbleController*)fullscreenExitBubbleController; | 504 - (FullscreenExitBubbleController*)fullscreenExitBubbleController; |
491 @end // @interface BrowserWindowController (TestingAPI) | 505 @end // @interface BrowserWindowController (TestingAPI) |
492 | 506 |
493 | 507 |
494 #endif // CHROME_BROWSER_UI_COCOA_BROWSER_WINDOW_CONTROLLER_H_ | 508 #endif // CHROME_BROWSER_UI_COCOA_BROWSER_WINDOW_CONTROLLER_H_ |
OLD | NEW |