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 #import "chrome/browser/ui/cocoa/browser_window_controller_private.h" | 5 #import "chrome/browser/ui/cocoa/browser_window_controller_private.h" |
6 | 6 |
7 #include <cmath> | 7 #include <cmath> |
8 | 8 |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #import "base/memory/scoped_nsobject.h" | 10 #import "base/memory/scoped_nsobject.h" |
(...skipping 1012 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1023 if (chrome::IsInstantExtendedAPIEnabled()) | 1023 if (chrome::IsInstantExtendedAPIEnabled()) |
1024 return YES; | 1024 return YES; |
1025 | 1025 |
1026 if (inPresentationMode) | 1026 if (inPresentationMode) |
1027 return YES; | 1027 return YES; |
1028 | 1028 |
1029 if (findBarCocoaController_ && | 1029 if (findBarCocoaController_ && |
1030 ![[findBarCocoaController_ findBarView] isHidden]) | 1030 ![[findBarCocoaController_ findBarView] isHidden]) |
1031 return YES; | 1031 return YES; |
1032 | 1032 |
| 1033 if (historyOverlayCount_) |
| 1034 return YES; |
| 1035 |
1033 return NO; | 1036 return NO; |
1034 } | 1037 } |
1035 | 1038 |
1036 - (void)updateAllowOverlappingViews:(BOOL)inPresentationMode { | 1039 - (void)updateAllowOverlappingViews:(BOOL)inPresentationMode { |
1037 WebContents* contents = browser_->tab_strip_model()->GetActiveWebContents(); | 1040 WebContents* contents = browser_->tab_strip_model()->GetActiveWebContents(); |
1038 if (!contents) | 1041 if (!contents) |
1039 return; | 1042 return; |
1040 contents->GetView()->SetAllowOverlappingViews( | 1043 contents->GetView()->SetAllowOverlappingViews( |
1041 [self shouldAllowOverlappingViews:inPresentationMode]); | 1044 [self shouldAllowOverlappingViews:inPresentationMode]); |
1042 } | 1045 } |
1043 | 1046 |
1044 - (void)updateInfoBarTipVisibility { | 1047 - (void)updateInfoBarTipVisibility { |
1045 // If the overlay is open or if there's no toolbar then hide the infobar tip. | 1048 // If the overlay is open or if there's no toolbar then hide the infobar tip. |
1046 BOOL suppressInfoBarTip = | 1049 BOOL suppressInfoBarTip = |
1047 [self currentInstantUIState] != | 1050 [self currentInstantUIState] != |
1048 browser_window_controller::kInstantUINone || ![self hasToolbar]; | 1051 browser_window_controller::kInstantUINone || ![self hasToolbar]; |
1049 [infoBarContainerController_ | 1052 [infoBarContainerController_ |
1050 setShouldSuppressTopInfoBarTip:suppressInfoBarTip]; | 1053 setShouldSuppressTopInfoBarTip:suppressInfoBarTip]; |
1051 } | 1054 } |
1052 | 1055 |
1053 @end // @implementation BrowserWindowController(Private) | 1056 @end // @implementation BrowserWindowController(Private) |
OLD | NEW |