Chromium Code Reviews| 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 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 53 class WebContents; | 53 class WebContents; |
| 54 } | 54 } |
| 55 | 55 |
| 56 namespace extensions { | 56 namespace extensions { |
| 57 class Command; | 57 class Command; |
| 58 } | 58 } |
| 59 | 59 |
| 60 namespace fullscreen_mac { | 60 namespace fullscreen_mac { |
| 61 enum SlidingStyle { | 61 enum SlidingStyle { |
| 62 OMNIBOX_TABS_PRESENT = 0, // Tab strip and omnibox both visible. | 62 OMNIBOX_TABS_PRESENT = 0, // Tab strip and omnibox both visible. |
| 63 OMNIBOX_PRESENT, // Tab strip hidden. | |
| 64 OMNIBOX_TABS_HIDDEN, // Tab strip and omnibox both hidden. | 63 OMNIBOX_TABS_HIDDEN, // Tab strip and omnibox both hidden. |
| 65 }; | 64 }; |
| 66 } // namespace fullscreen_mac | 65 } // namespace fullscreen_mac |
| 67 | 66 |
| 68 @interface BrowserWindowController : | 67 @interface BrowserWindowController : |
| 69 TabWindowController<NSUserInterfaceValidations, | 68 TabWindowController<NSUserInterfaceValidations, |
| 70 BookmarkBarControllerDelegate, | 69 BookmarkBarControllerDelegate, |
| 71 BrowserCommandExecutor, | 70 BrowserCommandExecutor, |
| 72 ViewResizer, | 71 ViewResizer, |
| 73 TabStripControllerDelegate> { | 72 TabStripControllerDelegate> { |
| (...skipping 348 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 422 // | 421 // |
| 423 // + Immersive fullscreen: An alternative to AppKitFullscreen API. Uses on 10.6 | 422 // + Immersive fullscreen: An alternative to AppKitFullscreen API. Uses on 10.6 |
| 424 // (before AppKitFullscreen API was available), and on certain HTML/Flash | 423 // (before AppKitFullscreen API was available), and on certain HTML/Flash |
| 425 // content. This is a method defined by Chrome. | 424 // content. This is a method defined by Chrome. |
| 426 // | 425 // |
| 427 // The Immersive fullscreen API can be called after the AppKitFullscreen API. | 426 // The Immersive fullscreen API can be called after the AppKitFullscreen API. |
| 428 // Calling the AppKitFullscreen API while immersive fullscreen API has been | 427 // Calling the AppKitFullscreen API while immersive fullscreen API has been |
| 429 // invoked causes all fullscreen modes to exit. | 428 // invoked causes all fullscreen modes to exit. |
| 430 // | 429 // |
| 431 // ---------------------------------------------------------------------------- | 430 // ---------------------------------------------------------------------------- |
| 432 // There are 3 "styles" of omnibox sliding. | 431 // There are 2 "styles" of omnibox sliding. |
| 433 // + OMNIBOX_TABS_PRESENT: Both the omnibox and the tabstrip are present. | 432 // + OMNIBOX_TABS_PRESENT: Both the omnibox and the tabstrip are present. |
| 434 // Moving the cursor to the top causes the menubar to appear, and everything | 433 // Moving the cursor to the top causes the menubar to appear, and everything |
| 435 // else to slide down. | 434 // else to slide down. |
| 436 // + OMNIBOX_PRESENT: The tabstrip is hidden. Moving the cursor to the top | |
| 437 // shows the tabstrip and menubar, sliding everything else down. | |
| 438 // + OMNIBOX_TABS_HIDDEN: Both tabstrip and omnibox are hidden. Moving cursor | 435 // + OMNIBOX_TABS_HIDDEN: Both tabstrip and omnibox are hidden. Moving cursor |
| 439 // to top shows tabstrip, omnibox, and menu bar. | 436 // to top shows tabstrip, omnibox, and menu bar. |
| 440 // | 437 // |
| 441 // The omnibox sliding styles are used in conjunction with the fullscreen APIs. | 438 // The omnibox sliding styles are used in conjunction with the fullscreen APIs. |
| 442 // There is exactly 1 sliding style active at a time. The sliding is mangaged | 439 // There is exactly 1 sliding style active at a time. The sliding is mangaged |
| 443 // by the presentationModeController_. (poorly named). | 440 // by the presentationModeController_. (poorly named). |
| 444 // | 441 // |
| 445 // ---------------------------------------------------------------------------- | 442 // ---------------------------------------------------------------------------- |
| 446 // There are several "fullscreen modes" bantered around. Technically, any | 443 // There are several "fullscreen modes" bantered around. Technically, any |
| 447 // fullscreen API can be combined with any sliding style. | 444 // fullscreen API can be combined with any sliding style. |
| (...skipping 13 matching lines...) Expand all Loading... | |
| 461 // AppKitFullscreen API. | 458 // AppKitFullscreen API. |
| 462 // | 459 // |
| 463 // + Presentation Mode: | 460 // + Presentation Mode: |
| 464 // - OMNIBOX_TABS_HIDDEN, typically with AppKitFullscreen API, but can | 461 // - OMNIBOX_TABS_HIDDEN, typically with AppKitFullscreen API, but can |
| 465 // also be with Immersive fullscreen API. | 462 // also be with Immersive fullscreen API. |
| 466 // - This class sets a flag, indicating that it wants Presentation Mode | 463 // - This class sets a flag, indicating that it wants Presentation Mode |
| 467 // instead of Canonical Fullscreen. Then it invokes the AppKitFullscreen API. | 464 // instead of Canonical Fullscreen. Then it invokes the AppKitFullscreen API. |
| 468 // | 465 // |
| 469 // + HTML5 fullscreen. <-- Currently uses AppKitFullscreen API. This should | 466 // + HTML5 fullscreen. <-- Currently uses AppKitFullscreen API. This should |
| 470 // eventually migrate to the Immersive Fullscreen API. | 467 // eventually migrate to the Immersive Fullscreen API. |
| 471 // | |
| 472 // TODO(erikchen): Remove this. | |
| 473 // + Simplified fullscreen. Hidden by default. Some users have manually | |
| 474 // enabled it. | |
| 475 // - OMNIBOX_PRESENT. Can be with either fullscreen API. | |
| 476 | 468 |
| 477 // Methods having to do with fullscreen and presentation mode. | 469 // Methods having to do with fullscreen and presentation mode. |
| 478 @interface BrowserWindowController(Fullscreen) | 470 @interface BrowserWindowController(Fullscreen) |
| 479 | 471 |
| 480 // Toggles fullscreen mode. Meant to be called by Lion windows when they enter | 472 // Toggles fullscreen mode. Meant to be called by Lion windows when they enter |
| 481 // or exit Lion fullscreen mode. Must not be called on Snow Leopard or earlier. | 473 // or exit Lion fullscreen mode. Must not be called on Snow Leopard or earlier. |
| 482 - (void)handleLionToggleFullscreen; | 474 - (void)handleLionToggleFullscreen; |
| 483 | 475 |
| 484 // Enters Canonical Fullscreen. | 476 // Enters Canonical Fullscreen. |
| 485 - (void)enterFullscreenWithChrome; | 477 - (void)enterFullscreenWithChrome; |
| (...skipping 15 matching lines...) Expand all Loading... | |
| 501 - (BOOL)isInAppKitFullscreen; | 493 - (BOOL)isInAppKitFullscreen; |
| 502 | 494 |
| 503 // Returns YES if the PresentationModeController exists and hence the omnibox | 495 // Returns YES if the PresentationModeController exists and hence the omnibox |
| 504 // and other UI is expected to slide. | 496 // and other UI is expected to slide. |
| 505 - (BOOL)isInFullscreenWithOmniboxSliding; | 497 - (BOOL)isInFullscreenWithOmniboxSliding; |
| 506 | 498 |
| 507 // Enters (or exits) presentation mode. | 499 // Enters (or exits) presentation mode. |
| 508 - (void)enterPresentationModeForURL:(const GURL&)url | 500 - (void)enterPresentationModeForURL:(const GURL&)url |
| 509 bubbleType:(FullscreenExitBubbleType)bubbleType; | 501 bubbleType:(FullscreenExitBubbleType)bubbleType; |
| 510 | 502 |
| 511 // Tries to enter presentation mode. Falls back to simplified fullscreen. | 503 // Tries to use AppKit Fullscreen, falls back to Immersive Fullscreen. |
|
Robert Sesek
2014/09/02 14:19:33
I think we'll want to make this always use immersi
| |
| 512 - (void)enterHTML5FullscreenForURL:(const GURL&)url | 504 - (void)enterHTML5FullscreenForURL:(const GURL&)url |
| 513 bubbleType:(FullscreenExitBubbleType)bubbleType; | 505 bubbleType:(FullscreenExitBubbleType)bubbleType; |
| 514 | 506 |
| 515 // Exits the current fullscreen mode. | 507 // Exits the current fullscreen mode. |
| 516 - (void)exitAnyFullscreen; | 508 - (void)exitAnyFullscreen; |
| 517 | 509 |
| 518 // Whether the system is in the very specific fullscreen mode: Presentation | 510 // Whether the system is in the very specific fullscreen mode: Presentation |
| 519 // Mode. | 511 // Mode. |
| 520 - (BOOL)inPresentationMode; | 512 - (BOOL)inPresentationMode; |
| 521 | 513 |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 593 // positioned relative to. | 585 // positioned relative to. |
| 594 - (NSRect)omniboxPopupAnchorRect; | 586 - (NSRect)omniboxPopupAnchorRect; |
| 595 | 587 |
| 596 // Force a layout of info bars. | 588 // Force a layout of info bars. |
| 597 - (void)layoutInfoBars; | 589 - (void)layoutInfoBars; |
| 598 | 590 |
| 599 @end // @interface BrowserWindowController (TestingAPI) | 591 @end // @interface BrowserWindowController (TestingAPI) |
| 600 | 592 |
| 601 | 593 |
| 602 #endif // CHROME_BROWSER_UI_COCOA_BROWSER_WINDOW_CONTROLLER_H_ | 594 #endif // CHROME_BROWSER_UI_COCOA_BROWSER_WINDOW_CONTROLLER_H_ |
| OLD | NEW |