| 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 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 146 // True between |-setPresentationMode:url:bubbleType:| and | 146 // True between |-setPresentationMode:url:bubbleType:| and |
| 147 // |-windowDidEnterFullScreen:| to indicate that the window is in the process | 147 // |-windowDidEnterFullScreen:| to indicate that the window is in the process |
| 148 // of transitioning into fullscreen presentation mode. | 148 // of transitioning into fullscreen presentation mode. |
| 149 BOOL enteringPresentationMode_; | 149 BOOL enteringPresentationMode_; |
| 150 | 150 |
| 151 // When the window is in the process of entering AppKit Fullscreen, this | 151 // When the window is in the process of entering AppKit Fullscreen, this |
| 152 // property indicates whether the window is being fullscreened on the | 152 // property indicates whether the window is being fullscreened on the |
| 153 // primary screen. | 153 // primary screen. |
| 154 BOOL enteringAppKitFullscreenOnPrimaryScreen_; | 154 BOOL enteringAppKitFullscreenOnPrimaryScreen_; |
| 155 | 155 |
| 156 BOOL shouldHideFullscreenToolbar_; |
| 157 |
| 156 // The size of the original (non-fullscreen) window. This is saved just | 158 // The size of the original (non-fullscreen) window. This is saved just |
| 157 // before entering fullscreen mode and is only valid when |-isFullscreen| | 159 // before entering fullscreen mode and is only valid when |-isFullscreen| |
| 158 // returns YES. | 160 // returns YES. |
| 159 NSRect savedRegularWindowFrame_; | 161 NSRect savedRegularWindowFrame_; |
| 160 | 162 |
| 161 // The proportion of the floating bar which is shown (in presentation mode). | 163 // The proportion of the floating bar which is shown (in presentation mode). |
| 162 CGFloat floatingBarShownFraction_; | 164 CGFloat floatingBarShownFraction_; |
| 163 | 165 |
| 164 // Various UI elements/events may want to ensure that the floating bar is | 166 // Various UI elements/events may want to ensure that the floating bar is |
| 165 // visible (in presentation mode), e.g., because of where the mouse is or | 167 // visible (in presentation mode), e.g., because of where the mouse is or |
| (...skipping 346 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 512 | 514 |
| 513 // Adds or removes the tab strip and toolbar from the current window. The | 515 // Adds or removes the tab strip and toolbar from the current window. The |
| 514 // window must be in immersive or AppKit Fullscreen. | 516 // window must be in immersive or AppKit Fullscreen. |
| 515 - (void)updateFullscreenWithToolbar:(BOOL)withToolbar; | 517 - (void)updateFullscreenWithToolbar:(BOOL)withToolbar; |
| 516 | 518 |
| 517 // Updates the contents of the fullscreen exit bubble with |url| and | 519 // Updates the contents of the fullscreen exit bubble with |url| and |
| 518 // |bubbleType|. | 520 // |bubbleType|. |
| 519 - (void)updateFullscreenExitBubbleURL:(const GURL&)url | 521 - (void)updateFullscreenExitBubbleURL:(const GURL&)url |
| 520 bubbleType:(ExclusiveAccessBubbleType)bubbleType; | 522 bubbleType:(ExclusiveAccessBubbleType)bubbleType; |
| 521 | 523 |
| 524 // Toggles and updates the toolbar's visibility in fullscreen mode. This |
| 525 // function toggles between the sliding styles: OMNIBOX_TABS_PRESENT and |
| 526 // OMNIBOX_TABS_HIDDEN. |
| 527 - (void)toggleFullscreenToolbar; |
| 528 |
| 522 // Returns YES if the browser window is in or entering any fullscreen mode. | 529 // Returns YES if the browser window is in or entering any fullscreen mode. |
| 523 - (BOOL)isInAnyFullscreenMode; | 530 - (BOOL)isInAnyFullscreenMode; |
| 524 | 531 |
| 525 // Returns YES if the browser window is currently in or entering fullscreen via | 532 // Returns YES if the browser window is currently in or entering fullscreen via |
| 526 // the built-in immersive mechanism. | 533 // the built-in immersive mechanism. |
| 527 - (BOOL)isInImmersiveFullscreen; | 534 - (BOOL)isInImmersiveFullscreen; |
| 528 | 535 |
| 529 // Returns YES if the browser window is currently in or entering fullscreen via | 536 // Returns YES if the browser window is currently in or entering fullscreen via |
| 530 // the AppKit Fullscreen API. | 537 // the AppKit Fullscreen API. |
| 531 - (BOOL)isInAppKitFullscreen; | 538 - (BOOL)isInAppKitFullscreen; |
| 532 | 539 |
| 533 // Enter fullscreen for an extension. | 540 // Enter fullscreen for an extension. |
| 534 - (void)enterExtensionFullscreenForURL:(const GURL&)url | 541 - (void)enterExtensionFullscreenForURL:(const GURL&)url |
| 535 bubbleType:(ExclusiveAccessBubbleType)bubbleType; | 542 bubbleType:(ExclusiveAccessBubbleType)bubbleType; |
| 536 | 543 |
| 537 // Enters Immersive Fullscreen for the given URL. | 544 // Enters Immersive Fullscreen for the given URL. |
| 538 - (void)enterWebContentFullscreenForURL:(const GURL&)url | 545 - (void)enterWebContentFullscreenForURL:(const GURL&)url |
| 539 bubbleType:(ExclusiveAccessBubbleType)bubbleType; | 546 bubbleType:(ExclusiveAccessBubbleType)bubbleType; |
| 540 | 547 |
| 541 // Exits the current fullscreen mode. | 548 // Exits the current fullscreen mode. |
| 542 - (void)exitAnyFullscreen; | 549 - (void)exitAnyFullscreen; |
| 543 | 550 |
| 544 // Whether the system is in the very specific fullscreen mode: Presentation | 551 // Whether the system is in the very specific fullscreen mode: Presentation |
| 545 // Mode. | 552 // Mode. |
| 546 - (BOOL)inPresentationMode; | 553 - (BOOL)inPresentationMode; |
| 547 | 554 |
| 555 // Whether if the toolbar should be hidden in fullscreen. |
| 556 - (BOOL)shouldHideFullscreenToolbar; |
| 557 |
| 548 // Resizes the fullscreen window to fit the screen it's currently on. Called by | 558 // Resizes the fullscreen window to fit the screen it's currently on. Called by |
| 549 // the PresentationModeController when there is a change in monitor placement or | 559 // the PresentationModeController when there is a change in monitor placement or |
| 550 // resolution. | 560 // resolution. |
| 551 - (void)resizeFullscreenWindow; | 561 - (void)resizeFullscreenWindow; |
| 552 | 562 |
| 553 // Query/lock/release the requirement that the tab strip/toolbar/attached | 563 // Query/lock/release the requirement that the tab strip/toolbar/attached |
| 554 // bookmark bar bar cluster is visible (e.g., when one of its elements has | 564 // bookmark bar bar cluster is visible (e.g., when one of its elements has |
| 555 // focus). This is required for the floating bar in presentation mode, but | 565 // focus). This is required for the floating bar in presentation mode, but |
| 556 // should also be called when not in presentation mode; see the comments for | 566 // should also be called when not in presentation mode; see the comments for |
| 557 // |barVisibilityLocks_| for more details. Double locks/releases by the same | 567 // |barVisibilityLocks_| for more details. Double locks/releases by the same |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 611 - (ExclusiveAccessBubbleWindowController*)exclusiveAccessBubbleWindowController; | 621 - (ExclusiveAccessBubbleWindowController*)exclusiveAccessBubbleWindowController; |
| 612 | 622 |
| 613 // Gets the rect, in window base coordinates, that the omnibox popup should be | 623 // Gets the rect, in window base coordinates, that the omnibox popup should be |
| 614 // positioned relative to. | 624 // positioned relative to. |
| 615 - (NSRect)omniboxPopupAnchorRect; | 625 - (NSRect)omniboxPopupAnchorRect; |
| 616 | 626 |
| 617 @end // @interface BrowserWindowController (TestingAPI) | 627 @end // @interface BrowserWindowController (TestingAPI) |
| 618 | 628 |
| 619 | 629 |
| 620 #endif // CHROME_BROWSER_UI_COCOA_BROWSER_WINDOW_CONTROLLER_H_ | 630 #endif // CHROME_BROWSER_UI_COCOA_BROWSER_WINDOW_CONTROLLER_H_ |
| OLD | NEW |