| 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 #include "base/mac/mac_util.h" | 10 #include "base/mac/mac_util.h" |
| (...skipping 561 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 572 NSRect frame = [controller_ instantFrame]; | 572 NSRect frame = [controller_ instantFrame]; |
| 573 gfx::Rect bounds(NSRectToCGRect(frame)); | 573 gfx::Rect bounds(NSRectToCGRect(frame)); |
| 574 bounds.set_y(NSHeight(monitorFrame) - bounds.y() - bounds.height()); | 574 bounds.set_y(NSHeight(monitorFrame) - bounds.y() - bounds.height()); |
| 575 return bounds; | 575 return bounds; |
| 576 } | 576 } |
| 577 | 577 |
| 578 bool BrowserWindowCocoa::IsInstantTabShowing() { | 578 bool BrowserWindowCocoa::IsInstantTabShowing() { |
| 579 return [controller_ isInstantTabShowing]; | 579 return [controller_ isInstantTabShowing]; |
| 580 } | 580 } |
| 581 | 581 |
| 582 void BrowserWindowCocoa::SetInstantHasCustomLogo(bool custom_logo) { |
| 583 } |
| 584 |
| 582 WindowOpenDisposition BrowserWindowCocoa::GetDispositionForPopupBounds( | 585 WindowOpenDisposition BrowserWindowCocoa::GetDispositionForPopupBounds( |
| 583 const gfx::Rect& bounds) { | 586 const gfx::Rect& bounds) { |
| 584 // In Lion fullscreen mode, convert popups into tabs. | 587 // In Lion fullscreen mode, convert popups into tabs. |
| 585 if (base::mac::IsOSLionOrLater() && IsFullscreen()) | 588 if (base::mac::IsOSLionOrLater() && IsFullscreen()) |
| 586 return NEW_FOREGROUND_TAB; | 589 return NEW_FOREGROUND_TAB; |
| 587 return NEW_POPUP; | 590 return NEW_POPUP; |
| 588 } | 591 } |
| 589 | 592 |
| 590 FindBar* BrowserWindowCocoa::CreateFindBar() { | 593 FindBar* BrowserWindowCocoa::CreateFindBar() { |
| 591 // We could push the AddFindBar() call into the FindBarBridge | 594 // We could push the AddFindBar() call into the FindBarBridge |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 655 AvatarMenuBubbleController* menu = | 658 AvatarMenuBubbleController* menu = |
| 656 [[AvatarMenuBubbleController alloc] initWithBrowser:browser_ | 659 [[AvatarMenuBubbleController alloc] initWithBrowser:browser_ |
| 657 anchoredAt:point]; | 660 anchoredAt:point]; |
| 658 [[menu bubble] setAlignment:info_bubble::kAlignEdgeToAnchorEdge]; | 661 [[menu bubble] setAlignment:info_bubble::kAlignEdgeToAnchorEdge]; |
| 659 [menu showWindow:nil]; | 662 [menu showWindow:nil]; |
| 660 } | 663 } |
| 661 | 664 |
| 662 void BrowserWindowCocoa::ShowAvatarBubbleFromAvatarButton() { | 665 void BrowserWindowCocoa::ShowAvatarBubbleFromAvatarButton() { |
| 663 [[controller_ avatarButtonController] showAvatarBubble]; | 666 [[controller_ avatarButtonController] showAvatarBubble]; |
| 664 } | 667 } |
| OLD | NEW |