| 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 | 9 |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 1492 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1503 | 1503 |
| 1504 - (BOOL)isTabDraggable:(NSView*)tabView { | 1504 - (BOOL)isTabDraggable:(NSView*)tabView { |
| 1505 // TODO(avi, thakis): ConstrainedWindowSheetController has no api to move | 1505 // TODO(avi, thakis): ConstrainedWindowSheetController has no api to move |
| 1506 // tabsheets between windows. Until then, we have to prevent having to move a | 1506 // tabsheets between windows. Until then, we have to prevent having to move a |
| 1507 // tabsheet between windows, e.g. no tearing off of tabs. | 1507 // tabsheet between windows, e.g. no tearing off of tabs. |
| 1508 int index = [tabStripController_ modelIndexForTabView:tabView]; | 1508 int index = [tabStripController_ modelIndexForTabView:tabView]; |
| 1509 WebContents* contents = chrome::GetWebContentsAt(browser_.get(), index); | 1509 WebContents* contents = chrome::GetWebContentsAt(browser_.get(), index); |
| 1510 if (!contents) | 1510 if (!contents) |
| 1511 return NO; | 1511 return NO; |
| 1512 return ConstrainedWindowTabHelper::FromWebContents(contents)-> | 1512 return ConstrainedWindowTabHelper::FromWebContents(contents)-> |
| 1513 constrained_window_count() == 0; | 1513 dialog_count() == 0; |
| 1514 } | 1514 } |
| 1515 | 1515 |
| 1516 // TabStripControllerDelegate protocol. | 1516 // TabStripControllerDelegate protocol. |
| 1517 - (void)onActivateTabWithContents:(WebContents*)contents { | 1517 - (void)onActivateTabWithContents:(WebContents*)contents { |
| 1518 // Update various elements that are interested in knowing the current | 1518 // Update various elements that are interested in knowing the current |
| 1519 // WebContents. | 1519 // WebContents. |
| 1520 | 1520 |
| 1521 // Update all the UI bits. | 1521 // Update all the UI bits. |
| 1522 windowShim_->UpdateTitleBar(); | 1522 windowShim_->UpdateTitleBar(); |
| 1523 | 1523 |
| (...skipping 643 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2167 | 2167 |
| 2168 - (BOOL)supportsBookmarkBar { | 2168 - (BOOL)supportsBookmarkBar { |
| 2169 return [self supportsWindowFeature:Browser::FEATURE_BOOKMARKBAR]; | 2169 return [self supportsWindowFeature:Browser::FEATURE_BOOKMARKBAR]; |
| 2170 } | 2170 } |
| 2171 | 2171 |
| 2172 - (BOOL)isTabbedWindow { | 2172 - (BOOL)isTabbedWindow { |
| 2173 return browser_->is_type_tabbed(); | 2173 return browser_->is_type_tabbed(); |
| 2174 } | 2174 } |
| 2175 | 2175 |
| 2176 @end // @implementation BrowserWindowController(WindowType) | 2176 @end // @implementation BrowserWindowController(WindowType) |
| OLD | NEW |