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