| 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 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 157 BOOL enteringAppKitFullscreenOnPrimaryScreen_; | 157 BOOL enteringAppKitFullscreenOnPrimaryScreen_; |
| 158 | 158 |
| 159 // This flag is set to true when |customWindowsToEnterFullScreenForWindow:| | 159 // This flag is set to true when |customWindowsToEnterFullScreenForWindow:| |
| 160 // and |customWindowsToExitFullScreenForWindow:| are called and did not | 160 // and |customWindowsToExitFullScreenForWindow:| are called and did not |
| 161 // return nil. | 161 // return nil. |
| 162 BOOL isUsingCustomAnimation_; | 162 BOOL isUsingCustomAnimation_; |
| 163 | 163 |
| 164 // True if the toolbar needs to be hidden in fullscreen. | 164 // True if the toolbar needs to be hidden in fullscreen. |
| 165 BOOL shouldHideFullscreenToolbar_; | 165 BOOL shouldHideFullscreenToolbar_; |
| 166 | 166 |
| 167 // True if AppKit has finished exiting fullscreen before the exit animation |
| 168 // is completed. This flag is used to ensure that |windowDidExitFullscreen| |
| 169 // is called after the exit fullscreen animation is complete. |
| 170 BOOL appKitDidExitFullscreen_; |
| 171 |
| 167 // The size of the original (non-fullscreen) window. This is saved just | 172 // The size of the original (non-fullscreen) window. This is saved just |
| 168 // before entering fullscreen mode and is only valid when |-isFullscreen| | 173 // before entering fullscreen mode and is only valid when |-isFullscreen| |
| 169 // returns YES. | 174 // returns YES. |
| 170 NSRect savedRegularWindowFrame_; | 175 NSRect savedRegularWindowFrame_; |
| 171 | 176 |
| 172 // The proportion of the floating bar which is shown (in presentation mode). | 177 // The proportion of the floating bar which is shown (in presentation mode). |
| 173 CGFloat floatingBarShownFraction_; | 178 CGFloat floatingBarShownFraction_; |
| 174 | 179 |
| 175 // Various UI elements/events may want to ensure that the floating bar is | 180 // Various UI elements/events may want to ensure that the floating bar is |
| 176 // visible (in presentation mode), e.g., because of where the mouse is or | 181 // visible (in presentation mode), e.g., because of where the mouse is or |
| (...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 417 // Called to check whether or not this window can have bookmark bar (YES if it | 422 // Called to check whether or not this window can have bookmark bar (YES if it |
| 418 // does, NO otherwise). (E.g., normal browser windows may, pop-ups may not.) | 423 // does, NO otherwise). (E.g., normal browser windows may, pop-ups may not.) |
| 419 - (BOOL)supportsBookmarkBar; | 424 - (BOOL)supportsBookmarkBar; |
| 420 | 425 |
| 421 // Called to check if this controller's window is a tabbed window (e.g., not a | 426 // Called to check if this controller's window is a tabbed window (e.g., not a |
| 422 // pop-up window). Returns YES if it is, NO otherwise. | 427 // pop-up window). Returns YES if it is, NO otherwise. |
| 423 // Note: The |-has...| methods are usually preferred, so this method is largely | 428 // Note: The |-has...| methods are usually preferred, so this method is largely |
| 424 // deprecated. | 429 // deprecated. |
| 425 - (BOOL)isTabbedWindow; | 430 - (BOOL)isTabbedWindow; |
| 426 | 431 |
| 432 // Returns the size of the original (non-fullscreen) window. |
| 433 - (NSRect)savedRegularWindowFrame; |
| 434 |
| 427 @end // @interface BrowserWindowController(WindowType) | 435 @end // @interface BrowserWindowController(WindowType) |
| 428 | 436 |
| 429 // Fullscreen terminology: | 437 // Fullscreen terminology: |
| 430 // | 438 // |
| 431 // ---------------------------------------------------------------------------- | 439 // ---------------------------------------------------------------------------- |
| 432 // There are 2 APIs that cause the window to get resized, and possibly move | 440 // There are 2 APIs that cause the window to get resized, and possibly move |
| 433 // spaces. | 441 // spaces. |
| 434 // | 442 // |
| 435 // + AppKitFullscreen API: AppKit touts a feature known as "fullscreen". This | 443 // + AppKitFullscreen API: AppKit touts a feature known as "fullscreen". This |
| 436 // involves moving the current window to a different space, and resizing the | 444 // involves moving the current window to a different space, and resizing the |
| (...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 559 // Exits the current fullscreen mode. | 567 // Exits the current fullscreen mode. |
| 560 - (void)exitAnyFullscreen; | 568 - (void)exitAnyFullscreen; |
| 561 | 569 |
| 562 // Whether the system is in the very specific fullscreen mode: Presentation | 570 // Whether the system is in the very specific fullscreen mode: Presentation |
| 563 // Mode. | 571 // Mode. |
| 564 - (BOOL)inPresentationMode; | 572 - (BOOL)inPresentationMode; |
| 565 | 573 |
| 566 // Whether if the toolbar should be hidden in fullscreen. | 574 // Whether if the toolbar should be hidden in fullscreen. |
| 567 - (BOOL)shouldHideFullscreenToolbar; | 575 - (BOOL)shouldHideFullscreenToolbar; |
| 568 | 576 |
| 577 // Called by BrowserWindowFullscreenTransition when the exit animation is |
| 578 // finished. |
| 579 - (void)exitFullscreenAnimationFinished; |
| 580 |
| 569 // Resizes the fullscreen window to fit the screen it's currently on. Called by | 581 // Resizes the fullscreen window to fit the screen it's currently on. Called by |
| 570 // the PresentationModeController when there is a change in monitor placement or | 582 // the PresentationModeController when there is a change in monitor placement or |
| 571 // resolution. | 583 // resolution. |
| 572 - (void)resizeFullscreenWindow; | 584 - (void)resizeFullscreenWindow; |
| 573 | 585 |
| 574 // Query/lock/release the requirement that the tab strip/toolbar/attached | 586 // Query/lock/release the requirement that the tab strip/toolbar/attached |
| 575 // bookmark bar bar cluster is visible (e.g., when one of its elements has | 587 // bookmark bar bar cluster is visible (e.g., when one of its elements has |
| 576 // focus). This is required for the floating bar in presentation mode, but | 588 // focus). This is required for the floating bar in presentation mode, but |
| 577 // should also be called when not in presentation mode; see the comments for | 589 // should also be called when not in presentation mode; see the comments for |
| 578 // |barVisibilityLocks_| for more details. Double locks/releases by the same | 590 // |barVisibilityLocks_| for more details. Double locks/releases by the same |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 641 // Returns the active tab contents controller's |blockFullscreenResize_| flag. | 653 // Returns the active tab contents controller's |blockFullscreenResize_| flag. |
| 642 - (BOOL)isActiveTabContentsControllerResizeBlocked; | 654 - (BOOL)isActiveTabContentsControllerResizeBlocked; |
| 643 | 655 |
| 644 // Returns the presentation mode controller. | 656 // Returns the presentation mode controller. |
| 645 - (PresentationModeController*)presentationModeController; | 657 - (PresentationModeController*)presentationModeController; |
| 646 | 658 |
| 647 @end // @interface BrowserWindowController (TestingAPI) | 659 @end // @interface BrowserWindowController (TestingAPI) |
| 648 | 660 |
| 649 | 661 |
| 650 #endif // CHROME_BROWSER_UI_COCOA_BROWSER_WINDOW_CONTROLLER_H_ | 662 #endif // CHROME_BROWSER_UI_COCOA_BROWSER_WINDOW_CONTROLLER_H_ |
| OLD | NEW |