| OLD | NEW |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 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.h" | 5 #import "chrome/browser/ui/cocoa/browser_window_controller.h" |
| 6 | 6 |
| 7 #include <cmath> | 7 #include <cmath> |
| 8 #include <numeric> | 8 #include <numeric> |
| 9 #include <utility> | 9 #include <utility> |
| 10 | 10 |
| (...skipping 1400 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1411 int index = [tabStripController_ modelIndexForTabView:tabView]; | 1411 int index = [tabStripController_ modelIndexForTabView:tabView]; |
| 1412 WebContents* contents = browser_->tab_strip_model()->GetWebContentsAt(index); | 1412 WebContents* contents = browser_->tab_strip_model()->GetWebContentsAt(index); |
| 1413 if (!contents) | 1413 if (!contents) |
| 1414 return NO; | 1414 return NO; |
| 1415 | 1415 |
| 1416 const web_modal::WebContentsModalDialogManager* manager = | 1416 const web_modal::WebContentsModalDialogManager* manager = |
| 1417 web_modal::WebContentsModalDialogManager::FromWebContents(contents); | 1417 web_modal::WebContentsModalDialogManager::FromWebContents(contents); |
| 1418 return !manager || !manager->IsDialogActive(); | 1418 return !manager || !manager->IsDialogActive(); |
| 1419 } | 1419 } |
| 1420 | 1420 |
| 1421 - (CGFloat)menubarOffset { |
| 1422 return [[self fullscreenToolbarController] computeLayout].menubarOffset; |
| 1423 } |
| 1424 |
| 1421 // TabStripControllerDelegate protocol. | 1425 // TabStripControllerDelegate protocol. |
| 1422 - (void)onActivateTabWithContents:(WebContents*)contents { | 1426 - (void)onActivateTabWithContents:(WebContents*)contents { |
| 1423 // Update various elements that are interested in knowing the current | 1427 // Update various elements that are interested in knowing the current |
| 1424 // WebContents. | 1428 // WebContents. |
| 1425 | 1429 |
| 1426 // Update all the UI bits. | 1430 // Update all the UI bits. |
| 1427 windowShim_->UpdateTitleBar(); | 1431 windowShim_->UpdateTitleBar(); |
| 1428 | 1432 |
| 1429 // Update the bookmark bar. | 1433 // Update the bookmark bar. |
| 1430 // TODO(viettrungluu): perhaps update to not terminate running animations (if | 1434 // TODO(viettrungluu): perhaps update to not terminate running animations (if |
| (...skipping 578 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2009 | 2013 |
| 2010 - (NSRect)savedRegularWindowFrame { | 2014 - (NSRect)savedRegularWindowFrame { |
| 2011 return savedRegularWindowFrame_; | 2015 return savedRegularWindowFrame_; |
| 2012 } | 2016 } |
| 2013 | 2017 |
| 2014 - (BOOL)isFullscreenTransitionInProgress { | 2018 - (BOOL)isFullscreenTransitionInProgress { |
| 2015 return enteringAppKitFullscreen_ || exitingAppKitFullscreen_; | 2019 return enteringAppKitFullscreen_ || exitingAppKitFullscreen_; |
| 2016 } | 2020 } |
| 2017 | 2021 |
| 2018 @end // @implementation BrowserWindowController(WindowType) | 2022 @end // @implementation BrowserWindowController(WindowType) |
| OLD | NEW |