| 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 #include "chrome/browser/ui/cocoa/browser_window_cocoa.h" | 5 #include "chrome/browser/ui/cocoa/browser_window_cocoa.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #import "base/mac/sdk_forward_declarations.h" | 10 #import "base/mac/sdk_forward_declarations.h" |
| (...skipping 497 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 508 | 508 |
| 509 bool BrowserWindowCocoa::IsTabStripEditable() const { | 509 bool BrowserWindowCocoa::IsTabStripEditable() const { |
| 510 return ![controller_ isDragSessionActive]; | 510 return ![controller_ isDragSessionActive]; |
| 511 } | 511 } |
| 512 | 512 |
| 513 bool BrowserWindowCocoa::IsToolbarVisible() const { | 513 bool BrowserWindowCocoa::IsToolbarVisible() const { |
| 514 return browser_->SupportsWindowFeature(Browser::FEATURE_TOOLBAR) || | 514 return browser_->SupportsWindowFeature(Browser::FEATURE_TOOLBAR) || |
| 515 browser_->SupportsWindowFeature(Browser::FEATURE_LOCATIONBAR); | 515 browser_->SupportsWindowFeature(Browser::FEATURE_LOCATIONBAR); |
| 516 } | 516 } |
| 517 | 517 |
| 518 gfx::Rect BrowserWindowCocoa::GetRootWindowResizerRect() const { | |
| 519 if (IsDownloadShelfVisible()) | |
| 520 return gfx::Rect(); | |
| 521 NSRect tabRect = [controller_ selectedTabGrowBoxRect]; | |
| 522 return gfx::Rect(NSRectToCGRect(tabRect)); | |
| 523 } | |
| 524 | |
| 525 void BrowserWindowCocoa::AddFindBar( | 518 void BrowserWindowCocoa::AddFindBar( |
| 526 FindBarCocoaController* find_bar_cocoa_controller) { | 519 FindBarCocoaController* find_bar_cocoa_controller) { |
| 527 [controller_ addFindBar:find_bar_cocoa_controller]; | 520 [controller_ addFindBar:find_bar_cocoa_controller]; |
| 528 } | 521 } |
| 529 | 522 |
| 530 void BrowserWindowCocoa::UpdateAlertState(TabAlertState alert_state) { | 523 void BrowserWindowCocoa::UpdateAlertState(TabAlertState alert_state) { |
| 531 alert_state_ = alert_state; | 524 alert_state_ = alert_state; |
| 532 UpdateTitleBar(); | 525 UpdateTitleBar(); |
| 533 } | 526 } |
| 534 | 527 |
| (...skipping 302 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 837 ExclusiveAccessContext* BrowserWindowCocoa::GetExclusiveAccessContext() { | 830 ExclusiveAccessContext* BrowserWindowCocoa::GetExclusiveAccessContext() { |
| 838 return [controller_ exclusiveAccessController]; | 831 return [controller_ exclusiveAccessController]; |
| 839 } | 832 } |
| 840 | 833 |
| 841 void BrowserWindowCocoa::ShowImeWarningBubble( | 834 void BrowserWindowCocoa::ShowImeWarningBubble( |
| 842 const extensions::Extension* extension, | 835 const extensions::Extension* extension, |
| 843 const base::Callback<void(ImeWarningBubblePermissionStatus status)>& | 836 const base::Callback<void(ImeWarningBubblePermissionStatus status)>& |
| 844 callback) { | 837 callback) { |
| 845 NOTREACHED() << "The IME warning bubble is unsupported on this platform."; | 838 NOTREACHED() << "The IME warning bubble is unsupported on this platform."; |
| 846 } | 839 } |
| OLD | NEW |