| Index: chrome/browser/ui/cocoa/presentation_mode_controller.mm
|
| diff --git a/chrome/browser/ui/cocoa/presentation_mode_controller.mm b/chrome/browser/ui/cocoa/presentation_mode_controller.mm
|
| index 110629e2d6b5ba6e37d7697d56ee5840e09565fe..2b20af97d6c25322ab811dfbe6f7d82cd73f0abc 100644
|
| --- a/chrome/browser/ui/cocoa/presentation_mode_controller.mm
|
| +++ b/chrome/browser/ui/cocoa/presentation_mode_controller.mm
|
| @@ -166,6 +166,7 @@ const CGFloat kFloatingBarVerticalOffset = 22;
|
| @implementation PresentationModeController
|
|
|
| @synthesize inPresentationMode = inPresentationMode_;
|
| +@synthesize alwaysShowDropdown = alwaysShowDropdown_;
|
|
|
| - (id)initWithBrowserController:(BrowserWindowController*)controller {
|
| if ((self = [super init])) {
|
| @@ -193,6 +194,8 @@ const CGFloat kFloatingBarVerticalOffset = 22;
|
| enteringPresentationMode_ = YES;
|
| inPresentationMode_ = YES;
|
| contentView_ = contentView;
|
| + if (alwaysShowDropdown_)
|
| + showDropdown = YES;
|
| [self changeFloatingBarShownFraction:(showDropdown ? 1 : 0)];
|
|
|
| // Register for notifications. Self is removed as an observer in |-cleanup|.
|
| @@ -237,6 +240,14 @@ const CGFloat kFloatingBarVerticalOffset = 22;
|
| [self cleanup];
|
| }
|
|
|
| +- (void)setAlwaysShowDropdown:(BOOL)alwaysShowDropdown {
|
| + alwaysShowDropdown_ = alwaysShowDropdown;
|
| + if (alwaysShowDropdown)
|
| + [self ensureOverlayShownWithAnimation:YES delay:YES];
|
| + else
|
| + [self ensureOverlayHiddenWithAnimation:YES delay:YES];
|
| +}
|
| +
|
| - (void)windowDidChangeScreen:(NSNotification*)notification {
|
| [browserController_ resizeFullscreenWindow];
|
| }
|
| @@ -316,6 +327,8 @@ const CGFloat kFloatingBarVerticalOffset = 22;
|
| - (void)ensureOverlayHiddenWithAnimation:(BOOL)animate delay:(BOOL)delay {
|
| if (!inPresentationMode_)
|
| return;
|
| + if (alwaysShowDropdown_)
|
| + return;
|
|
|
| if (animate) {
|
| if (delay) {
|
| @@ -500,6 +513,8 @@ const CGFloat kFloatingBarVerticalOffset = 22;
|
| }
|
|
|
| - (void)setupTrackingArea {
|
| + if (alwaysShowDropdown_)
|
| + return;
|
| if (trackingArea_) {
|
| // If the tracking rectangle is already |trackingAreaBounds_|, quit early.
|
| NSRect oldRect = [trackingArea_ rect];
|
| @@ -615,6 +630,7 @@ const CGFloat kFloatingBarVerticalOffset = 22;
|
| }
|
|
|
| - (void)hideTimerFire:(NSTimer*)timer {
|
| + DCHECK(!alwaysShowDropdown_);
|
| DCHECK_EQ(hideTimer_, timer); // This better be our hide timer.
|
| [hideTimer_ invalidate]; // Make sure it doesn't repeat.
|
| hideTimer_.reset(); // And get rid of it.
|
|
|