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 405 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
416 // | 416 // |
417 // + Immersive fullscreen: An alternative to AppKitFullscreen API. Uses on 10.6 | 417 // + Immersive fullscreen: An alternative to AppKitFullscreen API. Uses on 10.6 |
418 // (before AppKitFullscreen API was available), and on certain HTML/Flash | 418 // (before AppKitFullscreen API was available), and on certain HTML/Flash |
419 // content. This is a method defined by Chrome. | 419 // content. This is a method defined by Chrome. |
420 // | 420 // |
421 // The Immersive fullscreen API can be called after the AppKitFullscreen API. | 421 // The Immersive fullscreen API can be called after the AppKitFullscreen API. |
422 // Calling the AppKitFullscreen API while immersive fullscreen API has been | 422 // Calling the AppKitFullscreen API while immersive fullscreen API has been |
423 // invoked causes all fullscreen modes to exit. | 423 // invoked causes all fullscreen modes to exit. |
424 // | 424 // |
425 // ---------------------------------------------------------------------------- | 425 // ---------------------------------------------------------------------------- |
426 // There are 3 "styles" of omnibox sliding. | 426 // There are 2 "styles" of omnibox sliding. |
427 // + OMNIBOX_TABS_PRESENT: Both the omnibox and the tabstrip are present. | 427 // + OMNIBOX_TABS_PRESENT: Both the omnibox and the tabstrip are present. |
428 // Moving the cursor to the top causes the menubar to appear, and everything | 428 // Moving the cursor to the top causes the menubar to appear, and everything |
429 // else to slide down. | 429 // else to slide down. |
430 // + OMNIBOX_PRESENT: The tabstrip is hidden. Moving the cursor to the top | |
431 // shows the tabstrip and menubar, sliding everything else down. | |
432 // + OMNIBOX_TABS_HIDDEN: Both tabstrip and omnibox are hidden. Moving cursor | 430 // + OMNIBOX_TABS_HIDDEN: Both tabstrip and omnibox are hidden. Moving cursor |
433 // to top shows tabstrip, omnibox, and menu bar. | 431 // to top shows tabstrip, omnibox, and menu bar. |
434 // | 432 // |
435 // The omnibox sliding styles are used in conjunction with the fullscreen APIs. | 433 // The omnibox sliding styles are used in conjunction with the fullscreen APIs. |
436 // There is exactly 1 sliding style active at a time. The sliding is mangaged | 434 // There is exactly 1 sliding style active at a time. The sliding is mangaged |
437 // by the presentationModeController_. (poorly named). | 435 // by the presentationModeController_. (poorly named). |
438 // | 436 // |
439 // ---------------------------------------------------------------------------- | 437 // ---------------------------------------------------------------------------- |
440 // There are several "fullscreen modes" bantered around. Technically, any | 438 // There are several "fullscreen modes" bantered around. Technically, any |
441 // fullscreen API can be combined with any sliding style. | 439 // fullscreen API can be combined with any sliding style. |
(...skipping 13 matching lines...) Expand all Loading... |
455 // AppKitFullscreen API. | 453 // AppKitFullscreen API. |
456 // | 454 // |
457 // + Presentation Mode: | 455 // + Presentation Mode: |
458 // - OMNIBOX_TABS_HIDDEN, typically with AppKitFullscreen API, but can | 456 // - OMNIBOX_TABS_HIDDEN, typically with AppKitFullscreen API, but can |
459 // also be with Immersive fullscreen API. | 457 // also be with Immersive fullscreen API. |
460 // - This class sets a flag, indicating that it wants Presentation Mode | 458 // - This class sets a flag, indicating that it wants Presentation Mode |
461 // instead of Canonical Fullscreen. Then it invokes the AppKitFullscreen API. | 459 // instead of Canonical Fullscreen. Then it invokes the AppKitFullscreen API. |
462 // | 460 // |
463 // + HTML5 fullscreen. <-- Currently uses AppKitFullscreen API. This should | 461 // + HTML5 fullscreen. <-- Currently uses AppKitFullscreen API. This should |
464 // eventually migrate to the Immersive Fullscreen API. | 462 // eventually migrate to the Immersive Fullscreen API. |
465 // | |
466 // TODO(erikchen): Remove this. | |
467 // + Simplified fullscreen. Hidden by default. Some users have manually | |
468 // enabled it. | |
469 // - OMNIBOX_PRESENT. Can be with either fullscreen API. | |
470 | 463 |
471 // Methods having to do with fullscreen and presentation mode. | 464 // Methods having to do with fullscreen and presentation mode. |
472 @interface BrowserWindowController(Fullscreen) | 465 @interface BrowserWindowController(Fullscreen) |
473 | 466 |
474 // Toggles fullscreen mode. Meant to be called by Lion windows when they enter | 467 // Toggles fullscreen mode. Meant to be called by Lion windows when they enter |
475 // or exit Lion fullscreen mode. Must not be called on Snow Leopard or earlier. | 468 // or exit Lion fullscreen mode. Must not be called on Snow Leopard or earlier. |
476 - (void)handleLionToggleFullscreen; | 469 - (void)handleLionToggleFullscreen; |
477 | 470 |
478 // Enters Canonical Fullscreen. | 471 // Enters Canonical Fullscreen. |
479 - (void)enterFullscreenWithChrome; | 472 - (void)enterFullscreenWithChrome; |
(...skipping 15 matching lines...) Expand all Loading... |
495 - (BOOL)isInAppKitFullscreen; | 488 - (BOOL)isInAppKitFullscreen; |
496 | 489 |
497 // Returns YES if the PresentationModeController exists and hence the omnibox | 490 // Returns YES if the PresentationModeController exists and hence the omnibox |
498 // and other UI is expected to slide. | 491 // and other UI is expected to slide. |
499 - (BOOL)isInFullscreenWithOmniboxSliding; | 492 - (BOOL)isInFullscreenWithOmniboxSliding; |
500 | 493 |
501 // Enters (or exits) presentation mode. | 494 // Enters (or exits) presentation mode. |
502 - (void)enterPresentationModeForURL:(const GURL&)url | 495 - (void)enterPresentationModeForURL:(const GURL&)url |
503 bubbleType:(FullscreenExitBubbleType)bubbleType; | 496 bubbleType:(FullscreenExitBubbleType)bubbleType; |
504 | 497 |
505 // Tries to enter presentation mode. Falls back to simplified fullscreen. | 498 // Tries to use AppKit Fullscreen, falls back to Immersive Fullscreen. |
506 - (void)enterHTML5FullscreenForURL:(const GURL&)url | 499 - (void)enterHTML5FullscreenForURL:(const GURL&)url |
507 bubbleType:(FullscreenExitBubbleType)bubbleType; | 500 bubbleType:(FullscreenExitBubbleType)bubbleType; |
508 | 501 |
509 // Exits the current fullscreen mode. | 502 // Exits the current fullscreen mode. |
510 - (void)exitAnyFullscreen; | 503 - (void)exitAnyFullscreen; |
511 | 504 |
512 // Whether the system is in the very specific fullscreen mode: Presentation | 505 // Whether the system is in the very specific fullscreen mode: Presentation |
513 // Mode. | 506 // Mode. |
514 - (BOOL)inPresentationMode; | 507 - (BOOL)inPresentationMode; |
515 | 508 |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
582 // positioned relative to. | 575 // positioned relative to. |
583 - (NSRect)omniboxPopupAnchorRect; | 576 - (NSRect)omniboxPopupAnchorRect; |
584 | 577 |
585 // Force a layout of info bars. | 578 // Force a layout of info bars. |
586 - (void)layoutInfoBars; | 579 - (void)layoutInfoBars; |
587 | 580 |
588 @end // @interface BrowserWindowController (TestingAPI) | 581 @end // @interface BrowserWindowController (TestingAPI) |
589 | 582 |
590 | 583 |
591 #endif // CHROME_BROWSER_UI_COCOA_BROWSER_WINDOW_CONTROLLER_H_ | 584 #endif // CHROME_BROWSER_UI_COCOA_BROWSER_WINDOW_CONTROLLER_H_ |
OLD | NEW |