| 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 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 // A class acting as the Objective-C controller for the Browser | 9 // A class acting as the Objective-C controller for the Browser |
| 10 // object. Handles interactions between Cocoa and the cross-platform | 10 // object. Handles interactions between Cocoa and the cross-platform |
| (...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 104 // The raw accumulated zoom value and the actual zoom increments made for an | 104 // The raw accumulated zoom value and the actual zoom increments made for an |
| 105 // an in-progress pinch gesture. | 105 // an in-progress pinch gesture. |
| 106 CGFloat totalMagnifyGestureAmount_; | 106 CGFloat totalMagnifyGestureAmount_; |
| 107 NSInteger currentZoomStepDelta_; | 107 NSInteger currentZoomStepDelta_; |
| 108 | 108 |
| 109 // The view controller that manages the incognito badge or the multi-profile | 109 // The view controller that manages the incognito badge or the multi-profile |
| 110 // avatar icon. The view is always in the view hierarchy, but will be hidden | 110 // avatar icon. The view is always in the view hierarchy, but will be hidden |
| 111 // unless it's appropriate to show it. | 111 // unless it's appropriate to show it. |
| 112 scoped_nsobject<AvatarButtonController> avatarButtonController_; | 112 scoped_nsobject<AvatarButtonController> avatarButtonController_; |
| 113 | 113 |
| 114 // The view that shows the presentation mode toggle when in Lion fullscreen | |
| 115 // mode. Nil if not in fullscreen mode or not on Lion. | |
| 116 scoped_nsobject<NSButton> presentationModeToggleButton_; | |
| 117 | |
| 118 // Lazily created view which draws the background for the floating set of bars | 114 // Lazily created view which draws the background for the floating set of bars |
| 119 // in presentation mode (for window types having a floating bar; it remains | 115 // in presentation mode (for window types having a floating bar; it remains |
| 120 // nil for those which don't). | 116 // nil for those which don't). |
| 121 scoped_nsobject<NSView> floatingBarBackingView_; | 117 scoped_nsobject<NSView> floatingBarBackingView_; |
| 122 | 118 |
| 123 // Tracks whether the floating bar is above or below the bookmark bar, in | 119 // Tracks whether the floating bar is above or below the bookmark bar, in |
| 124 // terms of z-order. | 120 // terms of z-order. |
| 125 BOOL floatingBarAboveBookmarkBar_; | 121 BOOL floatingBarAboveBookmarkBar_; |
| 126 | 122 |
| 127 // The borderless window used in fullscreen mode. Lion reuses the original | 123 // The borderless window used in fullscreen mode. Lion reuses the original |
| (...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 386 - (void)exitFullscreen; | 382 - (void)exitFullscreen; |
| 387 | 383 |
| 388 // Updates the contents of the fullscreen exit bubble with |url| and | 384 // Updates the contents of the fullscreen exit bubble with |url| and |
| 389 // |bubbleType|. | 385 // |bubbleType|. |
| 390 - (void)updateFullscreenExitBubbleURL:(const GURL&)url | 386 - (void)updateFullscreenExitBubbleURL:(const GURL&)url |
| 391 bubbleType:(FullscreenExitBubbleType)bubbleType; | 387 bubbleType:(FullscreenExitBubbleType)bubbleType; |
| 392 | 388 |
| 393 // Returns fullscreen state. This method is safe to call on all OS versions. | 389 // Returns fullscreen state. This method is safe to call on all OS versions. |
| 394 - (BOOL)isFullscreen; | 390 - (BOOL)isFullscreen; |
| 395 | 391 |
| 396 // Toggles presentation mode without exiting fullscreen mode. Should only be | |
| 397 // called by the presentation mode toggle button. This method should not be | |
| 398 // called on Snow Leopard or earlier. | |
| 399 - (void)togglePresentationModeForLionOrLater:(id)sender; | |
| 400 | |
| 401 // Enters (or exits) presentation mode. Also enters fullscreen mode if this | 392 // Enters (or exits) presentation mode. Also enters fullscreen mode if this |
| 402 // window is not already fullscreen. This method is safe to call on all OS | 393 // window is not already fullscreen. This method is safe to call on all OS |
| 403 // versions. | 394 // versions. |
| 404 - (void)enterPresentationModeForURL:(const GURL&)url | 395 - (void)enterPresentationModeForURL:(const GURL&)url |
| 405 bubbleType:(FullscreenExitBubbleType)bubbleType; | 396 bubbleType:(FullscreenExitBubbleType)bubbleType; |
| 406 - (void)exitPresentationMode; | 397 - (void)exitPresentationMode; |
| 407 | 398 |
| 408 // Returns presentation mode state. This method is safe to call on all OS | 399 // Returns presentation mode state. This method is safe to call on all OS |
| 409 // versions. | 400 // versions. |
| 410 - (BOOL)inPresentationMode; | 401 - (BOOL)inPresentationMode; |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 478 // |source| rect doesn't fit into |target|. | 469 // |source| rect doesn't fit into |target|. |
| 479 - (NSSize)overflowFrom:(NSRect)source | 470 - (NSSize)overflowFrom:(NSRect)source |
| 480 to:(NSRect)target; | 471 to:(NSRect)target; |
| 481 | 472 |
| 482 // The fullscreen exit bubble controller, or nil if the bubble isn't showing. | 473 // The fullscreen exit bubble controller, or nil if the bubble isn't showing. |
| 483 - (FullscreenExitBubbleController*)fullscreenExitBubbleController; | 474 - (FullscreenExitBubbleController*)fullscreenExitBubbleController; |
| 484 @end // @interface BrowserWindowController (TestingAPI) | 475 @end // @interface BrowserWindowController (TestingAPI) |
| 485 | 476 |
| 486 | 477 |
| 487 #endif // CHROME_BROWSER_UI_COCOA_BROWSER_WINDOW_CONTROLLER_H_ | 478 #endif // CHROME_BROWSER_UI_COCOA_BROWSER_WINDOW_CONTROLLER_H_ |
| OLD | NEW |