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